/* ===== CareerX Club Page Styles ===== */

/* CSS Custom Properties */
:root {
    --careerx-banner-ratio: 2.5; /* 1000x400 = 2.5:1 aspect ratio */
}

/* Container */
.careerx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ===== Banner Section (Full Width) ===== */
.careerx-banner-section {
    /* Full-width breakout technique */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* Ensure breakout works within containers */
    max-width: none !important;
    overflow: hidden;
}

.banner-carousel {
    position: relative;
    width: 100%;
    background: var(--color-gray-100, #f5f5f5);
}

.banner-carousel-inner {
    position: relative;
    width: 100%;
    aspect-ratio: var(--careerx-banner-ratio);
    min-height: 300px; /* Fallback for browsers without aspect-ratio support */
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Banner Controls */
.banner-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.banner-carousel-control:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.banner-carousel-control.prev {
    left: 1rem;
}

.banner-carousel-control.next {
    right: 1rem;
}

.banner-carousel-control i {
    font-size: 32px;
    color: var(--color-primary, #0066cc);
}

/* Banner Indicators */
.banner-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.banner-carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.banner-carousel-indicators .indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 32px;
    border-radius: 6px;
}

.banner-carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Banner Placeholder */
.banner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: var(--careerx-banner-ratio);
    min-height: 300px; /* Fallback */
    background: linear-gradient(135deg, var(--color-primary, #0066cc) 0%, #0052a3 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.banner-placeholder h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    margin: 0;
}

.banner-placeholder p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
}

/* ===== Form Container ===== */
.careerx-content {
    display: flex;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary, #1a1a1a);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Introduction */
.form-introduction {
    margin-bottom: 2rem;
}

.form-introduction p {
    margin: 0;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--color-text-secondary, #666);
    text-align: center;
}

/* ===== Type Tabs ===== */
.type-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    /* background: var(--color-gray-100, #f5f5f5); */
    background: transparent;
    border: 2px solid var(--color-gray-300, #ccc);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    /* color: var(--color-text-secondary, #666); */
}

.type-tab:hover {
    background: var(--color-gray-200, #e0e0e0);
}

.type-tab.active {
    background: var(--color-primary-light, #e6f2ff);
    border-color: var(--color-primary, #0066cc);
    color: var(--color-primary, #0066cc);
}

.type-tab i {
    font-size: 24px;
}

/* ===== Form Sections ===== */
.form-section {
    display: block;
}

.form-section.hidden {
    display: none;
}

/* ===== Form Groups ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group .required {
    color: #d32f2f;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-gray-300, #ccc);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-tertiary, #999);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== Checkbox Group ===== */
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
    color: var(--color-text-primary, #1a1a1a);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary, #0066cc);
}

/* ===== Radio Button Group (Pill Style) ===== */
.radio-button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-button-label {
    position: relative;
    cursor: pointer;
    flex: 1;
}

.radio-button-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button-text {
    display: block;
    width: 100%;
    padding: 0.875rem 2.5rem;
    /* background: var(--color-gray-100, #f5f5f5); */
    border: 2px solid var(--color-gray-300, #ccc);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    /* color: var(--color-text-secondary, #666); */
    transition: all 0.3s ease;
    text-align: center;
}

.radio-button-label:hover .radio-button-text {
    background: var(--color-gray-200, #e0e0e0);
    border-color: var(--color-gray-400, #999);
}

.radio-button-label input[type="radio"]:checked ~ .radio-button-text {
    background: var(--color-primary-light, #e6f2ff);
    border-color: var(--color-primary, #0066cc);
    color: var(--color-primary, #0066cc);
    font-weight: 600;
}

/* ===== Form Actions ===== */
.form-actions {
    margin-top: 2rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--color-primary, #0066cc);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-submit:disabled {
    background: var(--color-gray-400, #999);
    cursor: not-allowed;
}

.btn-submit .btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit .btn-text,
.btn-submit .btn-loader {
    transition: opacity 0.3s ease;
}

.btn-submit .btn-loader.hidden {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loader {
    display: flex;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Messages ===== */
.form-messages {
    margin-top: 1.5rem;
}

.alert {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert.hidden {
    display: none;
}

.alert i {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert .message-content {
    flex: 1;
}

.alert .message-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.alert .message-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-success i {
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-error i {
    color: #c62828;
}

/* ===== Responsive Design ===== */

/* Tablets and below - Reset full-width breakout */
@media (max-width: 991px) {
    .careerx-banner-section {
        width: 100%;
        position: relative;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .careerx-container {
        padding: 1rem 0.5rem;
    }

    .banner-carousel-inner {
        min-height: 200px; /* Smaller fallback on mobile */
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-introduction p {
        font-size: 0.95rem;
    }

    .type-tabs {
        gap: 0.75rem;
    }

    .type-tab {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .banner-carousel-control {
        width: 40px;
        height: 40px;
    }

    .banner-carousel-control i {
        font-size: 28px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 1rem;
    }

    .radio-button-group {
        gap: 0.75rem;
    }

    .radio-button-text {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .banner-placeholder {
        min-height: 200px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .banner-carousel-inner {
        min-height: 150px; /* Even smaller fallback on small mobile */
    }

    .banner-placeholder {
        min-height: 150px;
    }

    .banner-placeholder h1 {
        font-size: 1.75rem;
    }

    .banner-placeholder p {
        font-size: 1rem;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-introduction p {
        font-size: 0.9rem;
    }

    .form-container {
        padding: 1.25rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}
