:root {
    /* 🎨 Fondo principal */
    --bg-color: #e8ebf0;

    /* 🔴🔵 Variables de Marca Macrojaguar */
    --accent-primary: #0a3661;
    --accent-secondary: #1f4f85;
    --accent-highlight: #b41324;
    --accent-highlight-hover: #8f0f1c;
    --accent-hover-details: #082a4d;
    --accent-whatsapp: #25D366;
    --accent-whatsapp-hover: #1ebe5a;

    /* 🧊 Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(10, 54, 97, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(10, 54, 97, 0.12);
    --glass-blur: blur(20px);

    /* ✍️ Textos */
    --text-primary: #0a3661;
    --text-secondary: #4a5a6a;
    --text-muted: #7a8a9a;
    --text-on-dark: #ffffff;

    /* 🌈 Background shapes */
    --shape-1: #0a3661;
    --shape-2: #b41324;
    --shape-3: rgba(31, 79, 133, 0.12);

    /* 📐 Espaciado */
    --spacing-xs: 8px;
    --spacing-micro: 16px;
    --spacing-base: 24px;
    --spacing-large: 32px;
    --spacing-xl: 40px;

    /* 🔲 Radios */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 36px;
    --radius-full: 50%;

    /* ⚡ Transiciones */
    --transition-fast: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-spring: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== RESET ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== BACKGROUND SHAPES ========== */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.7;
    animation: float 25s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.shape-1 {
    width: 320px;
    height: 320px;
    background: var(--shape-1);
    top: -5%;
    left: -10%;
}

.shape-2 {
    width: 280px;
    height: 280px;
    background: var(--shape-2);
    bottom: -5%;
    right: -10%;
    animation-delay: -7s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--shape-3);
    top: 50%;
    left: 50%;
    animation-delay: -12s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 40px) scale(0.95); }
    100% { transform: translate(10px, 20px) scale(1.05); }
}

/* ========== CARD CONTAINER ========== */
.card-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Reflejo iOS top */
.card-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    z-index: 10;
    pointer-events: none;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(145deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, #2a6bb0 100%);
    padding: var(--spacing-xl) var(--spacing-base) var(--spacing-large);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative bottom wave */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--glass-bg);
    border-radius: 50% 50% 0 0;
}

.hero-logo-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
}

.hero-logo-glow {
    position: absolute;
    inset: -10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    filter: blur(20px);
    animation: pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% { opacity: 0.4; transform: scale(0.95); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

.hero-logo {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    background-color: #fff;
    z-index: 1;
}

.hero-company-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-on-dark);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-slogan {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    max-width: 85%;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent-highlight);
    color: var(--text-on-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px 32px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: var(--transition-fast);
    box-shadow: 0 6px 24px rgba(180, 19, 36, 0.4);
    min-height: 56px;
    letter-spacing: 0.3px;
}

.hero-cta:hover {
    background: var(--accent-highlight-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(180, 19, 36, 0.5);
}

.hero-cta:active {
    transform: scale(0.97);
    box-shadow: 0 4px 16px rgba(180, 19, 36, 0.35);
}

.hero-cta-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

/* ========== CARD BODY (all sections below hero) ========== */
.card-body {
    padding: var(--spacing-base);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-base);
}

/* ========== DIVISION CARDS ========== */
.divisions-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-micro);
}

.division-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    gap: var(--spacing-micro);
    align-items: flex-start;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 12px rgba(10, 54, 97, 0.06);
}

.division-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 54, 97, 0.12);
}

.division-icon-wrapper {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
}

.division-icon-wrapper .icon {
    width: 22px;
    height: 22px;
}

.division-info {
    flex: 1;
    min-width: 0;
}

.division-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.division-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ========== GERENCIA SECTION ========== */
.gerencia-section {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: var(--spacing-micro);
}

.gerencia-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 3px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8edf5, #cfd8e8);
    color: var(--accent-primary);
    font-size: 22px;
    font-weight: 800;
}

.gerencia-info {
    flex: 1;
}

.gerencia-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.gerencia-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 4px;
}

.gerencia-tagline {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

/* ========== SECTION TITLES ========== */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* ========== CONTACT LIST ========== */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--glass-bg-strong);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.contact-item:hover {
    background: #ffffff;
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.contact-item:active {
    transform: scale(0.98);
}

.contact-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
}

.contact-icon .icon {
    width: 18px;
    height: 18px;
}

.contact-icon--phone {
    background: var(--accent-primary);
}

.contact-icon--whatsapp {
    background: var(--accent-whatsapp);
}

.contact-icon--email {
    background: #6366f1;
}

.contact-icon--address {
    background: #f59e0b;
}

.contact-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1px;
}

.contact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== SCHEDULE ========== */
.schedule-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(10, 54, 97, 0.04);
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(10, 54, 97, 0.1);
}

.schedule-icon {
    flex-shrink: 0;
    color: var(--accent-secondary);
}

.schedule-icon .icon {
    width: 16px;
    height: 16px;
}

.schedule-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.5;
}

.schedule-text span {
    display: block;
}

/* ========== SOCIAL LINKS ========== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-spring);
    border: 1.5px solid var(--glass-border);
    background: var(--glass-bg-strong);
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.social-btn:hover {
    color: var(--accent-primary);
    background: #ffffff;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 54, 97, 0.12);
    border-color: var(--accent-primary);
}

.social-btn .icon {
    width: 22px;
    height: 22px;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn-row {
    display: flex;
    gap: 10px;
}

.btn-action {
    flex: 1;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-action .icon {
    width: 18px;
    height: 18px;
}

/* WhatsApp Button - green primary */
.btn-whatsapp {
    background: var(--accent-whatsapp);
    color: var(--text-on-dark);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: var(--accent-whatsapp-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
    transform: scale(0.97);
}

/* Call Button */
.btn-call {
    background: var(--accent-primary);
    color: var(--text-on-dark);
    box-shadow: 0 4px 16px rgba(10, 54, 97, 0.25);
}

.btn-call:hover {
    background: var(--accent-hover-details);
    transform: translateY(-1px);
}

.btn-call:active {
    transform: scale(0.97);
}

/* Save Contact */
.btn-save {
    background: var(--glass-bg-strong);
    color: var(--text-primary);
    border: 1.5px solid var(--glass-border);
}

.btn-save:hover {
    background: #ffffff;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-save:active {
    transform: scale(0.97);
}

/* Share Button */
.btn-share {
    background: var(--glass-bg-strong);
    color: var(--text-primary);
    border: 1.5px solid var(--glass-border);
}

.btn-share:hover {
    background: #ffffff;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-share:active {
    transform: scale(0.97);
}

/* ========== SEPARATOR ========== */
.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(10, 54, 97, 0.08), transparent);
    width: 100%;
}

/* ========== MAP SECTION ========== */
.map-section .section-title {
    margin-bottom: var(--spacing-micro);
}

.map-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(10, 54, 97, 0.08);
    border: 1px solid var(--glass-border);
}

.map-iframe {
    width: 100%;
    height: 250px;
    border: 0;
    display: block;
    filter: saturate(0.85) contrast(1.05);
    transition: var(--transition-smooth);
}

.map-iframe:hover {
    filter: none;
}

/* ========== BOTTOM CTA ========== */
.bottom-cta-section {
    text-align: center;
}

.bottom-cta-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.btn-bottom-cta {
    width: 100%;
    min-height: 52px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--accent-highlight);
    color: var(--text-on-dark);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
    box-shadow: 0 6px 20px rgba(180, 19, 36, 0.3);
}

.btn-bottom-cta:hover {
    background: var(--accent-highlight-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(180, 19, 36, 0.4);
}

.btn-bottom-cta:active {
    transform: scale(0.97);
}

/* ========== FOOTER ========== */
.card-footer {
    text-align: center;
    padding: 16px var(--spacing-base) 20px;
    border-top: 1px solid rgba(10, 54, 97, 0.05);
    background: rgba(10, 54, 97, 0.02);
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.5;
}

.footer-text strong {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========== ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeIn 400ms cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

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

.staggered-1 { animation-delay: 100ms; }
.staggered-2 { animation-delay: 200ms; }
.staggered-3 { animation-delay: 300ms; }
.staggered-4 { animation-delay: 400ms; }
.staggered-5 { animation-delay: 500ms; }
.staggered-6 { animation-delay: 600ms; }
.staggered-7 { animation-delay: 700ms; }
.staggered-8 { animation-delay: 800ms; }

/* ========== SCROLL TO TOP ========== */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    color: var(--text-on-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(10, 54, 97, 0.3);
    transition: var(--transition-fast);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: var(--accent-hover-details);
    transform: translateY(-2px);
}

.scroll-top-btn .icon {
    width: 20px;
    height: 20px;
}

/* ========== RESPONSIVE — DESKTOP ========== */
@media (min-width: 600px) {
    body {
        padding: 40px 20px;
    }

    .card-container {
        max-width: 480px;
        border-radius: 40px;
    }

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

    .hero-logo-wrapper {
        width: 120px;
        height: 120px;
    }

    .hero-company-name {
        font-size: 30px;
    }

    .map-iframe {
        height: 300px;
    }

    .divisions-grid {
        flex-direction: row;
    }

    .division-card {
        flex: 1;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}
