/* ---------- Color & Elevation System ---------- */
:root {
    /* brand */
    --color-primary: #4C51BF;
    --color-primary-dark: #3730A3;
    --color-secondary: #0D9488;
    --color-accent: #D97706;

    /* neutrals */
    --color-bg: #F9FAFB;
    --color-surface: #FFFFFF;
    --color-text: #374151;
    --color-header-shadow: rgba(0, 0, 0, 0.08);
    --border-soft: rgba(17, 24, 39, 0.06);

    /* derived */
    --color-header-bg: var(--color-primary-dark);
    --color-hero-overlay: rgba(76, 81, 191, 0.75);
    --color-footer-bg: #1E293B;

    /* shadows */
    --shadow-1: 0 2px 6px rgba(17, 24, 39, 0.04), 0 1px 2px rgba(17, 24, 39, 0.04);
    --shadow-2: 0 8px 24px rgba(17, 24, 39, 0.06), 0 2px 4px rgba(17, 24, 39, 0.04);
    --shadow-3: 0 16px 32px rgba(17, 24, 39, 0.08), 0 4px 8px rgba(17, 24, 39, 0.05);
}

/* ---------- Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--color-text);
    line-height: 1.6;

    /* New soft gradient background to make cards pop */
    background: radial-gradient(circle at 0% 0%, #EEF2FF 0%, var(--color-bg) 60%) fixed;
}

/* Optional subtle noise overlay (can remove if you don't like it)
body::after {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160'
height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise'
baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160'
height='160' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
z-index: -1;
} */

/* ---------- Header ---------- */
header {
    background: var(--color-header-bg);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 20px 0;
    box-shadow: 0 2px 8px var(--color-header-shadow);
    backdrop-filter: saturate(180%) blur(6px);
}

header .container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--color-surface);
    font-size: 24px;
}

@media (min-width: 768px) {
    header nav ul {
        display: flex;
    }
}

header nav ul {
    list-style: none;
    gap: 20px;
}

header nav a {
    color: var(--color-surface);
    text-decoration: none;
    font-weight: 500;
    transition: opacity .2s;
}

header nav a:hover {
    opacity: .75;
}

/* ---------- Sections ---------- */
section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--color-primary);
}

/* ---------- Hero ---------- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-attachment: fixed;
    color: var(--color-surface);
    background: linear-gradient(rgba(30,58,138,0.8), rgba(30,58,138,0.8)), url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=compress&cs=tinysrgb&h=800') center center / cover no-repeat fixed;
    url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=compress&cs=tinysrgb&h=800') center/cover no-repeat;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: auto;
}

.hero a {
    margin-top: 30px;
    display: inline-block;
    background: var(--color-secondary);
    color: var(--color-surface);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s;
    box-shadow: var(--shadow-2);
}

.hero a:hover {
    background: var(--color-primary);
}

/* ---------- Grid &amp; Cards ---------- */
.grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;

    /* enable 3D perspective */
    perspective: 1200px;
}

.card {
    position: relative;
    background: var(--color-surface);
    border-radius: 16px;
    padding: 28px 26px;
    text-align: center;

    /* visible border + layered shadows */
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-1);

    /* modern 3D hover feel */
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}

.card:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-1.5deg) scale(1.01);
    box-shadow: var(--shadow-3);
}

/* subtle top edge light for depth */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 40%);
    opacity: .35;
    pointer-events: none;
}

.card img {
    width: 60px;
    margin-bottom: 15px;
}

.card h3 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.card p {
    font-size: .95rem;
}

.card ul {
    list-style: none;
    text-align: left;
    padding: 0;
    margin-top: 20px;
}

.card ul li::before {
    content: '✓';
    color: var(--color-secondary);
    margin-right: 8px;
}

/* ---------- Achievements section contrast booster ---------- */
#achievements {
    background: linear-gradient(135deg, #EEF2FF 0%, #F9FAFB 100%);
}

/* ---------- Contact ---------- */
.contact-section {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}

.contact-info, .contact-map {
    flex: 1;
    min-width: 280px;
}

.contact-info {
    background: var(--color-surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
}

/* ---------- Footer ---------- */
footer {
    background: var(--color-footer-bg);
    color: var(--color-surface);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* ---------- Floating WhatsApp Button ---------- */
a[href*="wa.me"] {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s, transform .2s;
}

a[href*="wa.me"]:hover {
    opacity: .9;
    transform: translateY(-2px);
}

a[href*="wa.me"] svg {
    width: 28px;
    height: 28px;
}

/* ---------- Accessibility: Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .card, .hero a, header nav a, a[href*="wa.me"] {
        transition: none !important;
        transform: none !important;
    }
}

.whatsapp_icon {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* ----- Blog grid/cards ----- */
.blog-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden; /* round the image corners too */
    box-shadow: var(--shadow-1);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}

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

.blog-card > img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-content {
    padding: 18px 20px 22px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.blog-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-dot {
    opacity: .6;
    margin: 0 4px;
}

.blog-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 6px 0 8px;
}

.blog-excerpt {
    font-size: .95rem;
    color: #374151;
    margin: 0;
}

/* --- layout tweaks already present --- */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- hamburger icon --- */
.hamburger {
    display: none; /* shown only on mobile */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-left:auto;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--color-surface);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* --- hide native checkbox --- */
.nav-toggle {
    display: none;
}

/* --- mobile rules --- */
@media (max-width: 768px) {
    /* show hamburger, hide desktop list */
    .hamburger {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-header-bg);
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        display: none; /* hidden until toggled */
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        display: block;
        padding: 10px 20px;
    }

    /* checkbox acts as toggle */
    .nav-toggle:checked + .hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked + .hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-toggle:checked ~ nav ul {
        display: flex;
    }
}
