@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --primary-dark: #12161f;
    --secondary-dark: #1e2430;
    --accent-red: #c91c28;
    --accent-red-hover: #b01420;
    --accent-red-light: #fee2e2;
    --accent-gold: #d97706;
    --accent-gold-light: #fef3c7;
    --text-main: #1f2937;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #c91c28;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --font-cairo: 'Cairo', sans-serif;
    --font-tajawal: 'Tajawal', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-cairo);
    direction: rtl;
    text-align: right;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Official Header Bar */
.gov-header {
    background: linear-gradient(90deg, #0d1117 0%, #1a202c 50%, #0d1117 100%);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 2px solid var(--accent-red);
}

.gov-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gov-logos-strip {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gov-logos-strip img {
    height: 28px;
    filter: brightness(0.95);
}

.gov-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 28, 40, 0.25);
    color: #fca5a5;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Main Tournament Navbar */
.site-navbar {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-logos {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-logos .brand-logo-svu,
.brand-logos .brand-logo-partner {
    height: 60px;
    width: 60px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    background: #fff;
}

.brand-logo-svu {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.brand-logo-tourn {
    height: 52px;
    width: 52px;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
    box-shadow: 0 2px 6px rgba(201, 28, 40, 0.25);
    background: #fff;
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.25;
}

.brand-text p {
    font-size: 0.82rem;
    color: var(--accent-red);
    font-weight: 600;
    margin: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: #334155;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-red);
    background-color: var(--accent-red-light);
}

.nav-links a.btn-nav-primary {
    background: linear-gradient(135deg, #c91c28 0%, #a0131e 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(201, 28, 40, 0.35);
}

.nav-links a.btn-nav-primary:hover {
    background: linear-gradient(135deg, #b01420 0%, #870d17 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-links a.btn-nav-admin {
    background-color: var(--primary-dark);
    color: #ffffff;
}

.nav-links a.btn-nav-admin:hover {
    background-color: #000000;
    color: #fef08a;
}

/* Active Tournament Top Notification Banner */
.tournament-bar {
    background: linear-gradient(135deg, #12161f 0%, #1e2430 100%);
    color: #ffffff;
    padding: 12px 0;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--accent-red);
}

.tournament-bar::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: var(--accent-red);
}

.tournament-bar .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tourn-info-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tourn-badge-pill {
    background: var(--accent-red);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tourn-title-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.tourn-dates-tag {
    font-size: 0.88rem;
    color: #fbbf24;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Main Container */
.main-wrapper {
    flex: 1;
    max-width: 1240px;
    width: 100%;
    margin: 25px auto;
    padding: 0 20px;
}

/* Card System */
.athletic-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.athletic-card:hover {
    box-shadow: var(--shadow-md);
}

.athletic-card-header {
    background: linear-gradient(135deg, #12161f 0%, #1e2430 100%);
    color: #ffffff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent-red);
    flex-wrap: wrap;
    gap: 10px;
}

.athletic-card-header h2, .athletic-card-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.athletic-card-body {
    padding: 24px;
}

/* Athletic Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-cairo);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #c91c28 0%, #a0131e 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(201, 28, 40, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b01420 0%, #870d17 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 28, 40, 0.45);
}

.btn-dark {
    background: #12161f;
    color: #ffffff;
}

.btn-dark:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: #334155;
}

.btn-outline:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background-color: var(--accent-red-light);
}

.btn-success {
    background: #10b981;
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 10px;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: #1e293b;
    margin-bottom: 6px;
}

.form-label .req {
    color: var(--accent-red);
    margin-right: 2px;
}

.form-control, .form-select {
    width: 100%;
    font-family: var(--font-cairo);
    font-size: 0.95rem;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(201, 28, 40, 0.15);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .brand-logos {
        gap: 6px;
    }
    .brand-logos .brand-logo-svu,
    .brand-logos .brand-logo-partner {
        width: 44px;
        height: 44px;
    }
    .brand-section {
        flex-wrap: wrap;
        gap: 10px;
        min-width: 0;
    }
    .nav-container .nav-links {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 900px) {
    .gov-logos-strip, .tourn-info-flex, .nav-links {
        flex-wrap: wrap;
        min-width: 0;
    }
    .nav-links {
        width: 100%;
        gap: 4px;
    }
    .nav-links a {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .site-navbar {
        position: static;
    }
    .brand-text, .footer-top > div, .form-group, .photo-upload-meta {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    .main-wrapper .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .form-grid > .form-group {
        grid-column: auto !important;
    }
}

@media screen and (max-width: 600px) {
    .gov-container, .nav-container, .tournament-bar .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .gov-logos-strip {
        gap: 6px;
        font-size: 0.75rem;
    }
    .tourn-info-flex {
        gap: 8px;
    }
    .main-wrapper {
        padding: 0 12px;
        margin: 16px auto;
    }
    .photo-uploader {
        flex-direction: column;
        align-items: stretch;
    }
    .photo-preview-box {
        align-self: center;
    }
    .footer-partners img {
        max-width: 100%;
        object-fit: contain;
    }
    .btn-lg {
        padding: 12px 16px;
        font-size: 0.95rem;
        white-space: normal;
    }
}

/* Section Header in Forms */
.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.form-section-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-red);
}

/* Stats Cards */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
    border-right: 4px solid var(--accent-red);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--accent-red-light);
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-content h4 {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-content .stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

/* Table Design */
.table-responsive {
    overflow-x: auto;
}

.athletic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.92rem;
}

.athletic-table th {
    background: #12161f;
    color: #ffffff;
    padding: 12px 14px;
    font-weight: 700;
    border: 1px solid #1e2430;
    white-space: nowrap;
}

.athletic-table td {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    vertical-align: middle;
}

.athletic-table tr:nth-child(even) td {
    background: #f8fafc;
}

.athletic-table tr:hover td {
    background: #f1f5f9;
}

/* Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
}

.role-badge.student {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.head {
    background: #fef3c7;
    color: #b45309;
}

.role-badge.coach {
    background: #dcfce7;
    color: #166534;
}

/* Footer */
.site-footer {
    background: #0f141d;
    color: #94a3b8;
    margin-top: auto;
    border-top: 4px solid var(--accent-red);
}

.footer-top {
    max-width: 1240px;
    margin: 0 auto;
    padding: 35px 20px 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid #1e293b;
}

.footer-partners {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-partners img {
    height: 48px;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 20px;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

.footer-bottom a {
    color: #e2e8f0;
    text-decoration: none;
}

/* Photo upload preview box */
.photo-uploader {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 18px;
}

.photo-preview-box {
    width: 110px;
    height: 140px;
    border: 3px solid #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-meta {
    flex: 1;
}

/* Alert boxes */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-right: 4px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-right: 4px solid #ef4444;
}

.alert-info {
    background: #e0f2fe;
    color: #075985;
    border-right: 4px solid #0284c7;
}

/* ==========================================================================
   News & Media Center Styling
   ========================================================================== */
.news-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
}

.news-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 6px;
}

.news-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-red);
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.news-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.news-card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0f141d;
}

.home-news-grid .news-card-img-wrapper {
    height: 280px;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.news-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(18, 22, 31, 0.85);
    backdrop-filter: blur(4px);
    color: #fcd34d;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(217, 119, 6, 0.4);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.45;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card-title a:hover {
    color: var(--accent-red);
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    font-size: 0.88rem;
}

.news-read-more {
    color: var(--accent-red);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.news-read-more:hover {
    gap: 8px;
    color: var(--accent-red-hover);
}

/* Single News Article Details */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 40px;
}

.article-header {
    padding: 30px 30px 20px 30px;
    border-bottom: 1px solid #f1f5f9;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.article-title {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    background: #0f141d;
}

.article-body {
    padding: 35px 30px;
    font-size: 1.12rem;
    line-height: 1.9;
    color: #334155;
}

.article-body p {
    margin-bottom: 20px;
}

.article-footer-share {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.share-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
}

.btn-share.whatsapp { background: #25D366; }
.btn-share.facebook { background: #1877F2; }
.btn-share.twitter { background: #000000; }
