/* 
   Modern Portal Theme - From Scratch Redesign 
   Replaces kickstart.css
*/

:root {
    /* Brand Colors - Stripe-like */
    --primary: #635bff;
    --primary-dark: #4b45c2;
    --secondary: #0a2540;
    --accent: #00d4ff;
    --bg-gradient-1: hsla(253, 16%, 7%, 1);
    --bg-gradient-2: hsla(225, 39%, 30%, 1);
    --bg-gradient-3: hsla(339, 49%, 30%, 1);
    --white: #ffffff;
    --gray-100: #f6f9fc;
    --gray-200: #e3e8ee;
    --text-main: #32325d;
    --text-light: #425466;

    /* Spacing & Layout */
    --container-width: 1140px;
    --radius-card: 12px;
    --radius-btn: 24px;
    --shadow-card: 0 13px 27px -5px rgba(50, 50, 93, 0.25), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);

    /* Fonts */
    --font-heading: 'Arimo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #ff3e00;
    background-image:
        radial-gradient(at 10% 10%, var(--bg-gradient-1) 0, transparent 50%),
        radial-gradient(at 50% 0%, var(--bg-gradient-2) 0, transparent 50%),
        radial-gradient(at 100% 0%, var(--bg-gradient-3) 0, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--secondary);
    margin-top: 0;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.main-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-top: 40px;
    margin-bottom: 40px;
    overflow: hidden;
    /* Contains children */
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    padding: 40px;
    flex: 1;
}

/* --- HEADER & NAV --- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-light);
    font-size: 15px;
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--primary);
}

/* --- MEGA MENU --- */
.mega-menu-trigger:hover .mega-menu-panel {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* Full width */
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    padding: 30px 40px;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

.districts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.districts-grid a {
    color: var(--text-light);
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px solid transparent;
}

.districts-grid a:hover {
    color: var(--primary);
    transform: translateX(5px);
    display: inline-block;
}


/* --- HERO SECTION --- */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--gray-100) 0%, #fff 100%);
    border-bottom: 1px solid var(--gray-200);
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 30px;
}

/* --- SEARCH BAR --- */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    border-radius: var(--radius-btn);
    border: 2px solid var(--gray-200);
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.15);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* --- CARD GRIDS (Generic) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.card-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary);
}

.card-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.site-footer a {
    color: var(--text-light);
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--primary);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .districts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .main-card {
        margin: 20px 10px;
    }
}
/* --- BREADCRUMBS --- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child):after {
    content: '›';
    margin: 0 8px;
    color: var(--gray-200); /* Lighter separator */
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.breadcrumbs li:last-child {
    color: var(--secondary); /* Active/last item darker */
    font-weight: 600;
}


/* --- HEADER SEARCH (Compact) --- */
.header-search {
    position: relative;
    width: 300px;
    margin-right: 20px;
}

.header-search .search-input {
    padding: 8px 15px;
    padding-right: 40px; /* Space for button */
    font-size: 14px;
    height: 38px;
    border-radius: 20px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.header-search .search-input:focus {
    background: #fff;
    border-color: var(--primary);
}

.header-search .search-btn {
    top: 3px;
    right: 3px;
    bottom: 3px;
    padding: 0 12px;
    border-radius: 18px;
    font-size: 12px;
}


/* --- MEGA MENU FIX --- */
.site-header {
    position: relative; /* Ensure header is the anchor */
}

.mega-menu-trigger {
    position: static; /* Allow dropdown to escape the link width */
}

.mega-menu-panel {
    width: 100%;
    left: 0;
    right: 0;
    border-radius: 0 0 12px 12px; /* Smooth corners at bottom */
}


/* --- MOBILE LAYOUT IMPROVEMENTS --- */
@media (max-width: 768px) {
    .main-card {
        margin: 20px 8px !important; /* Increase side margins for better 'breathing' room outside */
        border-radius: 16px;
    }

    .content-wrapper {
        padding: 30px 20px !important; /* Adjust internal padding to balance text width and whitespace */
    }

    .hero-section {
        padding: 40px 20px !important;
    }

    .cards-grid {
        grid-template-columns: 1fr; /* Full width cards on mobile for better readability */
        gap: 20px;
    }
    
    .header-search {
        display: none; /* Hide compact search on mobile since we have the hero or can add a toggle later */
    }
}


/* --- MEGA MENU ACTIVE STATE (JS-Toggled) --- */
.mega-menu-trigger.active .mega-menu-panel {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

