:root {
    --primary-color: #ffaa42;
    /* Orange */
    --primary-hover: #e6993c;
    --secondary-color: #3c4a60;
    /* Dark Blue/Grey */
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    /* Very light grey */
    --text-color: #000000;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-main: 'Cairo', sans-serif;
    /* Keep Cairo or switch to Inter/Roboto for English if preferred, Cairo supports both well */
    --container-width: 1200px;
    --header-height: 180px;
    --brand-teal: #007580;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* direction: ltr; - Removed to inherit from html dir */
    /* text-align: left; - Removed to inherit */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Dashboard Utils */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: center;
}


/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 170, 66, 0.3);
}

.btn-outline {
    border-color: var(--text-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--text-color);
    color: white;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Header */
.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 150px;
    width: auto;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f3f4f6;
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #000000;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-shape {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 170, 66, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    position: absolute;
    z-index: -1;
}

.floating-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    animation: float 5s ease-in-out infinite;
    border: 1px solid var(--border-color);
}

.card-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    left: 10%;
    animation-delay: 2.5s;
}

.floating-card .icon {
    font-size: 2rem;
    background: #fff7ed;
    padding: 10px;
    border-radius: 12px;
}

.floating-card .text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* News & Announcements Section */
.news-section {
    padding: 80px 0;
    background-color: var(--bg-alt);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card {
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 250px;
    width: 100%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-card:hover .news-image-img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    padding: 80px 0 20px;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-logo h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-logo p {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--secondary-color);
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    color: var(--text-color);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    /* Mobile Header & Nav Improvements */
    .header {
        height: 80px;
        /* Ensure Header is ABOVE everything */
        z-index: 9999;
    }

    .logo img {
        height: 60px;
        width: auto;
    }

    /* Dashboard Mobile Fixes */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 1.8rem;
    }


    .hero {
        padding-top: 140px;
        /* Adjusted for smaller header */
    }

    .nav {
        position: fixed;
        top: 80px;
        /* Match new header height */
        left: 0;
        right: 0;
        background-color: white;
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        display: flex;
        /* Ensure flex for centering */
        justify-content: center;
        /* Ensure Nav is ABOVE dashboard content but below header if needed, but header has high z-index already */
        z-index: 9998;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    /* Mobile Auth Buttons inside Nav */
    .auth-item {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .auth-item .btn {
        width: 80%;
        /* Nice wide buttons on mobile */
        text-align: center;
    }

    .mobile-menu-btn {
        display: flex;
        /* Ensure button is on top */
        z-index: 10000;
    }

    /* Footer Responsive */
    .footer-container {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    /* --- Mobile Table Card View --- */
    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table thead {
        display: none;
        /* Hide header rows */
    }

    .admin-table tr {
        margin-bottom: 15px;
        background-color: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        padding: 15px;
        position: relative;
    }

    .admin-table td {
        text-align: left;
        /* Align value to left */
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        gap: 15px;
    }

    .admin-table td:last-child {
        border-bottom: none;
        justify-content: center;
        /* Center action buttons */
        margin-top: 10px;
    }

    /* Add Labels via attr(data-label) */
    .admin-table td::after {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.9rem;
        /* In RTL, label should be on the RIGHT, so we use ::after and order might handle it, 
           BUT since we used justify-between, let's explicit order if needed. 
           In RTL, 'text-align: left' moves text to LEFT. 
           If we want:  [Value] <---- [Label]
        */
        order: 2;
    }

    .admin-table td>span,
    .admin-table td>div,
    .admin-table td>form {
        order: 1;
        /* Content on the Left */
    }

    /* Exception for checkbox */
    .admin-table td:first-child {
        display: flex;
        justify-content: flex-end;
        /* right side */
    }

    /* --- Mobile Search Bar Fix --- */
    .table-controls {
        flex-direction: column;
        align-items: stretch !important;
        /* Force stretch to full width */
        gap: 15px !important;
    }

    .table-controls>div {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
    }

    .table-controls input[type="text"] {
        width: 100% !important;
        min-width: 0 !important;
        /* Override inline style */
        margin: 0;
    }

    .table-controls a,
    .table-controls button {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Table Wrapper */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Make nav buttons look good on desktop too */
.btn-nav {
    padding: 8px 20px;
    font-size: 1rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: calc(var(--header-height) + 40px);
    background-color: var(--bg-alt);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-title {
    margin-bottom: 20px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: start;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
    /* Good for textareas */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-link {
    margin-top: 20px;
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.auth-link a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Dashboard */
.dashboard-header {
    background-color: white;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-content {
    padding: 40px 0;
}

.points-card {
    background: linear-gradient(135deg, var(--primary-color), #ff9000);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 40px;
}

.points-value {
    font-size: 4rem;
    font-weight: 900;
    margin: 10px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
}

.news-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Services Page Enhancements */
.services-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.service-item {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-icon-large {
    font-size: 3rem;
    background: #fff7ed;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-item:hover .service-icon-large {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.service-details h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-details p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Page Header (for non-home pages) */
.page-header {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 40px;
    background-color: var(--bg-alt);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* New Digital ID Card Styles (Green/Gold Theme) - Scalable Container Queries */
.id-card-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    perspective: 1000px;
    width: 100%;
}

.id-card-new {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 600 / 350;
    border-radius: 5cqw;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background-color: #1e3d4a;
    /* Dark Teal Base */
    font-family: 'Tajawal', sans-serif;
    color: white;
    container-type: inline-size;
}

/* Background Shapes */
.id-card-bg-green {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f3d3e;
    z-index: 1;
}

.id-card-curve-white {
    position: absolute;
    top: -12cqw;
    right: -7cqw;
    width: 38cqw;
    height: 38cqw;
    background: transparent;
    display: none;
    border-radius: 50%;
    z-index: 2;
    transform: rotate(-5deg);
}

.id-card-accent-gold {
    position: absolute;
    bottom: -8cqw;
    left: -8cqw;
    width: 60cqw;
    height: 60cqw;
    background-image: url('logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    z-index: 2;
    background-color: transparent;
    filter: contrast(1.2);
}

.id-card-content-new {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 4.5cqw;
    display: flex;
    flex-direction: column;
}

/* Header with Logo */
.id-card-header-new {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5cqw;
    margin-bottom: 2cqw;
    position: relative;
    z-index: 4;
}

.id-club-name {
    text-align: right;
    color: #f2cb57;
}

.id-club-name span {
    display: block;
    font-size: 3.5cqw;
    font-weight: 800;
    line-height: 1.2;
}

.id-club-name .en-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.8cqw;
    letter-spacing: 0.1cqw;
    font-weight: 600;
}

.id-logo-new {
    width: 10cqw;
    height: auto;
}

/* Body Content */
.id-card-body-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-top: 1cqw;
}

/* Profile Pic - Left Center */
.id-profile-pic-container {
    position: relative;
    width: 22cqw;
    height: 22cqw;
    margin-left: 5cqw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.id-profile-pic-new {
    width: 22cqw;
    height: 22cqw;
    border-radius: 50%;
    background: white;
    overflow: hidden;
    border: 0.8cqw solid white;
    box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.id-profile-pic-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-profile-pic-new span {
    font-size: 8cqw;
    color: #0f3d3e;
    font-weight: bold;
}

.custom-file-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #f2a900;
    color: white;
    width: 6cqw;
    height: 6cqw;
    border-radius: 50%;
    font-size: 3cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0.4cqw solid white;
    transition: all 0.3s ease;
    z-index: 6;
}

.custom-file-upload:hover {
    transform: scale(1.1);
}

/* Info Section */
.id-info-new {
    flex: 1;
    text-align: center;
    padding: 0 2cqw;
}

.id-field {
    margin-bottom: 2.2cqw;
}

.id-label {
    display: block;
    font-size: 2.2cqw;
    opacity: 0.9;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.1cqw;
}

.id-value {
    display: block;
    font-size: 3.8cqw;
    font-weight: bold;
    color: white;
    text-shadow: 0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.2);
}

.id-joined-date {
    position: absolute;
    top: 5cqw;
    left: 4cqw;
    font-size: 2.2cqw;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5cqw 3cqw;
    border-radius: 4cqw;
}

.id-user-id {
    position: absolute;
    bottom: 4cqw;
    right: 4cqw;
    font-size: 4cqw;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    z-index: 10;
    letter-spacing: 0.3cqw;
}

/* Points Section */
.id-points-new {
    text-align: center;
    min-width: 18cqw;
    margin-right: 5cqw;
    background: rgba(0, 0, 0, 0.2);
    border: 0.2cqw solid rgba(242, 203, 87, 0.3);
    border-radius: 2.5cqw;
    padding: 1.5cqw;
}

.id-points-val {
    display: block;
    font-size: 7cqw;
    font-weight: 900;
    color: white;
    line-height: 1;
    text-shadow: 0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.2);
}

.id-points-lbl {
    display: block;
    font-size: 2.3cqw;
    color: #f2a900;
    letter-spacing: 0.3cqw;
    font-weight: bold;
}

/* Responsive */
/* Responsive */
/* Responsive styles removed to enforce consistent shape with container queries */

/* =========================================
   NEW SERVICES REDESIGN (Glassmorphism)
   ========================================= */

.service-card-glass {
    background: white;
    border-radius: 20px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
}

.service-card-glass:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 170, 66, 0.3);
}

/* Icon Box styling */
.service-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 2.2rem;
    transition: transform 0.4s ease;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.service-card-glass:hover .service-icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Gradients for Icons */
.gradient-1 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
    box-shadow: 0 10px 20px -5px rgba(255, 154, 158, 0.4);
}

.gradient-2 {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    box-shadow: 0 10px 20px -5px rgba(161, 140, 209, 0.4);
}

.gradient-3 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    box-shadow: 0 10px 20px -5px rgba(132, 250, 176, 0.4);
}

.gradient-4 {
    background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%);
    box-shadow: 0 10px 20px -5px rgba(252, 203, 144, 0.4);
}

.gradient-5 {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    box-shadow: 0 10px 20px -5px rgba(224, 195, 252, 0.4);
}

.gradient-6 {
    background: linear-gradient(135deg, #faa499 0%, #f7f055 100%);
    box-shadow: 0 10px 20px -5px rgba(250, 164, 153, 0.4);
}

/* Typography */
.service-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1e293b;
    transition: color 0.3s ease;
}

.service-card-glass:hover .service-title {
    color: var(--primary-color);
}

.service-desc {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Subtle Overlay Effect */
.service-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 170, 66, 0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.service-card-glass:hover .service-hover-overlay {
    opacity: 1;
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .services-grid-glass {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card-glass {
        flex-direction: row;
        align-items: center;
        padding: 20px;
        text-align: left;
    }

    .service-icon-box {
        margin-bottom: 0;
        margin-right: 20px;
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        flex-shrink: 0;
    }

    .service-title {
        margin-bottom: 5px;
        font-size: 1.2rem;
    }

    .service-desc {
        font-size: 0.9rem;
    }
}

/* Optimized Table Styles */
.table-container {
    max-height: 500px;
    /* Scrollable height */
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

.modern-card .table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.table-sticky-header thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-compact td,
.table-compact th {
    padding: 8px 12px;
    /* Tighter padding */
    font-size: 0.9rem;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #ec4899;
    /* Pink to match dept head theme */
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.pagination-controls {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
}

.pagination-btn {
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #64748b;
    transition: all 0.1s;
}

.pagination-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.pagination-btn.active {
    background: #ec4899;
    color: white;
    border-color: #ec4899;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

/* Event Card Image */
.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: transform 0.4s ease;
}

.modern-card:hover .event-card-image {
    transform: scale(1.02);
    /* Slight scale without rotation */
}


/* Modern Event Cards Redesign */
.events-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 2rem 0;
    justify-content: center;
    /* Center cards in the flow */
}

.event-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    /* Flow Layout Sizing */
    flex: 0 1 350px;
    width: 100%;
    max-width: 380px;
    /* Force constraint to stop giant cards */
    height: 100%;
    margin: 0 auto;
    /* Centering helper if it wraps oddly */
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.event-image-wrapper {
    position: relative;
    padding-top: 60%;
    /* Aspect ratio 5:3 */
    overflow: hidden;
    background-color: #f3f4f6;
}

.event-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-card-img {
    transform: scale(1.05);
}

.event-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #fff7ed;
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    align-self: flex-start;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.event-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.event-footer {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.event-btn {
    width: 100%;
    padding: 0.8rem;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.event-btn-primary {
    background-color: var(--primary-color);
    color: #000000;
}

.event-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.event-btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-color);
    background: transparent;
}

.event-btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: white;
}

/* Helper Class for fixed header offset */
.section-padding {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    background-color: var(--bg-alt);
    min-height: 80vh;
}

/* --- Enhanced Header Styles (Added by Antigravity) --- */

/* Ensure wrapper aligns contents */
.header-container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Nav Container */
.nav {
    flex-grow: 1;
    /* Allow nav to take available space */
    padding: 0 40px;
    /* Gap from Logo */
}

@media (max-width: 768px) {
    .nav {
        padding: 20px;
        /* Reset on mobile */
    }
}

/* Nav List Layout */
.nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Nav Links Sizing */
.nav-list a:not(.btn) {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 5px 10px;
}

.nav-list a.active {
    color: var(--primary-color);
}

/* Flexible Spacer (Pushes Auth Buttons to End) */
.nav-spacer {
    flex-grow: 1;
}

@media (max-width: 768px) {
    .nav-spacer {
        display: none;
        /* No spacer on mobile column layout */
    }

    .header-container {
        padding: 0 10px;
    }
}

/* Auth Buttons Sizing */
.btn-nav {
    padding: 10px 25px;
    font-size: 1rem;
    min-width: 110px;
    /* Consistent width */
    text-align: center;
}

/* Print Styles for ID Card */
@media print {

    /* FORCE BRACKGROUND PRINTING */
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Force Card Background */
    .id-card-new {
        background-color: #1e3d4a !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Show only the modal content */
    #profileModal,
    #profileModal * {
        visibility: visible;
    }

    /* Position the modal content correctly */
    #profileModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: white;
        padding: 0;
        margin: 0;
        overflow: visible;
    }

    .modal-content {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: none;
    }

    /* Target the Card specifically */
    .id-card-container {
        position: absolute;
        left: 50%;
        top: 10%;
        /* Move up */
        transform: translateX(-50%) !important;
        margin: 0;
        width: 100%;
        max-width: 600px;
        /* Ensure size matches screen styling */
    }

    .id-card-new {
        box-shadow: none !important;
        /* Remove shadow for cleaner print */
        border: 1px solid #ddd;
        /* Light border for definition */
    }

    /* HIDE unwanted elements in print */
    .close-modal,
    .auth-card,
    /* Personal Info Section */
    .print-btn-container,
    /* The Print Button itself */
    .upload-form,
    /* Upload + button */
    h2,
    /* Check titles */
    .section-title,
    ::-webkit-scrollbar {
        display: none !important;
    }
}

/* --- Dashboard Responsive Grids --- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        /* Stack charts on mobile */
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
        /* Full width cards on mobile */
    }
}

.table-controls-header {
    border-left: 5px solid;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .table-controls-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .table-controls-header .search-input {
        width: 100%;
    }
}

/* Social Media Icons */
.social-links-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    overflow: hidden;
    /* Ensure image fits shape */
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Use cover if perfectly matching circle, or contain if logos are irregularly shaped with transparent bg */
    border-radius: 50%;
    /* Ensure img is also round if needed */
}

.social-icon:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

/* --- Footer Organization & Mobile Fix --- */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 35px;
    }

    .footer-col {
        width: 100%;
        margin-bottom: 10px;
    }

    .social-links-container {
        justify-content: center;
    }
}

/* --- تحريك الهيدر (Sticky Header Animation) --- */
.header {
    transition: all 0.4s ease-in-out;
    position: relative;
    /* الوضع الطبيعي */
    z-index: 1000;
    width: 100%;
}

/* الكلاس الذي سنضيفه بالجافاسكريبت عند النزول */
.header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    /* خلفية شبه شفافة */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* ظل ناعم */
    padding: 10px 0;
    /* تصغير الهيدر قليلاً */
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* تحسين شكل اللوجو والقوائم داخل الهيدر المتحرك */
.header.sticky .logo h1 {
    font-size: 1.5rem;
}

/* --- FIX TITLE VISIBILITY --- */
body .news-header h1 {
    color: #fff !important;
    text-shadow: 2px 2px 4px #000 !important;
    z-index: 10;
}

body .main-story-card h2 {
    color: #fff !important;
    text-shadow: 2px 2px 4px #000 !important;
    z-index: 10;
}

body .news-card h3 {
    color: #fff !important;
    text-shadow: 2px 2px 4px #000 !important;
    z-index: 10;
}

.main-story-card p {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 3px #000 !important;
}


.story-overlay,
.news-overlay,
.overlay-gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.5) 50%, transparent 100%) !important;
}

/* --- UNIVERSAL TITLE FIX (FINAL) --- */
.hero-headline,
.card-info h3,
.news-header h1,
.main-story-card h2,
.news-title {
    color: #fff !important;
    text-shadow: 2px 2px 6px #000 !important;
    font-weight: 700 !important;
    z-index: 100;
    position: relative;
    display: block;
}

.card-info h3 a,
.hero-headline a,
.card-link h3 {
    color: #fff !important;
    text-decoration: none;
}

.card-item .overlay-gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent) !important;
    opacity: 0.9 !important;
}

/* =========================================
   MODERN BALANCED SERVICES REDESIGN (Color Accents)
   ========================================= */


.service-card-modern {
    background: white;
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f8fafc;
    /* Permanent Color Accent on Top */
    border-top: 5px solid var(--theme-color, #ffaa42);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Icon Box styling */
.service-icon-modern {
    width: 75px;
    height: 75px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    background-color: var(--theme-light, #fff7ed);
    color: var(--theme-color, #ffaa42);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed redundant hover color change, handled by modifier class if needed, or keeping static. */
.service-card-modern:hover .service-icon-modern {
    transform: scale(1.1) rotate(5deg);
}

/* Typography */
.service-title-modern {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1e293b;
    transition: color 0.3s ease;
}

.service-card-modern:hover .service-title-modern {
    color: var(--theme-color);
}

.service-desc-modern {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* --- Color Accents --- */
.accent-blue {
    --theme-color: #3b82f6;
    --theme-light: #eff6ff;
}

.accent-purple {
    --theme-color: #8b5cf6;
    --theme-light: #f5f3ff;
}

.accent-rose {
    --theme-color: #f43f5e;
    --theme-light: #fff1f2;
}

.accent-amber {
    --theme-color: #f59e0b;
    --theme-light: #fffbeb;
}

.accent-teal {
    --theme-color: #14b8a6;
    --theme-light: #f0fdfa;
}

.accent-indigo {
    --theme-color: #6366f1;
    --theme-light: #eef2ff;
}

/* Responsive */
@media (max-width: 768px) {
    .service-card-modern {
        padding: 25px 20px;
    }
}

/* Modern Card Components for Join Page */
.modern-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.team-avatar-gradient {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 20px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    font-size: 2.5rem;
}

.modern-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}