:root {
    --primary: #12284C;
    /* Navy Blue */
    --primary-hover: #1e3f7a;
    --secondary: #EADDca;
    /* Light Beige Banner Color */
    --secondary-dark: #d5c3a3;
    /* Muted Beige Border Color */

    --bg-base: #FFFFFF;
    --bg-alt: #FAFAFA;
    /* Off white sections */

    --text-main: #334155;
    --text-heading: #1e293b;
    --text-muted: #64748b;
    --text-navy: #12284C;

    --border-color: #e2e8f0;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* Utilities */
.mobile-break {
    display: none;
}

.text-navy {
    color: var(--text-navy);
}

.shadow-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shadow-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.05);
}

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

/* Base Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    font-family: var(--font-body);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-navy {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-navy:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-navy {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-navy:hover {
    background: rgba(18, 40, 76, 0.05);
}

/* Cards Base */
.card {
    padding: 2.5rem;
    border-radius: 8px;
}

.card-white {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-beige {
    background: #fdfaf5;
    border: 1px solid var(--secondary-dark);
    border-bottom-width: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Top Bar */
.top-bar {
    background: var(--secondary);
    padding: 0.6rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-navy);
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--secondary-dark);
}

/* Navigation */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: 100%;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-login-link {
    display: none !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 6rem 0 7rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-base);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background-image: url('images/omsi.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.30;
    /* Less fade */
    filter: blur(3px) grayscale(20%);
    /* Blur it */
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    background: var(--secondary);
    color: var(--text-navy);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Sections Base */
.section {
    padding: 5rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

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

.mb-4 {
    margin-bottom: 3rem;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #eef2f6;
    border-left: 4px solid var(--primary);
    border-radius: 0 6px 6px 0;
}

.info-banner svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Events Timeline Custom mimicking bulletion posts */
.timeline {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
}

.timeline-date {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.timeline-content {
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.past-event .timeline-content {
    opacity: 0.7;
    background: #f8f9fa;
    border-color: #e2e8f0;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.timeline-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-top: auto;
}

.read-more:hover {
    text-decoration: underline;
}

.event-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-muted {
    background: #e2e8f0;
    color: #475569;
}

.tag-warning {
    background: #fee2e2;
    color: #dc2626;
}

.tag-success {
    background: #dcfce7;
    color: #16a34a;
}

.tag-info {
    background: #e0f2fe;
    color: #0284c7;
}

.alert-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.alert-icon {
    color: #d97706;
}

/* Resources */
.resource-card {
    text-align: center;
    /* padding gets handled by .card class now */
}

.resource-icon {
    width: 42px;
    height: 42px;
    color: var(--primary);
    margin: 0 auto 1.5rem;
}

.resource-card h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.resource-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.resource-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-links a {
    display: block;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.resource-links a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Instructions */
.instruction-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 8px;
}

.box-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--text-heading);
    border-bottom: 1px solid var(--secondary-dark);
    padding-bottom: 1rem;
}

.box-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    padding-top: 0.25rem;
}

/* Role Card adjustments */
.role-card {
    text-align: center;
}

.role-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin: 0 auto 1rem;
}

.role-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

.officer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.officer-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--secondary);
    background: #e2e8f0;
}

.officer-info h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-heading);
    line-height: 1.2;
}

.officer-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.officer-info {
    max-width: 100%;
}

.officer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    max-width: 100%;
}

.officer-email span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.officer-email svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Modals */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 40, 76, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;

    /* Animation base */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    padding: 3rem;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    
    /* Hide scrollbar for Chrome/Safari */
    &::-webkit-scrollbar {
        display: none;
    }
    /* Hide scrollbar for IE/Edge/Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;

    /* Child animation base */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.modal.show .modal-content {
    opacity: 1;
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--text-heading);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.admin-link-list {
    list-style: none;
}

.admin-link-list li {
    margin-bottom: 0.5rem;
}

.admin-link-list a {
    color: var(--text-main);
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.admin-link-list a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-officers {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-break {
        display: block;
    }

    .mobile-login-link {
        display: flex !important;
        align-items: center;
        background: #f8fafc;
        padding: 0.75rem 1.5rem;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }

    .nav-actions .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 3rem;
    }

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

/* Admin Dashboard Enhancements */
.admin-modal-content {
    max-width: 900px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--secondary);
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.tab-btn i {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.show {
    display: block;
}

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

.section-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-manage-header h3 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-size: 1.3rem;
}

.manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.manage-item:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-item {
    border-left: 4px solid var(--primary);
}

.item-info {
    display: flex;
    flex-direction: column;
    margin-right: 2.5rem;
    flex: 1;
    overflow: hidden;
}

.item-info strong {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.item-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.item-meta {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(18, 40, 76, 0.05);
}

.icon-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Form Styles */
.form-modal-content {
    max-width: 900px; /* Match dashboard width for consistency */
}

#admin-dashboard {
    min-height: 400px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

textarea.form-control {
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .dashboard-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .manage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}