/* 
* SuperNet - Servicios de Limpieza Integral
* Estilos principales
*/

/* ===== Variables ===== */
:root {
    /* Colores principales */
    --primary-color: #1e88e5;       /* Azul claro */
    --secondary-color: #4caf50;     /* Verde suave */
    --accent-color: #03a9f4;        /* Azul más claro para acentos */
    --light-color: #f5f5f5;         /* Gris muy claro casi blanco */
    --dark-color: #333333;          /* Gris oscuro para textos */
    --white: #ffffff;
    --gray-light: #eeeeee;
    --gray: #9e9e9e;
    --gray-dark: #616161;
    --shadow: rgba(0, 0, 0, 0.1);
    
    /* Tipografía */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Bordes */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* Transiciones */
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    /* Altura del header (escritorio) para formato consistente entre idiomas */
    --header-height-desktop: 120px;
}

/* ===== Reset y Estilos Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, .btn {
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 500;
}

/* ===== Utilidades ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.bg-light {
    background-color: var(--light-color);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Reducir separación superior solo en Sobre Nosotros, Servicios y Por Qué Elegirnos */
#sobre-nosotros.section,
#servicios.section,
#por-que-elegirnos.section {
    padding-top: calc(var(--spacing-xl) / 2);
}

/* Reducir separación superior en Galería y Blog */
#galeria.section,
#blog.section {
    padding-top: calc(var(--spacing-xl) / 2);
    padding-bottom: calc(var(--spacing-xl) + var(--spacing-md));
}

/* Reducir separación superior en Contacto para alinearlo con el resto */
#contacto.section {
    padding-top: calc(var(--spacing-xl) / 2);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--gray-dark);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary:hover {
    background-color: #45a049;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Botón de idioma */
.btn-lang {
    margin-left: var(--spacing-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Selector de idioma */
.lang-switcher {
    position: relative;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.lang-menu {
    position: static;
    right: auto;
    top: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    min-width: auto;
    z-index: auto;
}

.lang-menu[hidden] {
    display: none;
}

.lang-menu button {
    background: transparent;
    border: none;
    text-align: center;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--dark-color);
    border-radius: 4px;
}

.lang-menu button:hover,
.lang-menu button:focus {
    background: var(--bg-light);
}

/* Banderas */
.lang-flags img {
    display: block;
    width: 24px;
    height: 16px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 2px;
}
.lang-flag.active img {
    border-color: var(--primary-color);
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(30,136,229,0.2), 0 0 8px rgba(0,0,0,0.18);
}

.btn-link {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.btn-link:hover {
    color: var(--primary-color);
}

.btn-link:hover::after {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-fast);
}

.header.scrolled {
    padding: 0.5rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-sm);
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark-color);
}

.header-logo {
    height: 101px; /* +20% respecto a 84px */
    width: auto;
    margin: 5px 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
}

.nav-list li {
    margin-left: var(--spacing-md);
}

.nav-list a {
    color: var(--dark-color);
    font-weight: 600; /* Mejora legibilidad de enlaces, en especial Testimonios */
    letter-spacing: 0.2px;
    position: relative;
    padding: 0.5rem 0;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-list a:hover, .nav-list a.active {
    color: var(--primary-color);
}

.nav-list a:hover::after, .nav-list a.active::after {
    width: 100%;
}

.btn-contacto {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.btn-contacto:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-contacto::after {
    display: none;
}

/* Altura constante del header en escritorio y margen de desplazamiento de secciones */
@media (min-width: 769px) {
    .header {
        height: var(--header-height-desktop);
    }
    .header .container {
        min-height: var(--header-height-desktop);
    }
    .section {
        scroll-margin-top: calc(var(--header-height-desktop) + var(--spacing-sm));
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--dark-color);
    transition: all var(--transition-fast);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--dark-color);
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: none;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

/* Fondo de video para el hero */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-logo {
    margin-bottom: var(--spacing-lg);
    max-width: 100%;
}

.main-logo {
    width: 560px; /* +40% respecto a 400px */
    max-width: 90%;
    height: auto;
    /* Prueba: forzar el logo a blanco */
    filter: brightness(0) invert(1) drop-shadow(0 0 28px rgba(255, 255, 255, 0.85)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ===== Sobre Nosotros ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text h3 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.about-text h3:first-child {
    margin-top: 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.value-item {
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform var(--transition-fast);
}

.value-item:hover {
    transform: translateY(-5px);
}

.value-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* Imagen alternativa para valores (Profesionalismo) */
.value-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin: 0 auto var(--spacing-sm);
    display: block;
}

.value-item h4 {
    color: var(--dark-color);
    margin-bottom: var(--spacing-xs);
}

/* Variante con imagen de fondo para Profesionalismo */
.value-item--profesionalismo {
    background-image: url('../img/PROFESIONALISMO - Sobre nosotros.png');
}

.value-item--profesionalismo .value-overlay {}

.value-item--profesionalismo h4,
.value-item--profesionalismo p {}

.value-item--profesionalismo h4 {}

.value-item--profesionalismo p {}

.value-item--profesionalismo:hover {}

/* Variante con imagen de fondo para Compromiso */
.value-item--compromiso {
    background-image: url('../img/COMPROMISO- Sobre nosotros.png');
}

.value-item--compromiso .value-overlay {}

.value-item--compromiso h4,
.value-item--compromiso p {}

.value-item--compromiso h4 {}

.value-item--compromiso p {}

.value-item--compromiso:hover {}

/* ===== Servicios ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 5px 15px var(--shadow);
    text-align: center;
    transition: transform var(--transition-fast);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(30, 136, 229, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
}

.service-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    margin-bottom: var(--spacing-md);
    color: var(--gray-dark);
}

/* ===== Servicios en Filas ===== */
.services-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.service-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: stretch;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.service-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px var(--shadow);
}

.service-media {
    position: relative;
    min-height: 260px;
    max-height: 360px;
    overflow: hidden;
}

.service-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform var(--transition-fast);
}

.service-row:hover .service-media img {
    transform: scale(1.08);
}

.service-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-body h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.service-body p {
    margin-bottom: var(--spacing-sm);
}

/* Responsivo para servicios en filas */
@media (max-width: 992px) {
    .service-row {
        grid-template-columns: 1fr;
    }
    .service-media {
        min-height: 220px;
        max-height: none;
    }
}

/* ===== Por Qué Elegirnos ===== */
.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.why-us-image img {
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow);
}

/* Slideshow Por Qué Elegirnos */
.why-us-slideshow {
    position: relative;
    width: 100%;
    min-height: 624px; /* +30% adicional sobre 480px */
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.why-us-slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.why-us-slideshow img.active {
    opacity: 1;
}

/* Título sobre la foto (caption) - oculto por defecto, visible en móvil */
.why-us-caption {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    color: var(--white);
    font-weight: 600;
    text-align: left;
    background: rgba(0,0,0,0.75);
    z-index: 10;
}

.why-us-caption .caption-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.12rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.why-us-caption .caption-desc {
    margin-top: 6px;
    font-weight: 400;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.why-us-caption .caption-title i {
    color: var(--secondary-color);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.feature-item h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.2rem;
}

.feature-item p {
    color: var(--gray-dark);
}

/* Botón Enviar: animación al enviar */
.btn.btn-primary.is-sending {
    animation: sendPulse 0.9s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes sendPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.form-confirmation {
    margin-top: var(--spacing-sm);
    color: var(--secondary-color);
    font-weight: 600;
    display: none;
}

.form-confirmation.show {
    display: block;
}

/* Modal visor PDF */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show { display: flex; }

.modal-dialog {
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow);
    width: min(1100px, 95vw);
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.modal-toolbar {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
    background: rgba(255,255,255,0.9);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.4rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.modal-toolbar button {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-content {
    overflow: hidden;
    max-height: 85vh;
    cursor: grab;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dark-color);
}

/* Contenido del visor: imagen optimizada */
#pdfImage {
    width: 100%;
    height: auto;
    display: none;
    transform-origin: center center;
    will-change: transform;
}

.modal-content.dragging {
    cursor: grabbing;
    user-select: none;
}

/* Mejoras de modal en móviles: botón de cierre grande y visible */
@media (max-width: 768px) {
    .modal-dialog {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .modal-close {
        position: fixed;
        top: 12px;
        right: 12px;
        font-size: 2.4rem;
        color: #fff;
        background: rgba(0,0,0,0.35);
        border-radius: 6px;
        padding: 2px 8px;
        z-index: 1001;
    }
}

/* Sección Testimonios a pantalla completa */
#testimonios.section {
    min-height: 100vh;
}

/* ===== Testimonios ===== */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-item {
    padding: 0 var(--spacing-sm);
}

.testimonial-content {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 15px var(--shadow);
    position: relative;
    /* Fijar altura para evitar cambios de tamaño entre testimonios */
    min-height: 320px;
    max-height: 320px;
    overflow: hidden;
}

.testimonial-content::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50px;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    transform: rotate(45deg);
    box-shadow: 5px 5px 10px var(--shadow);
    z-index: -1;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    object-fit: cover;
}

.testimonial-author h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.testimonial-author p {
    margin-bottom: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-md);
    gap: var(--spacing-sm);
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ===== Galería ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

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

.gallery-overlay h3 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.gallery-overlay p {
    color: var(--gray-light);
    margin-bottom: 0;
}

/* ===== Blog ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.blog-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    display: block;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.blog-content h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.blog-content p {
    color: var(--gray-dark);
    margin-bottom: var(--spacing-md);
}

.blog-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Ensure the Read more/Lire plus link sticks to the bottom of the card */
.read-more-pdf {
    margin-top: auto;
}

/* ===== Contacto ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.contact-info {
    background-color: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.contact-item h3 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.contact-item p {
    margin-bottom: var(--spacing-xs);
}

.social-links {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-form-container {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 15px var(--shadow);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.map-container {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-color);
    color: var(--gray-light);
    padding: var(--spacing-lg) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo h2 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.footer-logo p {
    color: var(--gray);
}

.footer h3 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-links ul li a,
.footer-services ul li a {
    color: var(--gray);
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover,
.footer-services ul li a:hover {
    color: var(--white);
}

.newsletter-form {
    display: flex;
    margin-top: var(--spacing-sm);
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 1rem;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    transition: background-color var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-bottom-links a {
    color: var(--gray);
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* ===== Botón WhatsApp ===== */
.whatsapp-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transition: all var(--transition-fast);
}

.whatsapp-btn:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    color: var(--white);
}

.whatsapp-msg {
    position: fixed;
    bottom: 80px;
    right: 90px; /* colocada a la izquierda del botón */
    background: var(--white);
    color: var(--dark-color);
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    line-height: 1.2;
    z-index: 98; /* justo debajo del botón para evitar taparlo */
}

.whatsapp-msg p {
    margin: 0;
}

/* Mostrar y recolocar el mensaje en móviles */
@media (max-width: 480px) {
    .whatsapp-msg {
        display: block;
        right: 20px; /* alinear con el botón */
        bottom: 150px; /* encima del botón para que no tape */
        max-width: 80vw;
    }
}

/* ===== Botón Volver Arriba ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ===== Animaciones ===== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in:nth-child(2) {
    animation-delay: 0.3s;
}

.animate-fade-in:nth-child(3) {
    animation-delay: 0.6s;
}

/* ===== Media Queries ===== */
@media (max-width: 992px) {
    .about-content,
    .why-us-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .values-grid {
        margin-top: var(--spacing-md);
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    /* Mostrar caption del slideshow en móvil como overlay (igual que galería) */
    .why-us-caption {
        display: flex;
        position: absolute;
        inset: 0;
        padding: 14px 16px;
        color: var(--white);
        background: linear-gradient(transparent, rgba(0,0,0,0.45));
        flex-direction: column; /* título arriba, párrafo debajo */
        justify-content: flex-end;
        z-index: 5;
    }
    /* Ajuste de título y espaciado del caption en móvil */
    .why-us-caption .caption-title { font-size: 1.22rem; }
    .why-us-caption .caption-desc { margin-top: 8px; }
    /* Ocultar lista de features para no duplicar contenido en móvil */
    .why-us-features { display: none; }
    /* Mostrar siempre las descripciones de la Galería en móvil */
    .gallery-overlay { opacity: 1; }
    /* Ajuste tipográfico para legibilidad en móvil */
    .gallery-overlay h3 { font-size: 1.05rem; }
    .gallery-overlay p { font-size: 0.95rem; }
    /* Centrar logo en la cabecera y posicionar el menú hamburguesa a la derecha */
    .header .container {
        position: relative;
        justify-content: center;
        min-height: 64px; /* volver al tamaño de cabecera original */
        height: 64px; /* garantizar altura constante sin crecer por el logo */
    }
    .main-nav {
        position: relative;
        width: 100%;
    }
    /* Banderas a la izquierda en móvil, sin solapar el logo */
    .lang-switcher {
        position: absolute;
        left: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    /* Ajuste de logo en cabecera móvil sin aumentar altura total */
    .header-logo { height: 82px; width: auto; }
    .menu-toggle {
        position: absolute;
        right: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-md) 0;
        box-shadow: 0 5px 10px var(--shadow);
        transform: translateY(-150%);
        transition: transform var(--transition-fast);
        z-index: 999;
    }
    
    .nav-list.active {
        transform: translateY(0);
    }
    
    .nav-list li {
        margin: var(--spacing-xs) 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .service-card,
    .blog-card {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
.value-item--confianza {
    background-image: url('../img/CONFIANZA- Sobre nosotros.png');
}

.value-item--confianza .value-overlay {}

.value-item--confianza h4,
.value-item--confianza p {}

.value-item--confianza:hover {}
.value-item--excelencia {
    background-image: url('../img/EXCELENCIA- Sobre nosotros.png');
}

.value-item--excelencia .value-overlay {}

.value-item--excelencia h4,
.value-item--excelencia p {}

.value-item--excelencia:hover {}

/* Reglas comunes para las cuatro tarjetas de valores */
.value-item--profesionalismo,
.value-item--compromiso,
.value-item--confianza,
.value-item--excelencia {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px var(--shadow);
    transition: background-size var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.value-item--profesionalismo .value-overlay,
.value-item--compromiso .value-overlay,
.value-item--confianza .value-overlay,
.value-item--excelencia .value-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.30);
    border-radius: inherit;
}

.value-item--profesionalismo h4,
.value-item--profesionalismo p,
.value-item--compromiso h4,
.value-item--compromiso p,
.value-item--confianza h4,
.value-item--confianza p,
.value-item--excelencia h4,
.value-item--excelencia p {
    position: relative;
    z-index: 1;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.value-item--profesionalismo:hover,
.value-item--compromiso:hover,
.value-item--confianza:hover,
.value-item--excelencia:hover {
    background-size: 108%;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow);
}
.testimonial-rating {
    margin: 0.25rem 0 0.5rem;
}

.testimonial-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gray-light);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.testimonial-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* ===== Overrides móviles del header para evitar solapes ===== */
@media (max-width: 768px) {
    .header .container { min-height: 64px; }
    .main-nav {
        display: grid;
        grid-template-columns: auto 1fr auto; /* logo | separación | banderas */
        align-items: center;
        gap: var(--spacing-xs);
        width: 100%;
    }
    .lang-switcher {
        position: static;
        transform: none;
        z-index: auto;
        justify-self: end;
        grid-column: 3;
    }
    .lang-menu { gap: 6px; }
    /* Mantener banderas a tamaño cómodo en móvil (sin reducción) */
    .lang-flags img { width: 24px; height: 16px; }
    .logo { position: static; transform: none; justify-self: start; text-align: left; grid-column: 1; }
    /* Proporción del logo en móvil sin aumentar la altura del header */
    .header-logo { height: 82px; width: auto; }
    /* Ocultar el botón hamburguesa en móvil */
    .menu-toggle { display: none !important; }
    /* Ocultar el listado de páginas en móvil */
    .nav-list { display: none !important; }
    .hamburger,
    .hamburger::before,
    .hamburger::after { width: 20px; }
    .hamburger::before { top: -6px; }
    .hamburger::after { bottom: -6px; }
    /* Volver al espacio del héroe original */
    .hero { padding-top: 90px; }
    /* Restaurar encuadre del video como antes (llenar sin recortar centro visible) */
.hero-video video { object-fit: cover; object-position: center; }
}

/* Ocultar el mensaje de WhatsApp en móvil para ahorrar espacio */
@media (max-width: 768px) {
    .whatsapp-msg { display: none !important; }
}