/* ==========================================================================
   1. VARIABLES Y RESET
   ========================================================================== */
:root {
    --color-primary: #1F2937;  
    --color-primary-dark: #111827; 
    --color-accent: #059669;  
    --color-accent-hover: #047857;
    
    --color-text-main: #374151;
    --color-text-muted: #6B7280;
    --color-bg-light: #F3F4F6;
    --color-white: #FFFFFF;
    --color-border: #E5E7EB;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --transition-fast: 0.3s ease;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   2. UTILIDADES Y CONTENEDORES
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

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

.btn--primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.btn--outline-light {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

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

/* ==========================================================================
   3. TOP BAR
   ========================================================================== */
.top-bar {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__info a {
    color: #cbd5e1;
    margin-right: 20px;
}

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

.top-bar__info i {
    margin-right: 5px;
    color: var(--color-accent);
}

.top-bar__social a {
    color: #cbd5e1;
    margin-left: 15px;
}

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

/* ==========================================================================
   4. HEADER Y MEGA-MENÚ (CORREGIDO)
   ========================================================================== */
.header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding var(--transition-fast);
}

.header.sticky {
    padding: 5px 0;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    position: relative; 
}

.logo img {
    height: 65px;
    object-fit: contain;
}

.nav, .nav__list {
    height: 100%;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav__item {
    height: 100%;
    display: flex;
    align-items: center;
    position: static; 
}

.nav__link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    height: 100%; 
    transition: var(--transition-fast);
}

.nav__link.btn {
    height: auto;           
    display: inline-block;
    color: var(--color-white) !important;
}

.nav__link:hover, .nav__link.active {
    color: var(--color-accent);
}

.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 100%;
    max-width: 900px;
    background-color: var(--color-white);
    box-shadow: var(--shadow-heavy);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--color-accent);
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 1000;
}

.mega-menu__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mega-menu__title {
    font-size: 1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

.mega-menu__column a {
    display: block;
    padding: 8px 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.mega-menu__column a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   ACTUALIZACIÓN RESPONSIVE (Debe ir dentro de tu bloque @media max-width 992px)
   ========================================================================== */
@media (max-width: 992px) {
    .nav {
        position: absolute;
        top: 90px;
        left: -100%;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: var(--shadow-light);
        transition: var(--transition-fast);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
    
    .nav.active { left: 0; }
    
    .nav__list {
        flex-direction: column;
        gap: 0;
        height: auto; 
    }
    
    .nav__item {
        width: 100%;
        height: auto; 
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav__link {
        height: auto; 
        padding: 15px 20px;
    }

    .mega-menu {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none;
        padding: 10px 20px;
        background-color: var(--color-bg-light);
    }
    
    .has-dropdown.active .mega-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .mega-menu__container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    height: calc(100vh - 130px);
    min-height: 500px;
    display: flex;
    align-items: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero__video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10,37,64,0.9) 0%, rgba(10,37,64,0.5) 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero__subtitle {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.hero__title {
    color: var(--color-white);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero__text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e2e8f0;
}

.hero__buttons {
    display: flex;
    gap: 15px;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
    background-color: #f8fafc;
    color: #475569;
    padding-top: 80px;
    padding-bottom: 0;
    border-top: 1px solid #e2e8f0;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
}

.footer__logo {
    height: 65px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.footer__col p {
    color: #64748b;
    line-height: 1.7;
}

.footer__col h3 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 12px;
}

.footer__col h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.footer__col ul li {
    margin-bottom: 12px;
}

.footer__col ul a {
    color: #64748b;
    transition: var(--transition-fast);
}

.footer__col ul a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.footer__contact i {
    color: var(--color-accent);
    width: 20px;
    margin-right: 8px;
    margin-top: 3px;
}

.footer__contact a {
    color: #64748b;
}

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

.footer__bottom {
    background-color: var(--color-primary);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   7. WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: var(--transition-fast);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

/* --- Tablet: <= 992px --- */
@media (max-width: 992px) {
    .top-bar { display: none; }
    .menu-toggle { display: block; }

    .hero { height: auto; min-height: 400px; padding: 60px 0; }
    .hero__title { font-size: 2.5rem; }
    .hero__text { font-size: 1.05rem; }

    .section-padding { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }

    .footer__container { grid-template-columns: 1fr; gap: 35px; }

    .service-card {
        flex: 0 1 calc(50% - 15px);
        max-width: calc(50% - 15px);
        min-width: 0;
    }

    .blog-card {
        flex: 0 1 calc(50% - 20px);
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .hero__title { font-size: 2rem; }
    .hero__subtitle { font-size: 0.8rem; letter-spacing: 1px; }
    .hero__text { font-size: 1rem; }
    .hero__buttons { flex-wrap: wrap; }
    .hero__buttons .btn { width: 100%; text-align: center; }

    .service-card {
        flex: 0 1 100%;
        max-width: 100%;
    }

    .blog-card {
        flex: 0 1 100%;
    }

    .about-preview__badge {
        left: 15px;
        bottom: -15px;
        padding: 15px 20px;
    }
    .badge-number { font-size: 1.8rem; }
    .badge-text { font-size: 0.7rem; }

    .page-banner { height: 200px; }
    .page-banner__title { font-size: 1.8rem; }

    .post-title { font-size: 1.6rem; }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .cta-section { padding: 40px 15px 60px; }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .footer { padding-top: 50px; }
    .footer__col h3 { font-size: 1rem; }
}

@media (max-width: 576px) {
    .container { padding: 0 15px; }

    .section-padding { padding: 40px 0; }
    .section-title { font-size: 1.5rem; }
    .section-desc { font-size: 0.95rem; }

    .hero { min-height: 350px; padding: 40px 0; }
    .hero__title { font-size: 1.6rem; }
    .hero__text { font-size: 0.9rem; margin-bottom: 20px; }

    .about-preview__grid { gap: 30px; }

    .service-card__content { padding: 20px; }
    .service-card__img { height: 180px; }
    .service-card__title { font-size: 1.1rem; }

    .cta-card { padding: 30px 20px; gap: 20px; border-radius: 12px; }
    .cta-card__icon { width: 60px; height: 60px; }
    .cta-card__icon i { font-size: 1.5rem; }
    .cta-card__text h2 { font-size: 1.15rem; }
    .cta-card__text p { font-size: 0.9rem; }
    .cta-card__action .btn { padding: 12px 24px; font-size: 0.9rem; }

    .blog-card__content { padding: 20px; }
    .blog-card__img { height: 180px; }

    .post-body { font-size: 1rem; }
    .post-body h3 { font-size: 1.3rem; }
    .post-body blockquote { font-size: 1.1rem; padding: 15px; }
    .post-share { flex-wrap: wrap; }

    .page-banner { height: 160px; }
    .page-banner__title { font-size: 1.5rem; }
    .breadcrumbs { font-size: 0.85rem; }

    .about-page__images { min-height: 280px; }

    .clients-track img {
        width: 120px;
        max-height: 60px;
        margin: 0 15px;
    }

    .btn { padding: 10px 22px; font-size: 0.9rem; }
}

/* ==========================================================================
   9. UTILIDADES Y CLASES REUTILIZABLES
   ========================================================================== */
.section-padding {
    padding: 80px 0;
}

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

.text-center {
    text-align: center;
}

.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.section-subtitle {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.section-desc {
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* ==========================================================================
   10. SECCIÓN: ABOUT PREVIEW
   ========================================================================== */
.about-preview__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-preview__list {
    margin-top: 20px;
}

.about-preview__list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--color-text-main);
    font-weight: 500;
}

.about-preview__list i {
    color: var(--color-accent);
    margin-right: 15px;
    font-size: 1.2rem;
}

.about-preview__image {
    position: relative;
    border-radius: 8px;
}

.about-preview__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
}

.about-preview__badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #047857 100%);
    color: var(--color-white);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3), 0 0 0 5px rgba(255, 255, 255, 0.9);
    text-align: center;
}

.badge-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1;
}

.badge-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    display: block;
}

/* ==========================================================================
   11. SECCIÓN: SERVICIOS (GRID CARDS)
   ========================================================================== */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-fast);
    border: 1px solid var(--color-border);
    flex: 0 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    min-width: 300px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--color-accent);
}

.service-card__img {
    height: 220px;
    overflow: hidden;
}

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

.service-card:hover .service-card__img img {
    transform: scale(1.05);
}

.service-card__content {
    padding: 30px;
}

.service-card__title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card__text {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.service-card__link {
    color: var(--color-accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-card__link:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   12. SECCIÓN: CLIENTES (CARRUSEL)
   ========================================================================== */
.clients-carousel {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
    position: relative;
}

.clients-carousel::before,
.clients-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.clients-carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.clients-carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.clients-track {
    display: flex;
    align-items: center;
    width: calc(200px * 14); 
    animation: scrollCarousel 30s linear infinite;
}

.clients-track img {
    width: 160px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    margin: 0 30px;
    filter: grayscale(100%); 
    opacity: 0.7;
    transition: var(--transition-fast);
}

.clients-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 7)); }
}

/* ==========================================================================
   13. SECCIÓN: CTA (Llamado a la acción)
   ========================================================================== */
.cta-section {
    padding: 60px 20px 80px;
    position: relative;
}

.cta-card {
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    border-radius: 20px;
    padding: 50px 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.cta-card::before {
    content: "";
    position: absolute;
    top: -50%; right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.cta-card::after {
    content: "";
    position: absolute;
    bottom: -30%; left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.cta-card__icon {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.cta-card__icon i {
    font-size: 2.2rem;
    color: var(--color-white);
}

.cta-card__text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.cta-card__text h2 {
    color: var(--color-white);
    margin-bottom: 8px;
    font-size: 1.6rem;
}

.cta-card__text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.5;
}

.cta-card__action {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.cta-card__action .btn {
    background: var(--color-white);
    color: var(--color-primary);
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}

.cta-card__action .btn:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

@media (max-width: 768px) {
    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
        gap: 25px;
    }

    .cta-card__text h2 {
        font-size: 1.35rem;
    }
}

/* ==========================================================================
   14. RESPONSIVE ADICIONAL (ABOUT, SERVICIOS INTERNOS)
   ========================================================================== */
@media (max-width: 992px) {
    .about-preview__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-preview__badge {
        left: 20px;
        bottom: -20px;
        padding: 20px;
    }

    .badge-number { font-size: 2rem; }
}

/* ==========================================================================
   15. PAGE BANNER (Encabezado para páginas internas)
   ========================================================================== */
.page-banner {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
    background-color: var(--color-primary-dark);
}

.page-banner__bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.page-banner__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-banner__overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(5, 150, 105, 0.75) 100%);
}

.page-banner__content {
    position: relative;
    z-index: 2;
}

.page-banner__title {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumbs {
    font-size: 0.95rem;
    font-weight: 500;
}

.breadcrumbs a {
    color: #e5e7eb;
}

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

.breadcrumbs span {
    margin: 0 8px;
    color: var(--color-accent);
}

.breadcrumbs .current {
    color: var(--color-accent);
    font-weight: 600;
}

/* ==========================================================================
   16. PÁGINA NOSOTROS: CONTENIDO Y COMPOSICIÓN DE IMÁGENES
   ========================================================================== */
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.about-page__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-page__text h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.about-page__images {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.about-page__images img {
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    position: absolute;
    transition: var(--transition-fast);
}

.img-main {
    width: 75%;
    top: 0;
    right: 0;
    z-index: 1;
}

.img-sub {
    width: 60%;
    bottom: -20px;
    left: 0;
    z-index: 2;
    border: 10px solid var(--color-white);
}

.about-page__images:hover .img-main { transform: translateY(-5px); }
.about-page__images:hover .img-sub { transform: translateY(-5px) scale(1.02); }

/* ==========================================================================
   17. PÁGINA NOSOTROS: VALORES (GRID DE TARJETAS)
   ========================================================================== */
.vision-container {
    max-width: 800px;
    margin: 0 auto;
}

.values-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.value-card {
    background-color: var(--color-white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition-fast);
    flex: 0 1 180px;
    max-width: 200px;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-bottom-color: var(--color-accent);
}

.value-card i {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 15px;
    display: block;
}

.value-card h4 {
    font-size: 1rem;
    color: var(--color-primary);
    margin: 0;
}

@media (max-width: 992px) {
    .page-banner { height: 250px; }
    .page-banner__title { font-size: 2.2rem; }
    
    .about-page__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-page__images {
        min-height: 350px;
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .values-grid {
        justify-content: center;  
    }
    .value-card {
        flex: 0 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

/* ==========================================================================
   18. PLANTILLAS DE SERVICIOS (CONTENIDO Y SIDEBAR)
   ========================================================================== */
.mb-5 { margin-bottom: 3rem; }

.service-layout__grid {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 50px;
    align-items: start;
}

.service-content {
    color: var(--color-text-main);
}

.service-content__main-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
}

.service-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
}

.lead {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.check-list li i {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--color-accent);
    font-size: 1.2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border: 3px solid var(--color-white);
}

.service-sidebar {
    position: sticky;
    top: 120px; 
}

.sidebar-widget {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--color-border);
}

.sidebar-widget__title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid var(--color-border);
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 12px 0;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--color-accent);
    padding-left: 10px;
}

.sidebar-cta {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-heavy);
}

.sidebar-cta__icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.sidebar-cta h4 {
    color: var(--color-white);
    margin-bottom: 15px;
}

.sidebar-cta p {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.sidebar-cta__phone {
    margin-top: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-accent);
}

@media (max-width: 992px) {
    .service-layout__grid {
        grid-template-columns: 1fr; 
    }

    .service-sidebar {
        position: static; 
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   19. PÁGINA DE CONTACTO (Formulario e Información)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: start;
}

.text-muted {
    color: var(--color-text-muted);
}

.w-100 {
    width: 100%;
}

.contact-form {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    border-top: 4px solid var(--color-accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2); 
    background-color: var(--color-white);
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: center;
    background-color: var(--color-white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--color-border);
}

.info-card__icon {
    width: 50px;
    height: 50px;
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.info-card__content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-card__content p, 
.info-card__content a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

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

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

/* ==========================================================================
   20. PÁGINA DE CLIENTES (Logo Grid)
   ========================================================================== */
.clients-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.client-box {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 35px;
    height: 170px;
    flex: 0 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-light);
}

.client-box img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition-fast);
}

.client-box:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-heavy);
    transform: translateY(-5px);
}

.client-box:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .clients-logo-grid {
        gap: 15px;
    }
    
    .client-box {
        flex: 0 1 calc(50% - 15px);
        padding: 15px;
        height: 100px;
    }
}

/* ==========================================================================
   21. BLOG GRID E ÍNDICE
   ========================================================================== */
.blog-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.blog-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--color-border);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    flex: 0 1 calc(33.333% - 27px);
    min-width: 300px;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.blog-card__img {
    position: relative;
    height: 220px;
    display: block;
    overflow: hidden;
}

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

.blog-card:hover .blog-card__img img {
    transform: scale(1.05);
}

.blog-card__tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
}

.blog-card__content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.blog-card__meta i {
    color: var(--color-accent);
    margin-right: 5px;
}

.blog-card__title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.blog-card__excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card__link {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}

.blog-card__link:hover {
    color: var(--color-primary);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 4px;
}

.page-numbers:hover, .page-numbers.current {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

/* ==========================================================================
   22. PLANTILLA DE ARTÍCULO (SINGLE POST)
   ========================================================================== */
.post-layout__grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr; 
    gap: 60px;
    align-items: start;
}

.post-header {
    margin-bottom: 30px;
}

.post-header .blog-card__tag {
    position: static;
    display: inline-block;
    margin-bottom: 15px;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 20px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.post-meta i {
    color: var(--color-accent);
}

.post-featured-img {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.post-featured-img img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.post-body {
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.post-body p { margin-bottom: 20px; }

.post-body h3 {
    font-size: 1.6rem;
    margin: 40px 0 20px 0;
}

.post-body ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.post-body ul li { margin-bottom: 10px; }

.post-body blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding: 20px;
    background-color: var(--color-bg-light);
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-weight: 600;
}

.share-btn {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--color-white);
}

.share-btn.facebook { background-color: #3b5998; }
.share-btn.linkedin { background-color: #0077b5; }
.share-btn.twitter { background-color: #1da1f2; }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}

.recent-posts-list {
    list-style: none;
    padding: 0;
}

.recent-posts-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.recent-posts-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts-list a {
    display: block;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 5px;
    line-height: 1.4;
}

.recent-posts-list a:hover {
    color: var(--color-accent);
}

.recent-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.post-images {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.post-images img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 0.75rem;
    color: var(--color-primary-dark, #1a5276);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 2rem;
}

.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1a2e;
}

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

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.video-placeholder__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s;
}

.video-placeholder__link:hover {
    transform: scale(1.1);
}

.video-placeholder__link i {
    font-size: 3rem;
    color: #ff0000;
}

.video-placeholder__link span {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.video-card__content {
    padding: 1.5rem;
}

.video-card__content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--color-heading, #1a1a2e);
    line-height: 1.4;
}

.video-card__content p {
    font-size: 0.9rem;
    color: var(--color-text-muted, #666);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .post-layout__grid {
        grid-template-columns: 1fr;
    }
    
    .post-title { font-size: 2rem; }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
}