/* Main Styles for Quran Competition Application */

/* Font */
* {
    font-family: 'Tajawal', sans-serif;
}

/* Body */
body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, #1a5f3e 0%, #0d3d2a 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-custom .navbar-brand {
    color: #d4af37 !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 0 3px;
}

.navbar-custom .nav-link:hover {
    color: #d4af37 !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-custom .navbar-toggler {
    border-color: rgba(212, 175, 55, 0.5);
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28212, 175, 55, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a5f3e 0%, #0d3d2a 100%);
    color: #fff;
    margin-top: auto;
}

.footer h6 {
    color: #d4af37;
}

.footer hr {
    border-color: rgba(212, 175, 55, 0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #1a5f3e 0%, #0d3d2a 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d3d2a 0%, #071f15 100%);
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: #1a5f3e;
    box-shadow: 0 0 0 0.2rem rgba(26, 95, 62, 0.25);
}

/* Tables */
.table thead {
    background: linear-gradient(135deg, #1a5f3e 0%, #0d3d2a 100%);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 95, 62, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a5f3e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d3d2a;
}

/* Validation */
.field-validation-error {
    font-size: 0.875rem;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .btn-register {
        font-size: 1rem;
        padding: 12px 30px;
    }
    
    .info-icon {
        width: 60px;
        height: 60px;
    }
    
    .info-icon i {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    form {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a5f3e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Specific */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}
