:root {
    /* Color Palette: Deep Blue & Gold for institutional/luxury feel */
    --primary-color: #0d253f;
    /* Deep Navy Blue */
    --primary-light: #1c3c66;
    /* Lighter Navy */
    --accent-color: #d4af37;
    /* Gold Accent */
    --accent-hover: #b89626;
    /* Darker Gold */
    --bg-color: #f4f6f9;
    /* Very Light Grey-Blue bg */
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #333333;
    --text-muted: #666666;
    --light-text: #ffffff;
    --border-color: #e2e8f0;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;

    /* Styling */
    --shadow-soft: 0 4px 20px rgba(13, 37, 63, 0.08);
    --shadow-hover: 0 10px 30px rgba(13, 37, 63, 0.15);
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

/* Header Navbar */
.main-header {
    background: linear-gradient(to right, #0f2a44, #123a5a); /* Premium subtle gradient */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--light-text);
    text-decoration: none;
}

.brand-logo:hover {
    color: var(--light-text);
    opacity: 0.9;
}

.header-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 2px;
    background: rgba(255, 255, 255, 0.92); /* Subtle light background */
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Soft drop shadow */
}

.logo-subtext {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--bg-color);
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 0;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none; /* hidden on desktop */
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 4%;
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.main-footer .footer-sub {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--primary-color) !important;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color) !important;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--primary-color) !important;
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background-color: #ffffff;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Alerts and Status */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-pending {
    background-color: #fef08a;
    color: #854d0e;
}

.badge-active {
    background-color: #bbf7d0;
    color: #166534;
}

/* Auth Pages Layout */
.auth-page {
    min-height: 100vh;
    background: #f5f7fa; /* soft light grey for subtle contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-page .glass-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    border: none;
    backdrop-filter: none;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* Dashboard Specific Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar-panel .glass-card {
    padding: 1.5rem;
    text-align: center;
}

.profile-thumb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-color);
    padding: 2px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--primary-light);
    color: var(--light-text);
    font-weight: 500;
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {

    .auth-page {
        padding: 1.5rem 1rem;
    }

    .auth-logo img {
        height: 55px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-direction: row;
        flex-wrap: wrap; /* allow nav to drop down */
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
    }

    .brand-logo {
        align-items: flex-start;
    }

    .header-logo-img {
        height: 55px; /* Slight scale down for mobile, inherits padding/background cleanly */
        margin-bottom: 2px;
    }

    .logo-subtext {
        font-size: 0.65rem;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--accent-color);
        font-size: 2rem;
        cursor: pointer;
        padding: 0;
    }

    .main-nav {
        display: none; /* hidden by default */
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
    }

    .main-nav.active {
        display: flex;
        animation: fadeSlideDown 0.3s ease forwards;
    }

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

    .main-nav a, .main-nav .nav-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
}

/* Hero Slideshow */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    margin-top: -2rem;
    /* overlap with header */
    border-radius: 0 0 50px 50px;
    background-color: var(--primary-color);
    display: flex;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: -2;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 37, 63, 0.8) 0%, rgba(13, 37, 63, 0.4) 50%, rgba(13, 37, 63, 0.9) 100%);
    z-index: -1;
}

.slide-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    color: var(--light-text);
    animation: slideUpFade 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.slide.active .slide-content {
    animation-delay: 0.3s;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-verse {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

.slide-reference {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0 auto;
    opacity: 0.95;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    color: var(--light-text);
}

.slide-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.slide-text {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 auto;
    color: var(--light-text);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    max-width: 650px;
}

/* Slide Nav Dots */
.slide-nav {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.slide-dot.active {
    background-color: var(--accent-color);
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.slide-dot:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.8);
}

/* UABCSP Secondary Authority Badge */
.uabcsp-badge {
    position: absolute;
    top: 80px;
    right: 40px;
    height: 70px;
    width: auto;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 10;
    object-fit: contain;
}

@media (max-width: 768px) {
    .hero-slideshow {
        height: 80vh;
        min-height: 500px;
        border-radius: 0 0 30px 30px;
    }

    .slide-verse {
        font-size: 2.2rem;
    }

    .slide-reference {
        font-size: 1.1rem;
    }

    .slide-title {
        font-size: 2.2rem;
    }

    .slide-text {
        font-size: 1rem;
    }

    .uabcsp-badge {
        height: 50px;
        top: 70px;
        right: 16px;
    }
}