/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --color-primary: #007c9f;
    --color-primary-dark: #003b55;
    --color-accent: #00bcd4;
    --color-bg: #f4f8fb;
    --color-bg-alt: #ffffff;
    --color-text: #23313f;
    --color-muted: #6f7b88;

    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --transition: all 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

@font-face {
    font-family: 'TanPearl';
    src: url('../fonts/tan-pearl.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   HELPERS & GENERAL
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-bg-alt); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--color-primary-dark); }
.section-header p { margin: 0; color: var(--color-muted); }

/* Animación Reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    will-change: opacity, transform;
}
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* =========================================
   COMPONENTES: BOTONES Y LINKS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    border: none;
    outline: none;
    cursor: pointer;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    gap: 0.4rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    box-shadow: none;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    box-shadow: none;
}
.btn-outline-secondary:hover { background: rgba(0, 124, 159, 0.06); }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-card { margin-top: 0.8rem; align-self: flex-start; position: relative; z-index: 1; }

.link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}
.link::after { content: "→"; font-size: 0.9rem; }

/* =========================================
   COMPONENTES: TARJETAS (ESTILOS COMPARTIDOS)
   ========================================= */
/* Agrupamos todas las tarjetas con fondo blanco, sombra y hover */
.service-category-card, .card, .diploma-card, .mvv-card, .team-card, .map-card, .testimonial-card, .cert-card {
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border-radius: var(--radius-md); /* Default radius */
    overflow: hidden;
}

/* Ajustes de Radio */
.service-category-card, .diploma-card, .team-card, .map-card { border-radius: var(--radius-lg); }
.mvv-card { border-radius: 20px; }

/* Efecto Hover General */
.service-category-card:hover, .card:hover, .diploma-card:hover, .mvv-card:hover {
    transform: translateY(-4px);
}
.service-category-card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12); }
.card:hover { box-shadow: 0 14px 26px rgba(0,0,0,0.08); }
.diploma-card:hover { box-shadow: 0 18px 38px rgba(0, 0, 0, 0.09); }

/* Títulos comunes */
.service-category-body h3, .card h3, .diploma-header h3, .cert-card h3 {
    margin: 0; font-size: 1rem; color: var(--color-primary-dark);
}

/* =========================================
   HEADER & NAV
   ========================================= */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'TanPearl', serif !important; font-size: 1.9rem; letter-spacing: 1px; font-weight: 700; color: #104569; }
.brand-subtitle { font-size: 0.78rem; color: var(--color-muted); }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; font-size: 0.9rem; color: var(--color-text); font-weight: 500; position: relative; }

/* Efecto hover link nav */
.nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; bottom: -0.2rem;
    width: 0; height: 2px; border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.2s ease;
}
.nav a:hover::after { width: 100%; }

/* Botón Agenda Header */
.main-header .nav .btn.btn-sm.btn-outline {
    background: var(--gradient-primary); color: #ffffff; border: none; box-shadow: var(--shadow-soft);
}
.main-header .nav .btn.btn-sm.btn-outline:hover { transform: translateY(-1px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18); }

/* Toggle Menú Móvil */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: transparent; border: none; cursor: pointer; padding: 0.5rem;
}
.nav-toggle span { width: 22px; height: 2px; border-radius: 999px; background: var(--color-primary-dark); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-toggle { display: inline-flex; align-items: center; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0; min-width: 220px; padding: 0.75rem 0;
    background: #ffffff; border-radius: 16px;
    box-shadow: 0 18px 35px rgba(15, 52, 96, 0.18);
    opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 50;
}
.dropdown-menu a { display: block; padding: 0.6rem 1.2rem; font-size: 0.95rem; color: #01394f; white-space: nowrap; }
.dropdown-menu a:hover { background: #f4fbff; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}

/* Breadcrumbs */
.breadcrumb {
    max-width: 1120px; margin: 1.25rem auto 0; padding: 0 1.5rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
    font-size: 0.9rem; color: #6b7a8a;
}
.breadcrumb a { color: #0d92b8; text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-separator { color: #9aa7b5; }
.breadcrumb-current { color: #104569; font-weight: 600; }

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    background: linear-gradient(135deg, #003b55, #007c9f);
    color: #fff;
    padding: 4.8rem 0 4.6rem;
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at top left, rgba(0, 188, 212, 0.28), transparent 60%),
                radial-gradient(circle at bottom right, rgba(0, 60, 100, 0.4), transparent 55%);
}
.hero-grid {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.8rem; align-items: center;
}
.hero-text { max-width: 620px; }

/* Pills & Text */
.hero-pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.4rem; }
.hero-pill {
    font-size: 0.8rem; padding: 0.25rem 0.8rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.hero-pill-outline { background: transparent; border-color: rgba(0, 188, 212, 0.8); }
.hero-kicker {
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.8); margin: 0.2rem 0 0.7rem;
}
.hero h1 { margin: 0 0 0.8rem; font-size: clamp(2.3rem, 3.3vw, 2.9rem); line-height: 1.15; }
.hero-subtitle { margin: 0 0 1.6rem; font-size: 0.98rem; color: rgba(238, 249, 252, 0.92); }

/* Highlights */
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.4rem; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: 0.85rem; }
.hero-highlight { padding-left: 0.65rem; border-left: 2px solid rgba(255, 255, 255, 0.5); }
.hero-highlight-title { display: block; font-weight: 600; }
.hero-highlight-text { display: block; opacity: 0.9; }

/* Hero Media */
.hero-image-wrapper { position: relative; display: flex; justify-content: flex-end; align-items: center; }
.hero-media {
    position: relative; width: 100%; max-width: 520px; border-radius: 32px;
    overflow: hidden; box-shadow: var(--shadow-soft);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0, 60, 100, 0.25), rgba(0, 188, 212, 0.45));
    mix-blend-mode: multiply; opacity: 0.9; pointer-events: none;
}
.hero-floating-card {
    position: absolute; bottom: -1.2rem; left: 6%;
    background: rgba(255, 255, 255, 0.96); border-radius: 18px;
    padding: 0.85rem 1rem; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    max-width: 260px; color: var(--color-text); font-size: 0.8rem;
}
.hero-floating-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-primary); margin-bottom: 0.3rem; }
.hero-floating-text { margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--color-text); }
.hero-floating-badge {
    display: inline-flex; align-items: center; padding: 0.2rem 0.6rem;
    border-radius: 999px; background: rgba(0, 124, 159, 0.1);
    color: var(--color-primary-dark); font-size: 0.72rem; font-weight: 500;
}

/* =========================================
   SECCIONES: SERVICIOS & CARDS
   ========================================= */
.service-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.service-category-card { display: flex; flex-direction: column; height: 100%; }
.service-category-card img { width: 100%; height: 140px; object-fit: cover; }
.service-category-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; height: 100%; }
.service-category-body p, .card p { margin: 0; font-size: 0.9rem; color: var(--color-muted); }
.service-category-body ul { margin: 0.4rem 0 0.3rem; padding-left: 1.1rem; font-size: 0.85rem; color: var(--color-text); }

/* Catálogo General */
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card { padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; position: relative; }

/* Glow effect común en cards y testimonials */
.card::before, .testimonial-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(0, 124, 159, 0.16), rgba(0, 188, 212, 0.16)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0.4; pointer-events: none; z-index: 0;
}
.card > * { position: relative; z-index: 1; }

.card .card-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,124,159,0.1), rgba(0,124,159,0.22));
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.7rem; box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.card-tag { display: inline-block; margin-bottom: 0.35rem; padding: 0.18rem 0.6rem; border-radius: 999px; background: #e6f6fb; color: #006582; font-size: 0.75rem; font-weight: 500; }
.card-badge { display: inline-block; margin-left: 0.4rem; padding: 0.18rem 0.55rem; border-radius: 999px; background: #ffece0; color: #d96a25; font-size: 0.74rem; font-weight: 600; }
.card-subtitle { margin: 0.25rem 0 0.6rem; font-size: 0.88rem; color: #66788a; }
.card-benefits { list-style: none; padding: 0; margin: 0; }
.card-benefits li { font-size: 0.85rem; color: #455668; margin-bottom: 0.25rem; }

/* =========================================
   DIPLOMADOS & EQUIPO
   ========================================= */
.diplomados-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.diploma-card { padding: 1.5rem 1.6rem; border: 1px solid #e1e8f0; display: flex; gap: 1rem; align-items: flex-start; }

.diploma-icon {
    width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,124,159,0.1), rgba(0,124,159,0.25));
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.mvv-icon img, .diploma-icon img { width: 40px; height: 40px; object-fit: contain; display: block; margin: 0 auto; }
.diploma-body { flex: 1; }
.diploma-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.35rem; }

.diploma-badge { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(0,124,159,0.09); color: var(--color-primary); border-radius: 999px; padding: 0.25rem 0.6rem; white-space: nowrap; }
.diploma-badge-alt { background: rgba(237, 147, 70, 0.12); color: #d0751f; }
.diploma-desc { margin: 0.3rem 0 0.4rem; font-size: 0.88rem; color: var(--color-text); }
.diploma-list { margin: 0 0 0.6rem; padding-left: 1.1rem; font-size: 0.86rem; color: var(--color-muted); }
.diploma-list li + li { margin-top: 0.15rem; }
.diploma-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.65rem; }
.diploma-tag { font-size: 0.75rem; background: #f4f7fa; border-radius: 999px; padding: 0.18rem 0.55rem; color: #4b5f73; }

/* Sobre Nosotros */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.mvv-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 2rem; }
.mvv-card { padding: 2.2rem 1.8rem; text-align: center; }
.mvv-icon { font-size: 2.6rem; margin-bottom: 1rem; display: flex; justify-content: center; align-items: center; }

.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.team-card { padding: 1.8rem; border: 1px solid #e1e8f0; text-align: center; }
.team-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin: 0 auto 1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-size: 1.2rem; margin-bottom: 0.2rem; }
.team-role { font-size: 0.95rem; color: var(--color-primary); margin-bottom: 0.6rem; font-weight: 500; }
.team-bio { margin: 0; font-size: 0.93rem; color: var(--color-muted); }
.team-quote { margin-top: 0.6rem; font-size: 0.85rem; font-style: italic; color: #2f4a5f; }

.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.cert-card { padding: 1.2rem; border: 1px solid #e1e8f0; }
.cert-card p { margin: 0; font-size: 0.86rem; color: var(--color-muted); }

/* =========================================
   CONTACTO
   ========================================= */
.section-cta {
    background: radial-gradient(circle at top left, rgba(0, 188, 212, 0.25), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 60, 100, 0.35), transparent 55%),
                linear-gradient(135deg, #003b55, #007c9f);
    color: #fff; position: relative; overflow: hidden;
}
.section-cta::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 188, 212, 0.18), transparent 55%);
    opacity: 0.5; pointer-events: none;
}
.section-cta .container { position: relative; z-index: 1; }

.cta-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: stretch; }
.contact-map-wrapper { display: flex; flex-direction: column; }
.map-card {
    padding: 1.4rem 1.6rem 1.6rem; display: flex; flex-direction: column; height: 100%;
    border: 1px solid rgba(208, 221, 232, 0.6); position: relative;
}
.map-card::before {
    content: "Ubicación"; position: absolute; top: 0.85rem; right: 1.2rem;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--color-primary); background: rgba(0, 188, 212, 0.12);
    border-radius: 999px; padding: 0.2rem 0.7rem;
}
.map-card h3 { margin: 0 0 0.3rem; color: var(--color-primary-dark); font-size: 1.1rem; }
.map-embed { position: relative; width: 100%; border-radius: var(--radius-md); overflow: hidden; flex: 1; min-height: 260px; margin-top: 0.4rem; }
.map-embed iframe { border: 0; width: 100%; height: 100%; }

.cta-right { display: flex; flex-direction: column; gap: 1.2rem; }
.cta-text h2 { margin-top: 0; font-size: 1.9rem; }
.cta-text p { margin: 0 0 1rem; }
.cta-list { list-style: none; padding: 0; margin: 0; font-size: 0.93rem; }
.cta-list li + li { margin-top: 0.35rem; }

.contact-form {
    background: rgba(255, 255, 255, 0.96); border-radius: var(--radius-md);
    padding: 1.5rem 1.6rem; box-shadow: var(--shadow-soft); color: var(--color-text); align-self: stretch;
}
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.25rem; }
.field input, .field select, .field textarea {
    width: 100%; border-radius: 999px; border: 1px solid #d0dde8;
    padding: 0.55rem 0.85rem; font-family: inherit; font-size: 0.9rem;
    outline: none; transition: var(--transition); background: #f9fbff;
}
.field textarea { border-radius: 16px; resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--color-primary); box-shadow: 0 0 0 1px rgba(0, 124, 159, 0.25); background: #fff;
}
.form-note { margin-top: 0.5rem; font-size: 0.78rem; color: var(--color-muted); }

/* =========================================
   TESTIMONIOS & FAQ
   ========================================= */
.testimonials-slider { max-width: 900px; margin: 0 auto; }
.testimonials-inner { position: relative; min-height: 180px; }
.testimonial-card {
    padding: 1.2rem 1.3rem 1.3rem; position: absolute; inset: 0; display: none;
    flex-direction: column; gap: 0.6rem; opacity: 0; transform: translateY(6px);
}
.testimonial-card.active { display: flex; opacity: 1; transform: translateY(0); }
.testimonial-card::before { opacity: 0.35; } /* Usa el estilo compartido en .card */
.testimonial-rating { font-size: 0.85rem; color: #f7b500; letter-spacing: 0.12em; }
.testimonial-text { margin: 0; font-size: 0.9rem; color: var(--color-text); }
.testimonial-author { margin-top: 0.3rem; display: flex; flex-direction: column; font-size: 0.8rem; color: var(--color-muted); }
.testimonial-name { font-weight: 600; color: var(--color-primary-dark); }
.testimonial-source { font-size: 0.78rem; }
.testimonials-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1rem; }
.testimonial-dot {
    width: 10px; height: 10px; border-radius: 999px; border: none;
    background: rgba(0, 124, 159, 0.25); cursor: pointer; padding: 0; transition: var(--transition);
}
.testimonial-dot.active { width: 22px; background: var(--gradient-primary); }

/* FAQ */
.faq-section { border-top: 1px solid #e1edf4; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-radius: 12px; background: #ffffff; box-shadow: 0 8px 20px rgba(0,0,0,0.04); margin-bottom: 0.9rem; overflow: hidden; }
.faq-item-header {
    width: 100%; border: none; background: transparent; padding: 0.9rem 1.1rem;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.95rem; font-weight: 500; color: #123047; cursor: pointer;
}
.faq-toggle { font-size: 1.1rem; color: #1fa2d6; margin-left: 0.8rem; }
.faq-item-body {
    max-height: 0; overflow: hidden; padding: 0 1.1rem;
    transition: max-height 0.25s ease, padding 0.25s ease;
}
.faq-item-body p { font-size: 0.88rem; color: #5a6c7f; margin: 0.6rem 0 0.9rem; }
.faq-item.open .faq-item-body { max-height: 200px; padding-bottom: 0.9rem; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }

/* =========================================
   ELEMENTOS FLOTANTES
   ========================================= */
/* Botón Flotante WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float-inner {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre el icono y el texto */
    background-color: #25D366; /* Verde oficial WhatsApp */
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.whatsapp-float-inner:hover {
    transform: translateY(-4px);
    background-color: #20b852;
}

/* Configuración del Icono SVG */
.whatsapp-icon-svg {
    width: 24px;
    height: 24px;
    fill: #ffffff; /* ¡Importante! Esto pinta el icono de blanco */
}

.whatsapp-label {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Responsivo para celulares: Ocultar texto, dejar solo icono */
@media (max-width: 480px) {
    .whatsapp-label {
        display: none;
    }
    .whatsapp-float-inner {
        padding: 12px;
        border-radius: 50%; /* Botón redondo */
    }
    .whatsapp-icon-svg {
        width: 28px;
        height: 28px; /* Icono un poco más grande en móvil */
    }
}
/* Burbuja Renata (Estilo Chat 2.0) */
/* =========================================
   BURBUJA RENATA (Final: Estilo Glass Limpio)
   ========================================= */
.renata-bubble {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    
    /* Avatar alineado arriba junto al primer mensaje */
    display: flex;
    align-items: flex-start; 
    flex-direction: row;
    gap: 12px;
    
    max-width: 350px;
    
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.renata-bubble.visible,
.renata-bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* --- 1. AVATAR --- */
.renata-avatar {
    order: 1;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    
    /* IOS FIX */
    flex-shrink: 0;
    
    background-color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Sombra suave */
    overflow: hidden;
    margin-top: 0; 
}

.renata-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* --- 2. CONTENEDOR DE MENSAJES --- */
.renata-dialogue {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px; /* Un poco más de aire entre burbujas */
    
    background: transparent;
    padding: 0;
    position: relative; 
    padding-top: 5px;
    min-width: 200px;
}

/* --- 3. MENSAJES (ESTILO TIPO "ESCRIBIENDO") --- */
.renata-dialogue p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 10px 16px;
    
    /* --- ESTILO PEDIDO: Fondo Transparente/Glass --- */
    /* Blanco al 85% de opacidad para efecto vidrio */
    background: rgba(255, 255, 255, 0.85); 
    
    /* Difuminado de lo que haya detrás */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Texto oscuro (Gris oscuro) para contraste */
    color: #333333; 
    
    /* Marco sin borde (solo sombra suave para separar del fondo) */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    
    /* Forma */
    border-radius: 4px 16px 16px 16px; /* Punta arriba-izquierda */
    
    font-weight: 500;
    animation: slideInMsg 0.4s ease forwards;
}

/* El primer mensaje tiene la punta más definida */
.renata-dialogue p:first-of-type {
    border-top-left-radius: 2px; 
}

/* Estilo para "Escribiendo..." (Idéntico a los mensajes ahora) */
.renata-dialogue .typing {
    background: rgba(255, 255, 255, 0.75); /* Un pelín más transparente */
    backdrop-filter: blur(5px);
    color: #666;
    font-style: italic;
    font-size: 0.8rem;
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: none; /* Sin sombra para que sea sutil */
}

.renata-dialogue .hidden {
    display: none;
}

/* --- 4. BOTÓN CERRAR --- */
.renata-close {
    position: absolute;
    top: -20px; 
    right: 0;
    
    background: #ff5f5f;
    color: white;
    border: 2px solid #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 20;
    transition: transform 0.2s;
}

.renata-close:hover {
    transform: scale(1.15);
    background: #e04444;
}

@keyframes slideInMsg {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MEDIA QUERY (Móvil) --- */
@media (max-width: 480px) {
    .renata-bubble {
        right: 15px;
        bottom: 85px;
        max-width: 85%;
    }
    .renata-avatar {
        width: 45px;
        height: 45px;
    }
    .renata-dialogue p {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
}
/* =========================================
   OFERTAS DEL MES (SLIDER / MODAL) - V3 (Imagen Grande)
   ========================================= */
.offers-panel {
    position: fixed; inset: 0; display: flex; justify-content: center; align-items: center;
    z-index: 1200; background: rgba(0, 0, 0, 0.5); /* Fondo un poco más oscuro */
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem; /* Margen de seguridad para pantallas pequeñas */
}
.offers-panel.is-visible { opacity: 1; pointer-events: auto; }

.offers-inner {
    /* Fondo azul degradado semitransparente */
    background: linear-gradient(135deg, rgba(0, 59, 85, 0.96), rgba(0, 124, 159, 0.94));
    backdrop-filter: blur(12px);
    color: #ffffff;
    
    /* Dimensiones optimizadas para dar prioridad a la imagen */
    max-width: 480px; width: 100%;
    border-radius: 20px; 
    padding: 1rem; /* Padding reducido para ganar espacio */
    
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex; flex-direction: column;
}

.offers-close {
    position: absolute; top: 0.5rem; right: 0.5rem; border: none; background: rgba(0,0,0,0.2);
    color: #ffffff; font-size: 1.2rem; cursor: pointer; 
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background 0.18s ease, transform 0.18s ease; z-index: 10;
}
.offers-close:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }

/* Header compacto */
.offers-header { 
    margin-bottom: 0.5rem; 
    padding-right: 2rem; /* Espacio para que el botón cerrar no tape texto */
}
.offers-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.7rem;
    border-radius: 999px; background: rgba(255, 255, 255, 0.2);
    color: #ffffff; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase;
}
.offers-header h3 {
    margin: 0.3rem 0 0; font-size: 1rem; font-weight: 600; color: #ffffff;
}

/* Slider: Aquí ocurre la magia del tamaño */
.offers-slider { 
    width: 100%; 
    border-radius: 12px; 
    overflow: hidden; 
    margin: 0.5rem 0 0.8rem; /* Márgenes reducidos */
    background: rgba(0, 0, 0, 0.1); /* Fondo sutil por si la imagen no llena todo */
    flex: 1; /* Ocupa el espacio disponible */
}

.offers-slides { 
    position: relative; 
    width: 100%; 
    /* Altura aumentada significativamente */
    height: 300px; 
}

.offer-slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    /* 'contain' muestra toda la imagen. */
    object-fit: contain;
    opacity: 0; transform: scale(1.03); transition: opacity 0.6s ease, transform 0.6s ease;
}
.offer-slide.active { opacity: 1; transform: scale(1); }

.offers-cta {
    display: flex; align-items: center; justify-content: center; width: 100%;
    padding: 0.65rem 0.8rem; border-radius: 999px;
    background: #ffffff; color: var(--color-primary-dark);
    font-size: 0.9rem; font-weight: 600; text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transition: var(--transition);
    margin-top: auto; /* Empuja el botón al fondo si sobra espacio */
}
.offers-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.23); background: #f4f8fb; }

/* Media Queries para Pantallas más grandes */
@media (min-width: 768px) { 
    .offers-inner { 
        max-width: 550px; 
        padding: 1.4rem; 
    }
    .offers-slides {
        /* Aún más altura en escritorio para que destaque */
        height: 380px; 
    }
    .offers-header h3 { font-size: 1.2rem; }
}
/* =========================================
   FOOTER
   ========================================= */
.site-footer { background: #071824; color: #d3dde7; padding: 2.8rem 0 1.8rem; margin-top: 2.5rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { font-size: 1.3rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: 'TanPearl', serif !important; color: #ffffff; margin: 0 0 0.6rem; }
.footer-text { margin: 0 0 0.5rem; color: #b5c0cd; font-size: 0.87rem; }
.footer-title { font-size: 0.95rem; margin: 0 0 0.6rem; color: #ffffff; }
.footer-title-spaced { margin-top: 0.9rem; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li + li, .footer-contact li + li { margin-top: 0.28rem; }
.footer-links a, .footer-contact a { color: #c3cedb; text-decoration: none; font-size: 0.87rem; }
.footer-links a:hover, .footer-contact a:hover { color: #ffffff; }
.footer-contact li span { margin-right: 0.35rem; }

.footer-social { display: flex; align-items: center; gap: 0.6rem; }
.footer-social a {
    width: 28px; height: 28px; border-radius: 50%; background: #0d2132;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social img { width: 16px; height: 16px; }
.footer-social a:hover { background: #0f2f44; transform: translateY(-2px); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06); padding-top: 0.9rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; font-size: 0.78rem; color: #93a3b6;
}
.footer-link-small { color: #93a3b6; text-decoration: none; }
.footer-link-small:hover { color: #ffffff; }

/* Cintilla de Pagos */
.payment-banner { background: #f4fafc; border-top: 1px solid #e2eef3; border-bottom: 1px solid #e2eef3; padding: 1.2rem 0; }
.payment-banner-content { display: flex; align-items: center; justify-content: center; gap: 1.4rem; flex-wrap: wrap; }
.payment-text { font-size: 0.95rem; color: #123047; font-weight: 600; }
.payment-logos { display: flex; align-items: center; gap: 0.8rem; }
.payment-logos img { height: 28px; filter: none !important; opacity: 1 !important; }

/* =========================================================
   MEDIA QUERIES
   ========================================================= */

/* --- TABLETS GRANDES / IPAD (Max 1024px) --- */
@media (max-width: 1024px) {
    .header-content { padding: 0.55rem 0.6rem; }
    .nav { gap: 1.1rem; }
    .nav a { font-size: 0.88rem; }
    
    .hero { padding: 4rem 0 3.4rem; }
    .hero-grid { grid-template-columns: 1fr 0.9fr; gap: 2rem; }
    .hero-text h1 { font-size: 2.3rem; line-height: 1.18; }
    .hero-media { max-width: 420px; }
    
    .service-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
    .mvv-grid, .footer-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
    
    /* Ajuste para slider modal */
    .offers-inner { max-width: 500px; }
}

/* --- TABLETS VERTICALES (Max 992px) --- 
   Activa menú hamburguesa para iPad Air (820px) */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image-wrapper { justify-content: flex-start; margin-top: 1.5rem; }
    .hero-floating-card { position: relative; bottom: auto; left: auto; margin-top: 0.75rem; }

    .service-categories, .cards-grid, .diplomados-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cta-grid, .about-grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .map-embed { min-height: 240px; }

    /* MENU HAMBURGUESA */
    .nav-toggle { display: flex; }
    .nav {
        display: none; flex-direction: column; align-items: flex-start; justify-content: flex-start;
        position: absolute; inset: 100% 0 auto 0; padding: 1rem 1.5rem 1.5rem;
        background: rgba(255, 255, 255, 0.98); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12); gap: 0.5rem;
    }
    .nav.nav-open { display: flex; }
    .nav a { width: 100%; padding: 0.4rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
    
    .nav-dropdown { width: 100%; }
    .nav-dropdown .dropdown-toggle { display: block; width: 100%; }
    .dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        pointer-events: auto; background: transparent; box-shadow: none;
        padding: 0 0 0 1rem; min-width: 0;
    }
}

/* --- MÓVILES (Max 768px) --- */
@media (max-width: 768px) {
    .hero { padding-top: 4rem; }
    .hero h1 { font-size: 2.1rem; }
    .hero-highlights { flex-direction: column; }
    
    /* Columnas únicas */
    .service-categories, .cards-grid, .team-grid, .diplomados-grid, .mvv-grid, .cert-grid, .footer-grid { grid-template-columns: 1fr; }
    .mvv-card { padding: 2rem; }
    .diploma-card { padding: 1.3rem 1.4rem; }
    .breadcrumb { font-size: 0.95rem; padding: 0 1.25rem; margin-top: 1rem; }
    
    /* Slider modal responsivo */
    .offers-inner { max-width: 460px; }
}

/* --- MÓVILES PEQUEÑOS (Max 600px) --- */
@media (max-width: 600px) {
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .payment-banner-content { flex-direction: column; }
    .payment-text { width: 100%; text-align: center; margin-bottom: 0.3rem; }

    .renata-bubble { right: 1rem; bottom: 4.4rem; max-width: 240px; }
    .whatsapp-float-inner { padding: 0.55rem 0.7rem; }
    .whatsapp-float-inner span { display: none; } /* Ocultar texto en pantallas muy chicas */
}

/* --- NUEVOS ESTILOS PARA ETIQUETAS (BADGES) EN TARJETAS --- */

/* Contenedor que agrupa las etiquetas */
.card-badges {
    display: flex;
    flex-wrap: wrap; /* Si no caben, bajan a la siguiente línea */
    gap: 0.5rem;     /* Espacio entre etiquetas */
    margin-bottom: 0.8rem; /* Espacio antes del icono de la tarjeta */
}

/* Etiqueta de "Más solicitado" (Estilo destacado/dorado) */
.badge-highlight {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #fff8e1; /* Fondo amarillento suave */
    color: #d97706;       /* Texto naranja/dorado fuerte */
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

/* Etiqueta de "Duración" (Estilo neutro/tiempo) */
.badge-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem; /* Espacio entre el relojito y el texto */
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #f1f5f9; /* Fondo gris muy claro */
    color: #475569;      /* Texto gris oscuro */
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(71, 85, 105, 0.1);
}
/* --- NUEVOS ESTILOS: HEADER DE TARJETA (Icono + Badges) --- */

/* Contenedor que pone el Icono a la izquierda y los Badges a la derecha */
.card-header {
    display: flex;
    justify-content: space-between; /* Separa los elementos a los extremos */
    align-items: flex-start;        /* Alinea todo arriba */
    margin-bottom: 0.8rem;          /* Espacio debajo del encabezado */
    width: 100%;
}

/* Quitamos el margen inferior que tenía el icono por defecto para que no estorbe */
.card-header .card-icon {
    margin-bottom: 0; 
}

/* Contenedor de las etiquetas (alineadas a la derecha y apiladas) */
.card-badges {
    display: flex;
    flex-direction: column; /* Una debajo de la otra (más limpio) */
    align-items: flex-end;  /* Pegadas a la derecha */
    gap: 0.4rem;            /* Espacio entre etiquetas */
}

/* Estilo para "Más solicitado" */
.badge-highlight {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: #fff8e1; 
    color: #d97706;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(217, 119, 6, 0.2);
    white-space: nowrap;
}

/* Estilo para "Tiempo" */
.badge-time {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: #0d5297; 
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

/* ======================================================
   CINTILLO PROMOCIONAL 2026
   ====================================================== */

/* Altura controlada por variable */
:root{
  --promo-bar-h: 44px;
}

/* Cuando el cintillo está activo */
body.has-promo-bar{
  padding-top: var(--promo-bar-h);
}

/* Header sticky baja automáticamente */
body.has-promo-bar .main-header{
  top: var(--promo-bar-h);
}

/* En móviles un poco más alto */
@media (max-width: 600px){
  :root{ --promo-bar-h: 52px; }
}

/* Contenedor principal */
.promo-bar{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--promo-bar-h);
  z-index: 9999;

  background: linear-gradient(135deg, #c62828, #ff5252);
  color: #fff;

  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s ease, opacity .35s ease;
}

.promo-bar.is-visible{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Estructura interna */
.promo-bar-inner{
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flechas */
.promo-bar-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .25rem .5rem;
  z-index: 2;
}

.promo-prev{ left: .5rem; }
.promo-next{ right: .5rem; }

/* Viewport del slider */
.promo-bar-viewport{
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track */
.promo-bar-track{
  display: flex;
  height: 100%;
  transition: transform .45s ease;
  will-change: transform;
}

/* Slide individual (UNO a la vez) */
.promo-slide{
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .95rem;
  text-align: center;
  padding: 0 3rem;
  white-space: nowrap;
}

/* Responsive texto */
@media (max-width: 820px){
  .promo-slide{
    font-size: .9rem;
    white-space: normal;
    line-height: 1.15;
  }
}

/* ================================
   FIX MENÚ MÓVIL
================================ */
@media (max-width: 991px) {
    .nav {
        position: fixed;
        /* Si hay cintillo, el top debe ajustarse, si no, es 70px (altura header aprox) */
        top: 70px; 
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px); /* Agregado para consistencia */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease; /* Suavizar padding */
        z-index: 990; /* Justo debajo del header (z-index 100 es poco, header debería ser 1000) */
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 0 1.5rem; /* Padding lateral base */
    }

    /* Ajuste dinámico si el cintillo está visible */
    body.has-promo-bar .nav {
        top: calc(70px + var(--promo-bar-h));
    }

    .nav.nav-open {
        max-height: 90vh;
        padding-top: 1.5rem;
        padding-bottom: 2rem;
        overflow-y: auto; /* Scroll si el menú es muy alto */
    }

    /* Aseguramos que los links se vean bien en lista vertical */
    .nav a {
        display: block;
        width: 100%;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 1.1rem;
    }
    
    .nav a:last-child { border-bottom: none; }
    
    /* Ocultar botón "Agenda" normal y mostrarlo diferente si quisieras */
    .nav .btn {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

