/* ========================================
   1. GLOBAL RESET & VARIABLES
   ======================================== */
html {
    scroll-behavior: smooth;
}

:root { 
    --primary: #0C3166; 
    --accent: #b89146; 
    --text-main: #334155; 
    --bg-light: #f4f7f9; 
    --bg-body: #ffffff; 
}

* { 
    box-sizing: border-box; 
}

/* ========================================
   2. TYPOGRAPHY & BODY
   ======================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    margin: 0;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-body);
}

h1, h2, h3 { 
    font-family: "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", "Droid Serif", "Times", "Source Serif Pro", serif;
    color: var(--primary);
    letter-spacing: -0.01em;
}

/* Scroll Margin for Sticky Header */
#about, #services, #news, #team, #contact { 
    scroll-margin-top: 120px; 
}

/* ========================================
   3. HEADER & NAVIGATION
   ======================================== */
/* --- COMPACT HEADER --- */
header { 
    background: #fff; 
    padding: 0.6rem 5%; /* Reduced from 1rem (16px) to 0.6rem (~10px) */
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 3px solid var(--primary); 
}

.logo img { 
    height: 70px; /* Reduced from 70px to 50px */
    display: block; 
}

/* Ensure the logo link adapts to the new size */
.logo-link img {
    height: 70px;
    width: auto;
}

nav a { 
    margin-left: 25px; /* Slightly reduced margin for tighter spacing */
    text-decoration: none; 
    color: var(--primary); 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 0.8rem; /* Slightly smaller text */
    transition: color 0.3s ease;
}

nav a:hover { 
    color: var(--accent); 
}

/* ========================================
   4. HERO SECTION
   ======================================== */
/* --- COMPACT HERO SECTION --- */
.hero { 
    background: linear-gradient(rgba(12, 49, 102, 0.9), rgba(12, 49, 102, 0.8)), 
                url('banner.jpg'); 
    background-size: cover; 
    background-position: center;
    padding: 100px 10%; /* Reduced from 100px to 60px */
    text-align: center; 
    color: white; 
    /* Removed min-height to let content dictate size */
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

.hero h1 { 
    color: #ffffff !important; 
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* Further reduced max size */
    margin-bottom: 12px; 
    line-height: 1.2;
}

.hero p {
    color: #ffffff;
    font-size: 1rem; /* Reduced from 1.1rem */
    max-width: 650px; /* Slightly narrower for compact look */
    margin: 0 auto 20px auto; 
    line-height: 1.6;
}

/* CTA Button (Discrete & Elegant) - Centered */
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    margin: 15px auto 0 auto; /* Reduced top margin */
    padding: 0;
    background: transparent;
    color: #ffffff;
    font-weight: 600;
    text-transform: none;
    text-decoration: none;
    font-size: 1rem; /* Slightly smaller */
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.hero-cta-btn:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.hero-cta-btn::after {
    content: '→';
    margin-left: 8px;
    font-size: 1.1rem;
    transition: margin-left 0.3s ease;
}

.hero-cta-btn:hover::after {
    margin-left: 12px;
}

/* ========================================
   5. STATS BAR
   ======================================== */
/* --- STATS BAR (Scaled Back) --- */
.stats-bar { 
    padding: 25px 0; /* Reduced from 60px to 30px */
    border-bottom: 1px solid #eee; 
    background: #fff; 
}

.stats-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-around; 
    text-align: center; 
}

.stat-number { 
    display: block; 
    font-size: 2rem; /* Reduced from 3rem to 2rem */
    font-weight: 600; 
    color: var(--primary); 
    font-family: "Playfair Display", serif; 
    line-height: 1.2; /* Tighten line height */
}

.stat-label { 
    color: var(--accent); 
    text-transform: uppercase; 
    font-size: 0.7rem; /* Reduced from 0.8rem to 0.7rem */
    letter-spacing: 1.5px; 
    margin-top: 5px; /* Add a tiny gap */
}

/* ========================================
   6. LAYOUT UTILITIES
   ======================================== */
.container { 
    padding: 80px 10%; 
    max-width: 1200px; 
    margin: auto; 
}

.section-title { 
    text-align: center; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 40px; 
}

.section-title::after { 
    content: ''; 
    display: block; 
    width: 60px; 
    height: 3px; 
    background: var(--accent); 
    margin: 15px auto; 
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

/* ========================================
   7. CARDS (Services, News, Team)
   ======================================== */
.card, .team-card, .news-card { 
    padding: 30px; 
    border: 1px solid #eee; 
    border-top: 4px solid var(--accent); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    background: white; 
}

.card:hover, .team-card:hover, .news-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
}

/* ========================================
   8. NEWS SECTION
   ======================================== */
.news-section { 
    background: var(--bg-light); 
}

.member-role { 
    color: var(--accent); 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    font-weight: 600; 
    display: block; 
    margin-bottom: 10px; 
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}
.news-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    display: block;
}
.read-more:hover {
    color: var(--accent);
}

/* ========================================
   9. FOOTER
   ======================================== */
footer { 
    background: var(--primary); 
    color: #ccc; 
    text-align: center; 
    padding: 4rem 10%; 
}

.footer-brand { 
    color: white; 
    font-family: "Playfair Display", serif; 
    font-size: 1.5rem; 
    display: block; 
    margin-bottom: 10px;
}

.footer-contact { 
    color: var(--accent); 
    text-decoration: none; 
    font-weight: 600; 
    display: block; 
    margin-top: 10px; 
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-contact:hover { 
    color: #ffffff; 
    transform: scale(1.05); 
}

.social-link {
    color: var(--accent);
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.social-link svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* ========================================
   10. MODAL STYLES
   ======================================== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.8); 
    backdrop-filter: blur(5px); 
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent);
}

.modal-date {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

.modal-text h3 {
    color: var(--primary);
    margin-top: 20px;
}

.modal-text ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.modal-text li {
    margin-bottom: 10px;
}

/* ========================================
   11. MOBILE NAVIGATION (HAMBURGER)
   ======================================== */
.menu-checkbox { 
    display: none; 
}

.menu-icon { 
    display: none; 
    cursor: pointer; 
}

/* ========================================
   12. RESPONSIVE MEDIA QUERIES
   ======================================== */
@media (max-width: 768px) {
    /* Stats Bar */
    .stats-container { 
        flex-direction: column; 
        gap: 30px; 
    }
    
    /* Navigation */
    .menu-icon { 
        display: block; 
    }
    
    .nav-menu { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: white; 
        padding: 20px; 
        border-bottom: 3px solid var(--primary);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .menu-checkbox:checked ~ .nav-menu { 
        display: flex; 
    }
    
    .menu-icon span { 
        display: block; 
        width: 25px; 
        height: 3px; 
        background: var(--primary); 
        margin: 5px 0; 
    }
    
    /* CTA Button */
    .hero-cta-btn {
        font-size: 0.9rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
        padding: 25px;
        width: 95%;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}