/* Kiboko Contest System Styles */

:root {
    /* Professional Color Palette */
    --primary-color: #00A1E1;        /* Professional Blue */
    --primary-dark: #0081B8;         /* Darker Blue */
    --primary-light: #33B4E8;        /* Lighter Blue */
    --secondary-color: #73BD20;      /* Professional Green */
    --secondary-dark: #5A9619;       /* Darker Green */
    --secondary-light: #8BC93A;      /* Lighter Green */
    --accent-color: #73BD20;         /* Green Accent */
    --success-color: #73BD20;        /* Green */
    --warning-color: #f59e0b;        /* Amber */
    --error-color: #dc2626;          /* Red */
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Banner Section (Image Only) */
.hero-banner {
    height: 40vh;
    min-height: 300px;
    background: url('../images/kibokocontestbanner.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* Contest Title Section */
.contest-title-section {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-tertiary));
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.contest-title-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.title-content {
    animation: fadeInUp 1s ease-out;
}

/* Removed old hero-header::before animation as content moved to separate section */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Responsive background image adjustments */
@media (max-width: 768px) {
    .hero-banner {
        background-attachment: scroll;
        background-position: center top;
        min-height: 250px;
        height: 30vh;
    }
    
    .contest-title-section {
        padding: 1.5rem 0;
    }
    
    .hero-description {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        background-position: center center;
        min-height: 200px;
        height: 25vh;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .contest-title-section {
        padding: 1rem 0;
    }
}

/* Remove old hero-overlay styles as content moved to title section */

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 1rem 0;
    color: var(--secondary-color);
}

.hero-description {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Main Content */
.main-content {
    padding: 1.1rem 0;
    background-color: var(--bg-secondary);
}

.contest-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.contest-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contest-header h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Form Styles */
.contest-form-container {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border-top: 4px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

.contest-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.phone-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
}

.phone-input:focus-within {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.country-code {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-right: 1px solid #ddd;
    font-weight: 500;
    color: #666;
}

.phone-input input {
    border: none;
    flex: 1;
    margin: 0;
}

.phone-input input:focus {
    box-shadow: none;
}

.help-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
}

/* File Upload */
.file-upload {
    position: relative;
    cursor: pointer;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    background-color: #fafafa;
}

.file-upload:hover .file-upload-display {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.file-upload-display i {
    font-size: 1.2rem;
    color: #e74c3c;
}

.file-text {
    font-weight: 500;
    color: #e74c3c;
}

.file-name {
    color: #666;
    font-style: italic;
}

/* Checkbox */
.consent-group {
    margin: 2rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background-color: var(--bg-primary);
}

.checkbox-container input:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.consent-text {
    flex: 1;
    line-height: 1.5;
    display: inline;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}



/* Submit Button */
.submit-group {
    text-align: center;
    margin-top: 2rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Error Messages */
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error .phone-input,
.form-group.error .file-upload-display {
    border-color: #e74c3c;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert i {
    font-size: 1.2rem;
}



/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.modal-body ol {
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-header {
        height: 50vh;
        min-height: 350px;
        background-attachment: scroll;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 1.5rem;
    }
    
    .hero-logo {
        height: 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .contest-header h2 {
        font-size: 1.1rem;
    }
    
    .contest-form {
        padding: 1.5rem;
    }
    
    .phone-input {
        flex-direction: column;
    }
    
    .country-code {
        border-right: none;
        border-bottom: 1px solid #ddd;
        text-align: center;
    }
    

    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-header {
        height: 45vh;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .contest-section {
        padding: 0 10px;
    }
    
    .contest-form {
        padding: 1rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Success Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}