/* =========================================
   VARIABLES PANTONE Y RESET
   ========================================= */
:root {
    --pantone-7474c: #007481;
    --pantone-320c: #0099a8;
    --pantone-628c: #b6dce1;
    --pantone-424c: #6f7271;
    --pantone-427c: #cfd2d3;
    --pantone-1235c: #ffb71b;
    --white: #ffffff;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--pantone-424c);
    background-color: #000;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 40px;
}

/* =========================================
   TIPOGRAFÍA E ICONOS
   ========================================= */
@font-face {
    font-family: 'icomoon';
    src:  url('fonts/icomoon.eot?urpejw');
    src:  url('fonts/icomoon.eot?urpejw#iefix') format('embedded-opentype'),
          url('fonts/icomoon.ttf?urpejw') format('truetype'),
          url('fonts/icomoon.woff?urpejw') format('woff'),
          url('fonts/icomoon.svg?urpejw#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="icon-"], [class*=" icon-"] {
    font-family: 'icomoon' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon-Close:before { content: "\e900"; }
.icon-Contact:before { content: "\e901"; }
.icon-estrategia:before { content: "\e903"; }
.icon-gestion:before { content: "\e904"; }
.icon-home:before { content: "\e905"; }
.icon-TD:before { content: "\e906"; }
.icon-tiktok:before { content: "\e907"; }
.icon-location:before { content: "\e947"; }
.icon-user:before { content: "\e971"; }
.icon-youtube:before { content: "\ea9d"; }
.icon-linkedin2:before { content: "\eaca"; }

/* =========================================
   ESTILOS COMPARTIDOS (Top Bar, Nav, Footer)
   ========================================= */
.lang-switcher {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 3px 8px;
    margin-right: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    transition: border-color 0.3s;
}

.lang-switcher:hover { border-color: var(--pantone-320c); }
.lang-option { cursor: pointer; opacity: 0.5; transition: opacity 0.3s, color 0.3s; }
.lang-option:hover { opacity: 0.8; }
.lang-option.active { opacity: 1; color: var(--pantone-320c); }
.lang-separator { margin: 0 6px; opacity: 0.3; cursor: default; }

.social-links { display: flex; gap: 15px; }
.social-links a, .mobile-social a {
    color: var(--white);
    font-size: 1.5rem;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}
.social-links a:hover, .mobile-social a:hover {
    color: var(--pantone-320c);
    transform: translateY(-4px) scale(1.25);
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 105px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 30px;
}

.top-bar .logo img {
    height: 60px;
    transition: transform 0.3s ease;
}

.top-bar .logo img:hover { transform: scale(1.03); }

.main-footer {
    background-color: var(--pantone-7474c);
    padding: 60px 0 20px;
    color: var(--white);
}

.footer-grid { display: grid; align-items: start; margin-bottom: 40px; }
.brand-col p { margin-bottom: 30px; margin-top: 10px; line-height: 1.4; color: var(--white); }

.iframe-container {
    visibility: visible;
    position: relative;
    width: 100%;
    padding-bottom: 65%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.map-text p { margin: 0 0 5px 0; font-size: 0.9rem; line-height: 1.4; color: var(--pantone-427c); }
.map-text p:last-child { margin-bottom: 20px; }

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }

.btn-primary {
    display: inline-block;
    background-color: var(--pantone-424c);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
    border: none;
}
.btn-primary:hover {
    background-color: var(--pantone-320c);
    transform: translateY(-2px);
}

/* =========================================
   PÁGINAS INTERIORES: SPLIT SECTION
   ========================================= */
.int-split-section {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100vw;
    background-color: var(--white);
    position: relative;
}

.int-visual-side { position: relative; width: 100%; height: 50vh; overflow: hidden; }
.int-bg-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; visibility: hidden; transition: opacity 0.8s ease-in-out; z-index: 1;
}
.int-bg-image.active { opacity: 1; visibility: visible; z-index: 2; }
.int-bg-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.int-visual-button { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; }

.int-content-side { width: 100%; padding: 40px 20px; background-color: var(--white); display: flex; flex-direction: column; justify-content: center; }
.int-text-header { margin-bottom: 30px; }
.int-main-title { font-size: 2rem; color: var(--pantone-320c); font-weight: 800; display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.int-main-title i { font-size: 2.5rem; }
.int-subtitle { font-size: 1.5rem; color: var(--pantone-7474c); font-weight: 700; margin-bottom: 15px; }
.int-description { font-size: 1rem; color: var(--pantone-424c); line-height: 1.6; margin-bottom: 15px; }
.int-services-title { font-size: 1.2rem; color: var(--pantone-7474c); margin-top: 30px; margin-bottom: 20px; }

/* =========================================
   TARJETAS INTERIORES 3D (FLIP)
   ========================================= */
.int-cards-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.int-card {
    background-color: transparent;
    perspective: 1000px;
    cursor: pointer;
    height: 350px;
    width: 100%;
}
.int-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 12px;
}
.int-card.flipped .int-card-inner { transform: rotateY(180deg); }

.int-card-front, .int-card-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 12px; overflow: hidden;
}

.int-card-front {
    background-color: var(--pantone-427c); color: var(--pantone-7474c);
    display: flex; flex-direction: column; transition: background-color 0.4s ease, color 0.4s ease;
}
.int-card-front img { width: 100%; height: 65%; object-fit: cover; }
.int-card-front h4 { height: 35%; display: flex; align-items: center; justify-content: center; padding: 10px; font-size: 1.1rem; font-weight: 700; }

.int-card-back {
    background-color: var(--pantone-320c); color: var(--white);
    transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; padding: 20px;
}
.int-card-back h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.int-card-back p { font-size: 0.85rem; line-height: 1.4; margin-bottom: 15px; }


/* =========================================
   ESTILOS DEL POP-UP (MODAL B2B ORIGINAL)
   ========================================= */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.8); display: flex; align-items: center;
    justify-content: center; z-index: 9999; opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease; backdrop-filter: blur(5px);
}
.popup-overlay.show { opacity: 1; visibility: visible; }
.popup-content {
    background-color: var(--white); width: 95%; max-width: 900px;
    padding: 40px; border-radius: 12px; position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); transform: translateY(-20px);
    transition: transform 0.4s ease; max-height: 90vh; overflow-y: auto;
}
.popup-overlay.show .popup-content { transform: translateY(0); }
.popup-close-btn {
    position: absolute; top: 15px; right: 15px; background: none;
    border: none; font-size: 1.5rem; color: var(--pantone-424c);
    cursor: pointer; transition: color 0.3s ease;
}
.popup-close-btn:hover { color: var(--pantone-320c); }
.popup-header-split { display: flex; flex-direction: column; gap: 30px; margin-bottom: 30px; }
.popup-header-text { flex: 1; text-align: left; }
.popup-logo { height: 50px; margin-bottom: 15px; }
.popup-title { font-size: 1.8rem; color: var(--pantone-7474c); font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.popup-desc { font-size: 0.95rem; color: var(--pantone-424c); line-height: 1.5; }
.popup-video-box {
    flex: 1; background-color: #000; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; min-height: 200px;
}
.video-placeholder { text-align: center; }
.popup-form { display: flex; flex-direction: column; gap: 20px; }
.popup-inputs-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; text-align: left; }
.form-group label { font-size: 0.85rem; color: var(--pantone-424c); margin-bottom: 5px; font-weight: 600; }
.form-group input {
    width: 100%; padding: 12px 15px; border: 1px solid var(--pantone-427c);
    border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 0.95rem;
    color: var(--pantone-424c); background-color: var(--white); transition: border-color 0.3s ease;
}
.form-group input:focus { outline: none; border-color: var(--pantone-320c); }
.popup-req-section { text-align: left; margin-top: 10px; }
.req-title { display: block; font-size: 0.9rem; color: var(--pantone-7474c); font-weight: 700; margin-bottom: 15px; }
.popup-checkbox-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.check-container {
    display: block; position: relative; padding-left: 28px; cursor: pointer;
    font-size: 0.85rem; color: var(--pantone-424c); user-select: none;
}
.check-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
    position: absolute; top: 0; left: 0; height: 18px; width: 18px;
    background-color: #fff; border: 1px solid var(--pantone-427c);
    border-radius: 4px; transition: background-color 0.2s;
}
.check-container:hover input ~ .checkmark { background-color: #f1f1f1; }
.check-container input:checked ~ .checkmark { background-color: var(--pantone-320c); border-color: var(--pantone-320c); }
.checkmark:after { content: ""; position: absolute; display: none; }
.check-container input:checked ~ .checkmark:after { display: block; }
.check-container .checkmark:after {
    left: 6px; top: 2px; width: 5px; height: 10px; border: solid white;
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.popup-submit-wrapper { text-align: center; margin-top: 15px; overflow: hidden; }
.popup-submit-wrapper .btn-primary { padding: 12px 40px; font-size: 1rem; background-color: var(--pantone-320c); }
.popup-submit-wrapper .btn-primary:hover { background-color: var(--pantone-7474c); }


/* =========================================
   CONTACTO: FORMULARIO B2B ESTÁTICO (NUEVO)
   ========================================= */
.contact-header-split { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.contact-header-text { display: flex; align-items: center; gap: 15px; }
.contact-logo { height: 40px; }
.contact-title { font-size: 1.4rem; color: var(--pantone-320c); font-weight: 800; line-height: 1.1; }

.youtube-rect-btn {
    display: flex; align-items: center; gap: 10px; background-color: #000;
    padding: 8px 18px; border-radius: 8px; text-decoration: none; transition: transform 0.3s ease;
}
.youtube-rect-btn:hover { transform: scale(1.05); }
.youtube-rect-btn i { font-size: 1.5rem; }
.youtube-rect-btn span { color: var(--white); font-size: 0.7rem; font-weight: 600; line-height: 1.2; text-align: left; }

.contact-desc { font-size: 0.8rem; color: var(--pantone-424c); margin-bottom: 20px; line-height: 1.4; }

.contact-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 25px; }
.contact-inputs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.contact-req-section { display: flex; gap: 15px; align-items: flex-start; }
.req-title-wrapper { width: 25%; }
.contact-checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 75%; }
.contact-submit-wrapper { text-align: right; margin-top: 5px; }
.contact-submit-wrapper .btn-primary { padding: 12px 40px; font-size: 1rem; background-color: var(--pantone-320c); }
.contact-submit-wrapper .btn-primary:hover { background-color: var(--pantone-7474c); }

.btn-cita {
    display: inline-block; background-color: var(--pantone-7474c); color: var(--white);
    padding: 8px 18px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; transition: background 0.3s; text-decoration: none;
}
.btn-cita:hover { background-color: var(--pantone-424c); }

/* =========================================
   MOBILE RESPONSIVE (< 767px)
   ========================================= */
@media (max-width: 767px) {
    .desktop-only { display: none !important; }
    
    .mobile-top-bar {
        position: fixed; top: 0; left: 0; width: 100%; height: 70px;
        background-color: var(--pantone-424c); z-index: 1000; display: flex;
        align-items: center; justify-content: space-between; padding: 0 15px;
    }
    .mobile-logo { display: flex; justify-content: flex-start; flex: 1; padding-left: 5px; }
    .mobile-logo img { height: 35px; }
    .mobile-social { display: flex; gap: 12px; }
    
    .menu-toggle { background: none; border: none; width: 40px; height: 40px; position: relative; color: var(--white); cursor: pointer; z-index: 2; }
    .trigger-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(0deg); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
    .trigger-icon.logo-state { width: 35px; opacity: 1; }
    .trigger-icon.close-state { font-size: 1.5rem; opacity: 0; transform: translate(-50%, -50%) rotate(-180deg); }
    .nav-container.active ~ .mobile-top-bar .trigger-icon.logo-state, .nav-container.active .trigger-icon.logo-state { opacity: 0; transform: translate(-50%, -50%) rotate(180deg); }
    .nav-container.active ~ .mobile-top-bar .trigger-icon.close-state, .nav-container.active .trigger-icon.close-state { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }

    .nav-container { position: fixed; top: 70px; left: 0; width: 100%; height: 0; background: var(--pantone-320c); z-index: 999; overflow: hidden; transition: height 0.4s ease; }
    .nav-container.active { height: calc(100vh - 70px); }
    .nav-list { padding: 0; margin-top: 10px; }
    .nav-list li a { display: flex; align-items: center; padding: 18px 25px; color: var(--white); font-size: 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.1); transition: background-color 0.3s ease, padding-left 0.3s ease; }
    .nav-list li a:hover, .nav-list li a:active { background-color: var(--pantone-7474c); padding-left: 35px; }
    .nav-list li a i { font-size: 1.5rem; margin-right: 15px; transition: transform 0.3s ease; }
    .nav-list li a:hover i { transform: scale(1.2); }

    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .brand-col { display: flex; flex-direction: column; align-items: center; }
    .footer-logo { height: 70px; margin-bottom: 15px; }
    .links-col ul { padding: 0; }
    .links-col ul li { margin-bottom: 12px; font-size: 1rem; }
    
    .map-card { max-width: 300px; margin: 0 auto; }
    .map-info { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; gap: 8px; }
    .map-info i { margin-top: 0; margin-bottom: 4px; font-size: 1.6rem; color: var(--pantone-320c); }
    .map-text p { text-align: center; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 20px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.2); }

    /* Modificaciones Contacto Móvil */
    .contact-header-split { flex-direction: column; align-items: flex-start; gap: 15px; }
    .contact-inputs-grid { grid-template-columns: 1fr; }
    .contact-req-section { flex-direction: column; gap: 10px; }
    .req-title-wrapper { width: 100%; }
    .contact-checkbox-grid { grid-template-columns: 1fr; width: 100%; }
    .int-split-section { height: auto; }
    .int-card { height: 350px; } /* Tarjetas casi cuadradas en móvil */
}

/* =========================================
   DESKTOP RESPONSIVE (min-width: 768px)
   ========================================= */
@media (min-width: 768px) {
    .mobile-only { display: none !important; }

    .nav-container {
        position: fixed; top: 50%; left: 30px; transform: translateY(-50%);
        width: 60px; height: 60px; border-radius: 30px; background-color: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center;
        z-index: 1000; overflow: visible; transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .nav-container.active { height: 400px; }
    .nav-header { height: 60px; width: 100%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
    .menu-toggle { background: none; border: none; width: 40px; height: 40px; position: relative; cursor: pointer; }
    
    .trigger-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(0deg); transition: opacity 0.3s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
    .trigger-icon.logo-state { width: 50px; opacity: 1; }
    .trigger-icon.close-state { font-size: 2rem; color: var(--pantone-320c); opacity: 0; transform: translate(-50%, -50%) rotate(-180deg); }
    .nav-container.active .trigger-icon.logo-state { opacity: 0; transform: translate(-50%, -50%) rotate(180deg); }
    .nav-container.active .trigger-icon.close-state { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }

    .menu-wrapper { width: 100%; flex-grow: 1; opacity: 0; visibility: hidden; transition: opacity 0.2s; overflow: visible; }
    .nav-container.active .menu-wrapper { opacity: 1; visibility: visible; }
    
    .nav-list { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; height: 100%; padding: 10px 0; overflow: visible; }
    .nav-list li { width: 100%; position: relative; overflow: visible; }
    .nav-list li a { display: flex; justify-content: center; align-items: center; height: 50px; width: 100%; color: var(--pantone-7474c); transition: color 0.3s; }
    .nav-list li a i { font-size: 28px; }
    .nav-list li a:hover { color: var(--pantone-320c); }

    .nav-list li a .label {
        position: absolute; left: 70px; top: 50%; transform: translateY(-50%);
        background-color: var(--pantone-320c); color: var(--white);
        padding: 8px 15px; border-radius: 5px; font-size: 0.85rem; font-weight: 600;
        white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.3s ease; box-shadow: 2px 2px 8px rgba(0,0,0,0.15); pointer-events: none;
    }
    .nav-list li a .label::before {
        content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%);
        border-right: 5px solid var(--pantone-320c); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    }
    .nav-container.active .nav-list li a:hover .label { opacity: 1; visibility: visible; left: 75px; }

    /* SPLIT SECTION DESKTOP (CONTACTO INCLUIDO) */
    .int-split-section { flex-direction: row; height: 100vh; overflow: hidden; }
    .int-visual-side { width: 50%; height: 100%; }
    
    .int-content-side { 
        width: 50%; height: 100%; overflow-y: auto; 
        padding: 100px 60px 20px 40px; /* Esquivar el menú sticky y ajustarse en 100vh */
        display: flex; flex-direction: column; justify-content: center;
    }
    
    .int-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .int-card { min-height: 220px; } /* Altura reducida para encajar con el formulario */

    /* POP-UP DESKTOP GRID RESTAURATION */
    .popup-header-split { flex-direction: row; align-items: center; }
    .popup-inputs-grid { grid-template-columns: 1fr 1fr; }
    .popup-checkbox-grid { grid-template-columns: 1fr 1fr; }
    .popup-submit-wrapper { text-align: right; }

    .footer-grid { grid-template-columns: 1.1fr 1fr 1.5fr 1.5fr; gap: 30px; margin-bottom: 40px; }
    .brand-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .links-col { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
    .footer-logo { height: 120px; margin-bottom: 15px; }
    .links-col ul li { margin-bottom: 20px; font-size: 1rem; }
    .links-col ul li a:hover { color: var(--pantone-1235c); }
    .map-info { display: flex; gap: 12px; font-size: 0.85rem; align-items: center; margin-top: 15px; }
    .map-info p { margin: 0; line-height: 1.4; }
    .map-info i { font-size: 1.2rem; color: var(--pantone-320c); margin-top: 0; }
    .footer-bottom { display: flex; justify-content: space-between; font-size: 0.8rem; opacity: 0.7; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; }
}