/**
 * VIWAWA FUN RUN - Main Stylesheet
 * Modern African Design Theme
 * Colors: Black, Gold, Orange, White
 */

:root {
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --primary-gold: #d4a574;
    --dark-gold: #b8860b;
    --accent-orange: #ff9500;
    --light-orange: #ffe8cc;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --border-gray: #ddd;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--light-gray);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-gray);
    margin: 15px 0;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-gold);
}

h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-gold);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin: 10px 0;
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-orange);
}

/* Buttons */
.btn, button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary, .btn-primary:visited {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

.btn-secondary {
    background: var(--secondary-black);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-gray);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 5px rgba(212, 165, 116, 0.3);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffeeba;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: var(--white);
}

table th {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--primary-gold);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-gold);
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-gray);
}

table tr:hover {
    background: var(--light-gray);
}

table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%);
    color: white;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid System */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.col {
    flex: 1;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: var(--primary-gold);
    margin: 0;
    font-size: 24px;
}

.navbar-menu {
    display: flex;
    gap: 15px;
    list-style: none;
}

.navbar-menu a {
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar-menu a:hover {
    background: var(--primary-gold);
    color: var(--white);
}

/* Vertical Spacing */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

/* Text Styles */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: #999; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }

/* Loading Spinner */
.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--white);
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-gold);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    color: var(--primary-gold);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: var(--white);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
    margin-top: 40px;
}

footer p {
    margin: 10px 0;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .row {
        grid-template-columns: 1fr;
    }
    
    .col-2, .col-3 {
        grid-column: span 1;
    }
    
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 10px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
    .card {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, button, .modal {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        page-break-inside: avoid;
    }
}
