@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    /* Base Colors */
    --primary-blue: #007bff;
    --primary-green: #28a745;
    --primary-brown: #795548;
    --primary-red: #dc3545;
    --primary-purple: #6f42c1;

    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;

    /* Active Theme Defaults (Fallbacks) */
    --theme-color: var(--primary-blue);
    --theme-light: #e3f2fd;
}

/* Theme Classes */
.theme-swimming {
    --theme-color: var(--primary-blue);
    --theme-light: #e3f2fd;
}

.theme-stadiums {
    --theme-color: var(--primary-green);
    --theme-light: #d4edda;
}

.theme-halls {
    --theme-color: var(--primary-brown);
    --theme-light: #efebe9;
}

.theme-agreements {
    --theme-color: var(--primary-red);
    --theme-light: #f8d7da;
}

.theme-medical {
    --theme-color: var(--primary-purple);
    --theme-light: #f3e5f5;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    direction: rtl;
    text-align: right;
    color: var(--text-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Header & Typography */
h1,
h2,
h3 {
    color: var(--theme-color);
    text-align: center;
    margin-bottom: 30px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 120px;
    margin-bottom: 15px;
}

.sub-header {
    color: #666;
    font-size: 1.1em;
}

/* Landing Page Grid */
.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-card i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--card-theme);
}

.category-card h3 {
    margin: 0;
    color: #444;
}

/* Specific Card Themes */
.card-swimming {
    border-color: var(--primary-blue);
    --card-theme: var(--primary-blue);
    background: linear-gradient(135deg, white 50%, #e3f2fd 100%);
}

.card-stadiums {
    border-color: var(--primary-green);
    --card-theme: var(--primary-green);
    background: linear-gradient(135deg, white 50%, #d4edda 100%);
}

.card-halls {
    border-color: var(--primary-brown);
    --card-theme: var(--primary-brown);
    background: linear-gradient(135deg, white 50%, #efebe9 100%);
}

.card-agreements {
    border-color: var(--primary-red);
    --card-theme: var(--primary-red);
    background: linear-gradient(135deg, white 50%, #f8d7da 100%);
}

.card-medical {
    border-color: var(--primary-purple);
    --card-theme: var(--primary-purple);
    background: linear-gradient(135deg, white 50%, #f3e5f5 100%);
}


/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

label {
    font-weight: 600;
    min-width: 140px;
    color: #555;
    margin-left: 10px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select,
input[type="password"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--theme-color);
}

.input-group {
    flex: 1;
    display: flex;
    gap: 15px;
}

/* Custom File Upload */
.file-upload {
    flex: 1;
    position: relative;
}

.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload label {
    display: inline-block;
    width: 100%;
    max-width: 200px;
    padding: 10px 20px;
    background-color: var(--theme-light);
    color: var(--theme-color);
    border: 2px dashed var(--theme-color);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
}

.file-upload label:hover {
    background-color: var(--theme-color);
    color: white;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    gap: 20px;
}

.payment-methods label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: auto;
}

.payment-methods input {
    margin-left: 10px;
}

/* Buttons */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 30px;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn {
    padding: 8px 15px;
    text-decoration: none;
    color: white;
    background: var(--primary-blue);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
}

.btn-back {
    background: #6c757d;
    margin-bottom: 20px;
}

/* Dashboard Table */
.registrations-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 20px;
}

.registrations-table th {
    padding: 15px;
    text-align: right;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.registrations-table td {
    background: white;
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.registrations-table tr td:first-child {
    border-right: 1px solid #f0f0f0;
    border-radius: 0 10px 10px 0;
}

.registrations-table tr td:last-child {
    border-left: 1px solid #f0f0f0;
    border-radius: 10px 0 0 10px;
}

.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .row {
        flex-direction: column;
        align-items: stretch;
    }

    label {
        margin-bottom: 5px;
        margin-left: 0;
    }

    .container {
        padding: 20px;
    }
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1,
h2 {
    color: var(--primary-blue);
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

label {
    font-weight: bold;
    margin-left: 10px;
    min-width: 120px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select,
input[type="password"] {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.input-group {
    flex: 1;
    display: flex;
    gap: 10px;
}

/* File Upload */
.file-upload {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload label {
    display: block;
    width: 100%;
    background: #eee;
    text-align: center;
    padding: 8px;
    border: 1px solid #ccc;
    cursor: pointer;
    margin-left: 0;
}

/* Buttons */
.submit-btn {
    width: 100%;
    padding: 10px;
    background: #ccc;
    /* As per image design which looks greyish/gradient */
    border: 1px solid #999;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.submit-btn:hover {
    background: #bbb;
}

.btn {
    padding: 5px 10px;
    text-decoration: none;
    color: white;
    background: var(--primary-blue);
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-danger {
    background: #dc3545;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-info {
    background: #17a2b8;
}

/* Dashboard */
.registrations-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.registrations-table th,
.registrations-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: right;
}

.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

/* Alerts */
.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Filter Bar Styles */
.filters-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9em;
    color: #666;
    min-width: auto;
    margin: 0;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-filter {
    background: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-clear {
    background: #eee;
    color: #666;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.btn-clear:hover {
    background: #ddd;
}

/* Announcements Ticker */
.announcements-ticker {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    color: white;
    padding: 12px 0;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    font-size: 1.2em;
    font-weight: 700;
    padding: 0 30px;
    display: flex;
    align-items: center;
}

.ticker-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* Admin Announcements Management */
.announcements-admin-section {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.announcements-admin-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-blue);
    text-align: right;
}

.add-announcement-form {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.add-announcement-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 5px;
}