/* --- 1. General Reset & Typography --- */
:root {
    --theme-blue: #1E446B;
    --theme-gold: #A89131;
    --text-dark: #333;
    --text-light: #f4f4f4;
    --glow-blue: #259dea; 
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body, html { min-height: 100%; width: 100%; overflow-x: hidden; background-color: #f9f9f9; }

/* --- 2. Header Styles --- */
.header-wrapper {
    position: sticky; top: 20px; z-index: 1000; width: 100%;
    display: flex; justify-content: center; padding: 0 20px; 
}

.main-header {
    background-color: white; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%; max-width: 1200px; border-radius: 50px; padding: 0 30px;
}

.navbar { display: flex; justify-content: space-between; align-items: center; height: 70px; }

/* Logo */
.logo { display: flex; align-items: center; text-decoration: none; z-index: 1001; flex-shrink: 0; }
.logo svg { height: 42px; width: auto; display: block; }
.logo-fill-dark { fill: #191918; }
.logo-fill-gold { fill: #a89131; stroke: #a89131; stroke-miterlimit: 10; }
.logo-fill-blue { fill: #1e446b; stroke: #1e446b; stroke-miterlimit: 10; }
.logo-fill-darkblue { fill: #1b3b6a; }

/* Nav Links */
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--theme-blue); font-weight: 600; font-size: 1rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--theme-gold); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-content {
    display: none; position: absolute; background-color: white; min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1); z-index: 2000; top: 100%; left: 0;
    border-radius: 8px; overflow: hidden; padding: 10px 0; border-top: 3px solid var(--theme-gold);
}
.dropdown-content a {
    color: var(--text-dark); padding: 12px 20px; text-decoration: none; display: block;
    font-size: 0.95rem; border-bottom: 1px solid #f0f0f0; transition: all 0.3s;
}
.dropdown-content a:hover { background-color: #f9f9f9; color: var(--theme-blue); padding-left: 25px; }
.nav-links li:hover .dropdown-content { display: block; animation: fadeIn 0.3s ease; }

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

/* Header Button */
.header-btn {
    background-color: var(--theme-blue); color: white; padding: 10px 25px;
    border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: background 0.3s; display: inline-block; white-space: nowrap;
}
.header-btn:hover { background-color: var(--theme-gold); }

/* Hamburger */
.hamburger { display: none; font-size: 1.5rem; color: var(--theme-blue); cursor: pointer; z-index: 1001; }

/* --- 3. Hero Section (Home) --- */
.hero-section {
    position: relative; isolation: isolate; min-height: 100vh; margin-top: -90px;
    padding-top: 140px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: white; padding-bottom: 60px; overflow: hidden; 
}
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(30, 68, 107, 0.85), rgba(16, 40, 65, 0.95)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2670&auto=format&fit=crop');
    background-size: cover; background-position: center; z-index: -1; 
    animation: heroKenBurns 20s infinite alternate linear;
}
@keyframes heroKenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }

.hero-section h1 { font-size: 5rem; font-weight: 700; text-align: center; margin-bottom: 10px; max-width: 900px; line-height: 1.2; padding: 0 10px; z-index: 2; }
.hero-section .subtitle { font-size: 1.2rem; margin-bottom: 50px; font-weight: 400; opacity: 0.9; z-index: 2; }

/* --- 4. Cards Slider (Horizontal Scroll Layout) --- */
.cards-container {
    display: flex; /* Flex makes them sit in a row */
    gap: 20px;
    overflow-x: auto; /* Enables horizontal scroll */
    scroll-snap-type: x mandatory; /* Snaps to cards */
    scroll-behavior: smooth;
    padding: 30px 20px; /* Padding for hover shadows */
    width: 100%;
    max-width: 1200px;
    
    /* Hide Scrollbar */
    -ms-overflow-style: none;  /* IE/Edge */
    scrollbar-width: none;  /* Firefox */
}
.cards-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.card {
    position: relative; background: white; border-radius: 12px;
    min-width: 300px; max-width: 300px; /* Fixed width prevents shrinking */
    min-height: 250px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    isolation: isolate; 
    scroll-snap-align: center; /* Snaps card to center */
    flex-shrink: 0; /* Important! Prevents cards from squishing on mobile */
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--card-bg-image); background-size: cover; background-position: center;
    opacity: 0; z-index: -2; transition: opacity 0.4s ease, transform 0.8s ease; 
}
.card::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(30, 68, 107, 0.85); opacity: 0; transition: opacity 0.4s ease; z-index: -1;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(37, 157, 234, 0.5), 0 0 15px rgba(37, 157, 234, 0.3) inset; }
.card:hover::before { opacity: 1; transform: scale(1.1); }
.card:hover::after { opacity: 1; }

.card-content { padding: 30px 15px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; z-index: 2; }
.card i { font-size: 3.5rem; color: transparent; -webkit-text-stroke: 2px var(--theme-blue); margin-bottom: 5px; transition: all 0.4s ease; }
.card h3 { font-size: 1.1rem; font-weight: 700; color: var(--theme-blue); transition: all 0.4s ease; }
.card:hover i { color: white; -webkit-text-stroke: 0; }
.card:hover h3 { color: white; }
.card-btn {
    background-color: var(--theme-gold); color: white; width: 100%; padding: 15px 0;
    text-align: center; text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: background 0.3s; z-index: 2; border-top: 1px solid rgba(255,255,255,0.1);
}
.card-btn:hover { background-color: #8c7826; }

/* --- 5. Internal Page Styles --- */
.page-header {
    background-image: linear-gradient(rgba(30, 68, 107, 0.9), rgba(30, 68, 107, 0.8)), var(--header-bg);
    background-size: cover; background-position: center; padding: 120px 5% 60px;
    color: white; text-align: center; margin-top: -90px; padding-top: 160px;
}
.page-header h1 { font-size: 3.5rem; margin-bottom: 15px; }
.breadcrumb { color: var(--theme-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.section-container {
    max-width: 1200px; margin: 80px auto; padding: 0 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.section-text h2 { color: var(--theme-blue); font-size: 2.5rem; margin-bottom: 20px; position: relative; }
.section-text h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--theme-gold); margin-top: 10px; }
.section-text p { line-height: 1.8; color: #555; margin-bottom: 20px; font-size: 1.05rem; }
.section-text ul { list-style: none; margin-top: 20px; }
.section-text ul li { margin-bottom: 15px; display: flex; align-items: center; gap: 15px; font-weight: 600; color: var(--theme-blue); }
.section-text ul li i { color: var(--theme-gold); }
.section-image img { width: 100%; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); transition: transform 0.5s ease; }
.section-image img:hover { transform: scale(1.02); }

/* Mission/Values */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.value-card { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border-bottom: 3px solid var(--theme-gold); transition: transform 0.3s; }
.value-card:hover { transform: translateY(-5px); background: var(--theme-blue); }
.value-card:hover h3, .value-card:hover p, .value-card:hover i { color: white !important; }
.value-card h3 { color: var(--theme-blue); margin-bottom: 10px; font-size: 1.3rem; }
.value-card p { color: #666; font-size: 0.95rem; line-height: 1.6; }

/* Contact Page */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }
.contact-info-box { background: var(--theme-blue); color: white; padding: 40px; border-radius: 15px; }
.info-item { margin-bottom: 30px; }
.info-item i { color: var(--theme-gold); font-size: 1.5rem; margin-bottom: 10px; display: block; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; }
.submit-btn { background: var(--theme-gold); color: white; border: none; padding: 15px 40px; border-radius: 50px; font-weight: bold; cursor: pointer; transition: background 0.3s; }
.submit-btn:hover { background: #8c7826; }

/* --- 6. Footer --- */
.main-footer { background-color: var(--theme-blue); color: white; padding: 60px 5% 20px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-col h4 { font-size: 1.2rem; margin-bottom: 20px; color: var(--theme-gold); text-transform: uppercase; letter-spacing: 1px; }
.footer-col p, .footer-links a { color: #d1d9e6; line-height: 1.6; text-decoration: none; font-size: 0.95rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: rgba(255,255,255,0.1); color: white; border-radius: 50%; text-decoration: none; transition: all 0.3s; }
.social-icons a:hover { background-color: var(--theme-gold); }
.footer-bottom { text-align: center; padding-top: 20px; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* --- 7. Responsive (Mobile & Tablet) --- */
@media (max-width: 1000px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: absolute; top: 70px; left: 0; width: 100%;
        background-color: white; flex-direction: column;
        align-items: center; gap: 0; padding: 0;
        border-radius: 0 0 20px 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out;
    }
    .nav-links.active { max-height: 100vh; overflow-y: auto; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { display: block; padding: 15px 0; border-bottom: 1px solid #f0f0f0; width: 100%; }
    .header-btn { display: none; }

    /* Mobile Dropdown Fix */
    .dropdown-content { position: static; box-shadow: none; border-top: none; padding-left: 0; background: #f8f9fa; display: none; }
    .dropdown-content a { padding-left: 0; font-size: 0.9rem; color: #555; }
    .dropdown.active .dropdown-content { display: block; animation: mobileFadeIn 0.3s; }
    .nav-links li:hover .dropdown-content { display: none; } 
    .nav-links li.dropdown.active .dropdown-content { display: block; }

    @keyframes mobileFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    
    /* Hero */
    .hero-section h1 { font-size: 3rem; }
    
    /* Internal Pages */
    .section-container, .contact-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 2.5rem; }
    
    /* IMPORTANT: We DO NOT force .cards-container to grid here.
       This allows the "flex" slider defined above to work on Mobile/Tablet.
    */
}

@media (max-width: 600px) {
    .header-wrapper { padding: 0 10px; }
    .main-header { padding: 0 15px; }
    .hero-section h1 { font-size: 2.5rem; line-height: 1.1; }
    .logo { margin-right: auto; }
    .hamburger { margin-left: 20px;}
    /* Removed the grid override here too! */
}