:root {
    --color-white: #FFFFFF;
    --color-gray: #E9EAEB;
    --color-blue: #003D7A;
    --color-text-dark: #2C3E50;
    --color-text-light: #6C757D;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.navbar {
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-gray);
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand img:hover {
    opacity: 0.85;
}

.nav-link {
    color: var(--color-text-dark);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--color-blue);
}

.nav-link.active {
    color: var(--color-blue);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background-color: var(--color-blue);
    border-radius: 2px;
}

#heroCarousel {
    margin-top: 72px;
}

.hero-slide {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-page {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-top: 72px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 61, 122, 0.45);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    color: var(--color-white);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #002952;
    border-color: #002952;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 61, 122, 0.3);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-outline-light:hover {
    background-color: var(--color-white);
    color: var(--color-blue);
    transform: translateY(-2px);
}

.section-white {
    background-color: var(--color-white);
}

.section-gray {
    background-color: var(--color-gray);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 3rem;
}

.feature-card {
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 61, 122, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--color-blue);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 1rem;
}

.feature-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-dark);
}

.content-text .lead {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-blue);
    margin-bottom: 2rem;
}

.content-text p {
    margin-bottom: 1.5rem;
}

.value-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    height: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 61, 122, 0.15);
}

.value-icon {
    font-size: 3rem;
    color: var(--color-blue);
    margin-bottom: 1.25rem;
}

.value-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 1rem;
}

.value-text {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.product-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 61, 122, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-body {
    padding: 2rem;
}

.product-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 1rem;
}

.product-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.contact-form-wrapper {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--color-gray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 122, 0.15);
}

.contact-info-card {
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-info-icon {
    font-size: 3rem;
    color: var(--color-blue);
    margin-bottom: 1.25rem;
}

.contact-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 1rem;
}

.contact-info-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.footer {
    background-color: var(--color-blue);
    color: var(--color-white);
    padding: 4rem 0 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-text {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.7;
}

.footer-link {
    color: var(--color-white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.footer-link:hover {
    opacity: 1;
    padding-left: 0.5rem;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.footer-copyright {
    font-size: 0.95rem;
    opacity: 0.85;
}

.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: var(--color-blue);
    color: var(--color-white);
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
}

/* ================================
   RS MINING - Ajustes contacto
================================ */

.contact-info-wrapper {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-info-item h6 {
    color: var(--color-blue);
}

.contact-icon-col{
    width: 34px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 3px;
}

.map-section iframe {
    display: block;
}

.map-wrapper {
    overflow: hidden;
}

.social-links-contact .btn-outline-primary {
    border-width: 2px;
}

/* ==========================================
   🎨 GALERÍA + FILTROS ESTILO MS SUR
   Adaptado a RS Mining (AZUL CORPORATIVO)
========================================== */

/* ===== FILTROS ===== */

.filter-buttons {
    margin-bottom: 3rem;
}

.btn-filter {
    background: #ffffff;
    color: #2C3E50;
    border: 2px solid #E9EAEB;
    padding: 0.55rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    cursor: pointer;
}

/* Hover */
.btn-filter:hover {
    background: #003D7A;
    color: #ffffff;
    border-color: #003D7A;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 61, 122, 0.25);
}

/* Activo */
.btn-filter.active {
    background: #003D7A;
    color: #ffffff;
    border-color: #003D7A;
    box-shadow: 0 8px 18px rgba(0, 61, 122, 0.35);
}


/* ===== GALERÍA ===== */

.gallery-grid {
    margin-top: 2rem;
}

.gallery-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 61, 122, 0.15);
    transition: all 0.3s ease;
    background: #ffffff;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0, 61, 122, 0.28);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 61, 122, 0.9) 0%,
        rgba(0, 61, 122, 0.5) 50%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    width: 100%;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-card:hover .gallery-content {
    transform: translateY(0);
}

/* ===== FILTRO OCULTAR ===== */

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* ===========================
   MODALES RS MINING AZUL
=========================== */

.rs-modal .modal-content {
    border-radius: 18px;
    border: 3px solid #003D7A; /* Azul corporativo */
    box-shadow: 0 15px 40px rgba(0, 61, 122, 0.25);
    overflow: hidden;
}

.rs-modal .modal-header {
    background: #f4f8fc;
    border-bottom: 1px solid rgba(0, 61, 122, 0.15);
    padding: 1.5rem 2rem;
}

.rs-modal .modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: #003D7A;
}

.rs-modal .btn-close {
    filter: none;
    opacity: 0.7;
}

.rs-modal .btn-close:hover {
    opacity: 1;
}

.rs-modal-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.rs-modal-content {
    padding: 2rem;
    background: #ffffff;
}

.rs-modal-content p {
    color: #4a4a4a;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* Animación suave */
.rs-modal .modal-dialog {
    transition: transform 0.3s ease;
}

.rs-modal.show .modal-dialog {
    transform: scale(1);
}

/* ============================= */
/* SECCIÓN HISTORIA RS MINING   */
/* ============================= */

.rs-historia {
    background-color: #f8f9fa;
}

.rs-historia-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0d3c74; /* Azul corporativo */
}

.rs-historia p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.rs-historia-img img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ================================
   HERO CONTACTO - BAJAR TEXTO
================================ */

.hero-contact-text {
    transform: translateY(120px);
}

/* ===========================
   MODAL ESTILO CATALOGO
=========================== */

.rs-modal .modal-body {
    padding: 2.5rem;
}

.rs-modal h4 {
    color: var(--color-blue);
    font-weight: 700;
}

.rs-modal .modal-body p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.rs-modal .modal-body ul {
    margin-top: 1rem;
}

.rs-modal .modal-body li {
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

/* Imagen más elegante */
.rs-modal .modal-body img {
    max-height: 420px;
    object-fit: contain;
}

/* Mejor espacio en móvil */
@media (max-width: 991px) {
    .rs-modal .modal-body {
        text-align: center;
    }
}

/* ===========================
   GALERÍA PRODUCTOS - ZOOM SUAVE
=========================== */
.zoom-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
}

.zoom-img {
    transition: transform 0.1s ease;
    transform-origin: center center;
}

/* ================================
   BOTÓN FLOTANTE DE WHATSAPP
=================================== */

/* Contenedor del botón + mensaje */
.whatsapp-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
}

/* Globito de texto */
.whatsapp-bubble {
  background-color: #ffffff;
  color: #333333;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

/* Botón circular */
.btn-wsp {
  background-color: #25d366;
  color: #ffffff;
  font-size: 26px;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
}

.btn-wsp:hover {
  transform: scale(1.1);
}

/* Mostrar burbuja */
.whatsapp-container:hover .whatsapp-bubble {
  opacity: 1;
  transform: translateX(0);
}

/* Pulso */
.animated-wsp {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ================================
   FIX WHATSAPP MOBILE DEFINITIVO
=================================== */

.whatsapp-container {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 9999 !important;
    transform: none !important;
}

.btn-wsp {
    width: 65px !important;
    height: 65px !important;
    font-size: 28px !important;
}

@media (max-width: 768px) {
    .btn-wsp {
        width: 72px !important;
        height: 72px !important;
        font-size: 32px !important;
    }

    .whatsapp-bubble {
        display: none !important;
    }
}