@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary: #0b3d8d;
    --primary-dark: #072d6a;
    --primary-light: #1a5bbf;
    --secondary: #f7a326;
    --text: #1e293b;
    --muted: #64748b;
    --white: #ffffff;
    --surface: #f8fafc;
    --border: rgba(148, 163, 184, 0.18);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--surface);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

/* ========== HEADER ========== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 1rem;
    position: relative;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--secondary);
    text-transform: uppercase;
}

/* Desktop Nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-links a {
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
    background: rgba(11, 61, 141, 0.08);
    color: var(--primary);
}

.nav-admin {
    background: rgba(11, 61, 141, 0.08) !important;
    color: var(--primary) !important;
}

/* Hamburger */
.nav-toggle { display: none; }

.nav-toggle-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(11, 61, 141, 0.07);
    border: 1px solid rgba(11, 61, 141, 0.1);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.nav-toggle-btn span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.25s ease;
}

/* ========== HERO (Premium) ========== */
.hero {
    position: relative;
    padding: 5rem 0 4.5rem;
    overflow: hidden;
    background: linear-gradient(165deg, #0b3d8d 0%, #0a2f6e 45%, #0c4a9e 100%);
    color: white;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(247, 163, 38, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 50% at 10% 80%, rgba(255, 255, 255, 0.06), transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    margin-inline: auto;
}

.hero-badge {
    display: inline-flex;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
}

.hero-title {
    margin: 0 0 1.25rem;
    font-size: clamp(2.4rem, 6.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.hero-title span {
    color: var(--secondary);
}

.hero-subtitle {
    margin: 0 auto 2rem;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    line-height: 1.65;
    opacity: 0.9;
    max-width: 560px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.75rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.7rem;
    background: var(--secondary);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.98rem;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(247, 163, 38, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(247, 163, 38, 0.45);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.7rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 700;
    font-size: 0.98rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s, transform 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.hero-metrics {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

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

.metric-item strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
}

.metric-item span {
    font-size: 0.78rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
}

/* ========== PROMO ========== */
.promo-strip {
    background: linear-gradient(90deg, #0b3d8d, #1a5bbf);
    color: white;
    padding: 0.9rem 0;
}

.promo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    text-align: center;
}

.offer-badge {
    padding: 0.35rem 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.promo-inner p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.promo-link {
    font-weight: 700;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    transition: background 0.2s;
}

.promo-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========== SECTIONS ========== */
.section {
    padding: 4.5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-header h2 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.25;
}

.section-desc {
    margin: 0 auto;
    max-width: 480px;
    color: var(--muted);
    font-size: 1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}

.service-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem 1.4rem;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

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

.service-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: rgba(247, 163, 38, 0.12);
    color: var(--secondary);
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.service-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* Process */
.process-section {
    background: white;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.process-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s;
}

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

.step {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: rgba(11, 61, 141, 0.08);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.85rem;
}

.process-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.process-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.about-content h2 {
    margin: 0.4rem 0 1rem;
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    color: var(--primary-dark);
    line-height: 1.3;
}

.about-content > p {
    color: var(--muted);
    margin: 0 0 1.25rem;
    line-height: 1.7;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.about-list li {
    position: relative;
    padding-left: 1.35rem;
    font-weight: 600;
    font-size: 0.97rem;
}

.about-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: 800;
}

.about-stats {
    display: grid;
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 16px 32px rgba(11, 61, 141, 0.25);
}

.stat-card.accent {
    background: linear-gradient(135deg, var(--secondary), #e8931a);
}

.stat-card strong {
    display: block;
    font-size: 2.1rem;
    margin-bottom: 0.25rem;
}

.stat-card span {
    font-size: 0.95rem;
    opacity: 0.95;
}

/* News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}

.news-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

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

.news-image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #e2e8f0;
}

.news-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.news-date {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.news-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.1rem;
    color: var(--primary-dark);
    line-height: 1.35;
}

.news-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.6);
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 2.5rem;
    align-items: start;
}

.faq-intro h2 {
    margin: 0.4rem 0 0;
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    color: var(--primary-dark);
}

.faq-list {
    display: grid;
    gap: 0.85rem;
}

.faq-list details {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
}

.faq-list summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
    padding-right: 1.5rem;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list p {
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* Contact */
.contact-section {
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.contact-intro h2 {
    margin: 0.4rem 0 0.75rem;
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    color: var(--primary-dark);
}

.contact-intro p {
    color: var(--muted);
    margin: 0;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    display: grid;
    gap: 1rem;
}

.contact-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.contact-card strong {
    color: var(--text);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.35rem;
    padding: 0.85rem 1.4rem;
    background: linear-gradient(135deg, #25d366, #1ea85f);
    color: white;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(37, 211, 102, 0.4);
}

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

.social-links a {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.social-links a:hover {
    text-decoration: underline;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-inner p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-inner a {
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-inner a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .faq-intro {
        text-align: center;
    }
}

@media (max-width: 860px) {
    /* Mobile Menu - Fixed & Reliable */
    .nav-toggle-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s;
        z-index: 999;
    }

    .nav-links a {
        padding: 0.9rem 1rem;
        border-radius: 12px;
        font-size: 1.05rem;
    }

    .nav-toggle:checked ~ .nav-links {
        max-height: 480px;
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger animation */
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .metric-divider {
        display: none;
    }

    .hero {
        padding: 3.5rem 0 3.25rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: calc(100% - 1.5rem);
    }

    .topbar-inner {
        height: 64px;
    }

    .brand-logo, .brand-mark {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 1.2rem;
    }

    .nav-links {
        top: 64px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }

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

    .section {
        padding: 3.25rem 0;
    }

    .hero-metrics {
        gap: 1.25rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 2.1rem;
    }
}