@font-face {
    font-family: 'Rubik';
    src: url('../css/fonts/rubik/Rubik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik Bold';
    src: url('../css/fonts/rubik/Rubik-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../css/fonts/roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Bold';
    src: url('../css/fonts/roboto/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik Bold', sans-serif;
    margin: 0 0 1rem 0;
}

/* Header Navigation */
.header-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-section nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 1rem;
    padding: 0.5rem 1rem;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 500;
    color: #2d3192 !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: #2d3192;
    color: white !important;
    transform: translateY(-2px);
}

/* Main Registration Section */
.registration-section {
    background: linear-gradient(135deg, #203369 0%, #2d3192 50%, #8c61aa 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.registration-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/bridgeoutline.png') no-repeat bottom right;
    background-size: contain;
    opacity: 0.1;
    z-index: 1;
}

.registration-section .container {
    position: relative;
    z-index: 2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero Content */
.hero-content {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-highlight {
    background: linear-gradient(45deg, #fde25a, #fab814);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Registration Form Container */
.registration-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2d3192;
}

.form-header h3 {
    color: #2d3192;
    font-size: 1.8rem;
    margin: 0;
}

.form-header i {
    color: #fab814;
    margin-right: 0.5rem;
}

/* Competition Selection */
.competition-selection {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.competition-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.competition-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 49, 146, 0.1), transparent);
    transition: left 0.5s ease;
}

.competition-option:hover::before {
    left: 100%;
}

.competition-option:hover {
    transform: translateY(-5px);
    border-color: #2d3192;
    box-shadow: 0 10px 30px rgba(45, 49, 146, 0.2);
}

.competition-option.active {
    border-color: #2d3192;
    background: linear-gradient(135deg, #2d3192, #8c61aa);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(45, 49, 146, 0.3);
}

.competition-option.active .option-content h4,
.competition-option.active .option-content p {
    color: white;
}

.option-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fab814, #fde25a);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 1.5rem;
    color: #2d3192;
}

.competition-option.active .option-icon {
    background: white;
}

.competition-option.active .option-icon i {
    color: #2d3192;
}

.option-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3192;
    font-size: 1.2rem;
}

.option-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Form Sections */
.form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.section-header {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border-left: 5px solid #2d3192;
}

.section-header h4 {
    color: #2d3192;
    margin: 0;
    font-size: 1.3rem;
}

.section-header i {
    color: #fab814;
    margin-right: 0.5rem;
}

/* SSO Sync Section */
.sso-sync-section {
    text-align: center;
    margin-bottom: 2rem;
}

.sync-sso-button {
    background: linear-gradient(135deg, #fab814, #fde25a);
    color: #2d3192;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(250, 184, 20, 0.3);
}

.sync-sso-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(250, 184, 20, 0.4);
    color: #2d3192;
}

.sync-sso-button i {
    margin-right: 0.5rem;
}

/* Form Two Column Layout */
.form-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3192;
    font-weight: 600;
    font-size: 0.95rem;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Modern Form Controls */
.modern-input,
.modern-select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.modern-input:focus,
.modern-select:focus {
    outline: none;
    border-color: #2d3192;
    box-shadow: 0 0 0 3px rgba(45, 49, 146, 0.1);
    transform: translateY(-2px);
}

.modern-input::placeholder {
    color: #999;
}

/* File Upload */
.file-upload-modern {
    position: relative;
    border: 2px dashed #2d3192;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(45, 49, 146, 0.05);
    transition: all 0.3s ease;
}

.file-upload-modern:hover {
    background: rgba(45, 49, 146, 0.1);
    border-color: #8c61aa;
}

.file-upload-modern input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    color: #2d3192;
}

.file-info i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #fab814;
}

.file-info span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Radio and Checkbox Groups */
.radio-group-modern,
.checkbox-group-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.radio-item:hover,
.checkbox-item:hover {
    border-color: #2d3192;
    background: rgba(45, 49, 146, 0.05);
}

.radio-item input,
.checkbox-item input {
    display: none;
}

.radio-custom,
.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #2d3192;
    border-radius: 50%;
    margin-right: 1rem;
    margin-top: 0.2rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-custom::before,
.checkbox-custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.radio-custom::before {
    width: 8px;
    height: 8px;
    background: #2d3192;
    border-radius: 50%;
}

.checkbox-custom::before {
    width: 12px;
    height: 12px;
    background: #2d3192;
    border-radius: 2px;
}

.radio-item input:checked + .radio-custom,
.checkbox-item input:checked + .checkbox-custom {
    background: #2d3192;
    border-color: #2d3192;
}

.radio-item input:checked + .radio-custom::before,
.checkbox-item input:checked + .checkbox-custom::before {
    transform: translate(-50%, -50%) scale(1);
}

.radio-text,
.checkbox-text {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

/* Member Section */
.member-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(45, 49, 146, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(45, 49, 146, 0.1);
}

/* Turnstile Container */
.turnstile-container {
    margin: 2rem 0;
    text-align: center;
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin-top: 2rem;
}

.submit-button {
    background: linear-gradient(135deg, #8c61aa, #653090);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(140, 97, 170, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(140, 97, 170, 0.4);
}

.submit-button i {
    margin-right: 0.5rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 120px;
    animation: floatCard 8s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.floating-card i {
    font-size: 1.5rem;
    color: #fab814;
    margin-bottom: 0.5rem;
    display: block;
}

.floating-card span {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.floating-card strong {
    display: block;
    font-size: 1.2rem;
    color: #2d3192;
    font-weight: 700;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-two-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-column {
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .form-two-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .registration-section {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .registration-form-container {
        padding: 1.5rem;
    }
    
    .competition-option {
        flex-direction: column;
        text-align: center;
    }
    
    .option-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .floating-card {
        position: relative;
        margin: 1rem auto;
        animation: none;
    }
    
    .floating-elements {
        position: relative;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .registration-form-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .submit-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #2d3192;
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2d3192;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Readonly field styles */
.readonly-field {
    background-color: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    position: relative;
}

.readonly-field:focus {
    outline: none !important;
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

.readonly-field::before {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.form-text.text-muted {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-text.text-muted i {
    font-size: 0.75rem;
}

/* Textarea specific styles */
textarea.modern-input {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

textarea.modern-input:focus {
    border-color: #2d3192;
    box-shadow: 0 0 0 0.2rem rgba(45, 49, 130, 0.25);
}

/* Character counter styles */
.form-text.text-muted {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.caption-counter {
    font-weight: 500;
}

.caption-counter.warning {
    color: #ffc107;
}

.caption-counter.danger {
    color: #dc3545;
}