/* ============================================
   AGENCIA KASO - ESTILOS PRINCIPALES
   Paleta Pantone AK: #F691F5, #4EB7CC, #6EDAF0, #9FE7F5
   Actualizado con mejoras UX/UI
   ============================================ */

/* Importar fuente Avenir Black */
@font-face {
    font-family: 'Avenir Black';
    src: url('../fonts/Avenir_Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #F691F5;
    --color-secondary: #4EB7CC;
    --color-accent1: #6EDAF0;
    --color-accent2: #9FE7F5;
    --color-white: #FFFFFF;
    --color-dark: #2C3E50;
    --color-text: #333333;
    --color-text-light: #666666;
    /* Color rosa coral vibrante para CTAs */
    --color-cta: #FF5A7C;
    --color-cta-hover: #E54A6A;
    --gradient-main: linear-gradient(135deg, #F691F5 0%, #6EDAF0 100%);
    --gradient-cta: linear-gradient(135deg, #FF5A7C 0%, #FF7A95 100%);
    --gradient-soft: linear-gradient(135deg, rgba(246, 145, 245, 0.1) 0%, rgba(110, 218, 240, 0.1) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-cta: 0 4px 20px rgba(255, 90, 124, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Tipografía - AUMENTADA */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Avenir Black', sans-serif;
    font-weight: 900;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin-bottom: 1.25rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.625rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    margin-bottom: 0.875rem;
}

/* Párrafos - AUMENTADOS y justificados */
p {
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    color: var(--color-text);
    text-align: justify;
}

/* Excepciones para centrado */
.text-center p,
.section-title p,
.hero-content p,
.section-subtitle {
    text-align: center;
}

/* Contenedores */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Header / Navegación - MEJORADO con mejor contraste */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(44, 62, 80, 0.98);
    box-shadow: var(--shadow-md);
}

.header.scrolled .nav-menu li a {
    color: var(--color-white);
}

.header.scrolled .nav-menu li a:hover {
    color: var(--color-cta);
}

.header.scrolled .menu-toggle span {
    background: var(--color-white);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-cta);
    transition: width 0.3s ease;
}

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

.nav-menu li a:hover {
    color: var(--color-cta);
}

/* Botón CTA en header - ESTILO PÍLDORA DESTACADO */
.btn-header-cta {
    background: var(--gradient-cta);
    color: var(--color-white);
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-cta);
    border: none;
    cursor: pointer;
    font-family: 'Avenir Black', sans-serif;
    font-size: 0.95rem;
}

.btn-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

/* Menú móvil hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Botones generales - COLOR NARANJA */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.0625rem;
    font-family: 'Avenir Black', sans-serif;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-cta);
    color: var(--color-white);
    box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
}

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

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

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Secciones */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-soft);
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/FONDO_AK_Mesa_de_trabajo_1.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
}

.eyebrow {
    display: inline-block;
    background: var(--gradient-cta);
    color: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-title {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1875rem, 2vw, 1.4375rem);
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: left;
}

.hero-text {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-size: 1.1875rem;
    text-align: left;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.microcopy {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    font-style: italic;
    text-align: left;
}

.hero-video {
    margin-top: 3rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-video iframe {
    width: 100%;
    height: 450px;
    border: none;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-main);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--color-white);
    font-family: 'Avenir Black', sans-serif;
    font-weight: 900;
}

.card-title {
    font-size: 1.625rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.card-text {
    color: var(--color-text-light);
    line-height: 1.8;
    font-size: 1.0625rem;
}

/* Grid system */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ============================================
   BOTÓN WHATSAPP FLOTANTE - CON TEXTO DE CONFIANZA
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999;
}

.whatsapp-float-btn {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    cursor: pointer;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
}

.whatsapp-float-btn svg {
    width: 35px;
    height: 35px;
    fill: var(--color-white);
}

.whatsapp-trust-text {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 2;
    text-align: left;
}

.footer-section a:hover {
    color: var(--color-cta);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.social-links a:hover {
    background: var(--gradient-cta);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    text-align: center;
    font-size: 0.9375rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   SECCIÓN RESULTADOS - TARJETAS NUEVAS
   ============================================ */
.resultados-section {
    background: var(--gradient-soft);
    padding: 5rem 0;
}

.resultado-card {
    background: var(--color-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resultado-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-cta);
}

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

.resultado-numero {
    display: inline-block;
    background: var(--gradient-soft);
    color: var(--color-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    line-height: 50px;
    font-family: 'Avenir Black', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.resultado-metrica {
    font-family: 'Avenir Black', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--color-cta);
    margin-bottom: 0.5rem;
}

.resultado-titulo {
    font-size: 1.125rem;
    color: var(--color-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.resultado-texto {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

/* ============================================
   SECCIÓN CERTIFICADOS - MEJORADA CON GRAYSCALE
   ============================================ */
.certificados-section {
    background: #f8f9fa;
    padding: 5rem 0;
}

.certificados-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    justify-items: center;
    margin-top: 2.5rem;
    padding: 1rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.certificado-logo {
    width: 100%;
    max-width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.4s ease;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.certificado-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.certificado-logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    /* GRAYSCALE por defecto */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

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

/* ============================================
   SECCIÓN SOBRE NOSOTROS
   ============================================ */
.sobre-section {
    background: var(--gradient-soft);
    padding: 5rem 0;
}

.sobre-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.sobre-content p {
    font-size: 1.1875rem;
    line-height: 1.9;
    color: var(--color-text);
    text-align: center;
}

/* ============================================
   SECCIÓN CONTACTO
   ============================================ */
.contacto-section {
    padding: 5rem 0;
}

.contacto-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.contacto-intro h3 {
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   BANNER CTA FINAL
   ============================================ */
.cta-banner {
    background: var(--gradient-main);
    padding: 5rem 2rem;
    text-align: center;
}

.cta-banner h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin: 0 auto 2rem;
    font-size: 1.1875rem;
    text-align: center;
}

.cta-banner .btn-primary {
    background: var(--color-white);
    color: var(--color-cta);
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
}

.cta-banner .btn-primary:hover {
    background: var(--color-dark);
    color: var(--color-white);
}

.cta-banner .microcopy {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .certificados-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 500px;
    }
    
    .certificado-logo {
        max-width: 180px;
        height: 80px;
        padding: 0.75rem;
    }
    
    .certificado-logo img {
        max-height: 55px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--color-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .header.scrolled .nav-menu {
        background-color: var(--color-dark);
    }

    .menu-toggle {
        display: flex;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-video iframe {
        height: 300px;
    }

    section {
        padding: 3.5rem 0;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float-btn {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-trust-text {
        font-size: 0.6875rem;
        padding: 0.3rem 0.6rem;
    }
    
    .certificados-section {
        padding: 3.5rem 0;
    }
    
    .certificados-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 1rem;
        max-width: 400px;
    }
    
    .certificado-logo {
        max-width: 150px;
        height: 70px;
        padding: 0.5rem;
        border-radius: 10px;
    }
    
    .certificado-logo img {
        max-height: 50px;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .card {
        padding: 1.5rem;
    }
    
    .certificados-section {
        padding: 2.5rem 0;
    }
    
    .certificados-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.5rem;
        max-width: 320px;
    }
    
    .certificado-logo {
        max-width: 140px;
        height: 60px;
        padding: 0.4rem;
        border-radius: 8px;
    }
    
    .certificado-logo img {
        max-height: 42px;
    }
    
    .resultado-card {
        padding: 1.75rem;
    }
}

@media (max-width: 360px) {
    .certificados-grid {
        gap: 0.4rem;
        max-width: 280px;
    }
    
    .certificado-logo {
        max-width: 120px;
        height: 55px;
        padding: 0.35rem;
    }
    
    .certificado-logo img {
        max-height: 38px;
    }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

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

/* Estilos para formulario KOMO centrado - MUY IMPORTANTES */
#komo-form-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
}

#komo-form-container > * {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 500px !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Asegurar que el iframe o widget de KOMO esté centrado */
#komo-form-container iframe,
#komo-form-container form,
#komo-form-container > div {
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Widget de Kommo específico - selectores muy específicos */
.amo-forms-container,
div[class*="amo"],
div[id*="amo"] {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 500px !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Forzar centrado de todos los elementos dentro del formulario */
#komo-form-container * {
    text-align: inherit !important;
    z-index: auto !important;
}

/* Asegurar que el header tenga prioridad sobre el formulario */
.header {
    z-index: 1000 !important;
}
