/* =============================================================
   IUC TURIN — COMPLETE style.css
   ============================================================= */

/* ── 1. CSS VARIABLES ─────────────────────────────────────── */
:root {
    --primary-dark:   #1a1a2e;
    --accent-gold:    #C9A227;
    --accent-gold-lt: #F5E6B8;
    --accent-gold-sf: #FDF8E8;
    --iuc-brown:      #4A3C10;
    --bg-light-gray:  #f8f9fa;
    --text-muted:     #6c757d;
    --white:          #ffffff;
    --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.15);
    --radius:         8px;
    --transition:     all 0.3s ease;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--primary-dark);
    background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; transition: var(--transition); }
ul  { list-style: none; }

/* ── 3. UTILITY ───────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 80px 0; }
.section.bg-light { background: var(--bg-light-gray); }

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    margin: 12px auto 0;
    border-radius: 2px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .grid-2-col { grid-template-columns: 1fr; }
}

/* ── 4. BUTTONS ───────────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #D4AF37 50%, #B8941F 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(201,162,39,0.3);
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,162,39,0.45);
    background: linear-gradient(135deg, #D4AF37 0%, #E4C44A 50%, var(--accent-gold) 100%);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── 5. TOP UTILITY BAR ───────────────────────────────────── */
.top-utility-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    padding: 8px 0;
    text-align: center;
}

.top-utility-bar a {
    color: rgba(255,255,255,0.8);
    margin: 0 6px;
    transition: var(--transition);
}

.top-utility-bar a:hover,
.top-utility-bar .donate-link {
    color: var(--accent-gold);
}

/* ── 6. MAIN NAVBAR ───────────────────────────────────────── */
/* White bar + logo alignment shared across the whole site */
.main-navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px; /* white bar height */
}

/* UPDATED LOGO STYLES – text + image kept consistent */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;     /* fixed text logo size */
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    line-height: 1;         /* avoid vertical stretching */
    margin: 0;              /* no page-specific shifts */
    padding: 0;
    white-space: nowrap;    /* keep "IUC Turin" on one line */
}

.brand-logo span {
    font-size: 0.9em;       /* subtle hierarchy if you use IUC <span>Turin</span> */
}

.brand-logo-img {
    max-height: 60px;       /* safely inside 80px bar */
    width: auto;
    display: block;
}

/* ── DESKTOP Nav links ──────────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li > a {
    display: block;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: var(--accent-gold);
    background: var(--accent-gold-sf);
}

/* Mobile toggle button — hidden on desktop */
.mobile-toggle {
    display: none;
    background: none;
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 6px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-dark);
    transition: var(--transition);
}

.mobile-toggle:hover { background: var(--accent-gold-sf); }

/* ── 7. DROPDOWN SUBMENUS ─────────────────────────────────── */
.nav-links .has-submenu { position: relative; }

.nav-links .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    padding: 8px 0;
    border-top: 3px solid var(--accent-gold);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 99999;
    list-style: none;
    margin: 0;
}

.nav-links .has-submenu:hover > .sub-menu { display: block; }

.nav-links .sub-menu li { margin: 0; padding: 0; }

.nav-links .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links .sub-menu a:hover {
    background: var(--accent-gold-sf);
    color: var(--accent-gold);
}

/* ── 8. HERO SECTION ──────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(26,26,46,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 60px 24px 60px 60px;
    color: var(--white);
}

.hero-badge {
    display: inline-block;
    background: rgba(201,162,39,0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--white);
}

.hero h2 {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-inner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2d2d4e 100%);
    padding: 60px 0;
    color: var(--white);
    text-align: center;
}

.hero-inner h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.hero-inner p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
}

/* ── 9. INFO BOX ──────────────────────────────────────────── */
.info-box {
    background: var(--accent-gold-sf);
    border: 1px solid var(--accent-gold-lt);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 28px 32px;
}

.info-box p { margin-bottom: 8px; color: var(--primary-dark); line-height: 1.8; }
.info-box p:last-child { margin-bottom: 0; }

/* ── 10. FEATURE LIST ─────────────────────────────────────── */
.feature-list-item {
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.feature-list-item:last-child { border-bottom: none; }

.feature-list-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.feature-list-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── 11. STATS GRID ───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid var(--accent-gold-lt);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.stat-card .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--iuc-brown);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── 12. BLOG / NEWS ──────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: block;
}

.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card.hidden { display: none; }
.blog-card.show { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img { transform: scale(1.04); }

.blog-card-content { padding: 20px 24px 24px; }

.blog-tag {
    display: inline-block;
    background: var(--accent-gold-sf);
    color: var(--iuc-brown);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border: 1px solid var(--accent-gold-lt);
}

.blog-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.read-more {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-gold);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.read-more:hover { border-bottom-color: var(--accent-gold); }

.blog-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    color: var(--iuc-brown);
    border: 2px solid var(--accent-gold);
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: linear-gradient(135deg, var(--accent-gold-lt), var(--accent-gold-sf));
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #D4AF37 50%, #B8941F 100%);
    color: #1a1a1a;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(201,162,39,0.4);
}

/* ── 13. PEOPLE / PERSON CARDS ────────────────────────────── */
.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
}

.person-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    padding-bottom: 24px;
}

.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.person-card img { width: 100%; height: 200px; object-fit: cover; }

.person-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 16px 16px 6px;
}

.person-card p { font-size: 0.875rem; color: var(--text-muted); padding: 0 16px; }

/* ── 14. STEP CARDS ───────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.step-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--accent-gold);
    transition: var(--transition);
}

.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-gold);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    margin-bottom: 16px;
}

.step-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.step-card p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* ── 15. COSMOPOLITAN SECTION ─────────────────────────────── */
.cosmopolitan-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 900px) {
    .cosmopolitan-layout { grid-template-columns: 1fr; gap: 40px; }
}

.cosmopolitan-text { display: flex; flex-direction: column; }

.cta-golden {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #D4AF37 50%, #B8941F 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(201,162,39,0.4);
    transition: var(--transition);
    border: 2px solid var(--accent-gold);
    text-align: center;
    max-width: 280px;
}

.cta-golden:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(201,162,39,0.5); }

.cosmopolitan-stats { display: flex; flex-direction: column; gap: 20px; align-items: center; }

.golden-stat-box {
    background: var(--white);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 30px 40px;
    text-align: center;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(201,162,39,0.15);
    transition: var(--transition);
}

.golden-stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(201,162,39,0.25);
    border-color: #D4AF37;
}

.golden-stat-box .stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1.1;
    margin-bottom: 8px;
}

.golden-stat-box .stat-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5C4A0A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── 16. FOOTER ───────────────────────────────────────────── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-heading {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: 10px; font-size: 0.875rem; color: rgba(255,255,255,0.7); }

.footer-links a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer-links a:hover { color: var(--accent-gold); }

copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* ── 17. MOBILE RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {

    .mobile-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0;
        box-shadow: var(--shadow-md);
        gap: 0;
        z-index: 999;
    }

    .nav-links.active { display: flex; }

    .nav-links > li > a {
        color: rgba(255,255,255,0.9);
        padding: 12px 24px;
        border-radius: 0;
        font-size: 0.95rem;
        background: transparent;
    }

    .nav-links > li > a:hover,
    .nav-links > li > a.active {
        background: rgba(201,162,39,0.15);
        color: var(--accent-gold);
    }

    .nav-links .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--accent-gold);
        border-radius: 0;
        padding: 0;
        margin: 0 0 0 24px;
        background: transparent;
        min-width: unset;
    }

    .nav-links .has-submenu.open > .sub-menu { display: block; }

    .nav-links .has-submenu > a::after {
        content: ' ▾';
        font-size: 0.75em;
        opacity: 0.7;
        float: right;
        margin-right: 4px;
    }

    .nav-links .has-submenu.open > a::after { content: ' ▴'; }

    .nav-links .sub-menu a {
        font-size: 0.875rem;
        padding: 10px 16px;
        color: rgba(255,255,255,0.75);
        background: transparent;
    }

    .nav-links .sub-menu a:hover {
        background: transparent;
        color: var(--accent-gold);
    }

    .hero-content { padding: 40px 24px; }
    .hero         { min-height: 480px; }
    .section      { padding: 56px 0; }
    .section-title { font-size: 1.6rem; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .footer-grid  { grid-template-columns: 1fr; }
    .btn-group    { flex-direction: column; align-items: center; }
    .hero h1      { font-size: 1.8rem; }
}

/* ── 18. PLACEHOLDER FIX (shared components) ──────────────── */
#navbar-placeholder:empty,
#footer-placeholder:empty {
    height: 0;
    min-height: 0;
    overflow: hidden;
    display: block;
}
/* Prevent nav expanding before JS loads */
#navbar-placeholder:empty {
    height: 0 !important;
    overflow: hidden !important;
}
