/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    /* Updated Palette for Better Contrast */
    --bg-color: #f2efe9;
    /* Deeper Beige/Sand */
    --card-bg: #ffffff;
    /* Pure White */
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    /* Darker grey for better readability */
    --accent-gold: #b45309;
    --accent-gold-bg: #fff7ed;
    /* Light orange/gold tint for active states */
    --accent-gold-hover: #9a3412;
    --input-bg: #f9fafb;
    /* Very light grey for inputs */
    --input-border: #d1d5db;
    /* Stronger border */
    --option-bg: #f3f4f6;
    /* Light grey for unselected options */
    --shadow-soft: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(180, 83, 9, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(180, 83, 9, 0.05) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f3f4f6;
}

.logo {
    max-width: 220px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

h2 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}


/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.1);
}

/* Radio Cards - Increased Contrast */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--option-bg);
    /* Grey by default */
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    color: var(--text-secondary);
}

.radio-card-label:hover {
    background: #e5e7eb;
}

.radio-card-label.bordered {
    border-color: var(--accent-gold);
}

.radio-card input:checked+.radio-card-label {
    border-color: var(--accent-gold);
    background: var(--accent-gold-bg);
    /* Gold tint active */
    color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.15);
}

.radio-card input:checked+.radio-card-label .radio-card-title {
    color: var(--accent-gold);
}

.radio-card input:checked+.radio-card-label .radio-card-subtitle {
    color: var(--accent-gold);
    font-weight: 600;
}

.radio-card input:disabled+.radio-card-label {
    opacity: 0.5;
    background: #f3f4f6;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none;
}

.radio-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    /* Dark text by default */
}

.radio-card-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    width: 100%;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent-gold);
    /* Solid, no gradient for cleaner look */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(180, 83, 9, 0.3);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #e5e7eb !important;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-primary) !important;
    color: var(--text-primary);
    background: #f9fafb;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Helper Classes */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hidden {
    display: none !important;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: none;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    border-left: 4px solid #22c55e;
    color: #166534;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: #e5e7eb;
    color: #374151;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}



/* Radio Cards - Increased Contrast */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--option-bg);
    /* Grey by default */
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    color: var(--text-secondary);
}

.radio-card-label:hover {
    background: #e5e7eb;
}

.radio-card input:checked+.radio-card-label {
    border-color: var(--accent-gold);
    background: var(--accent-gold-bg);
    /* Gold tint active */
    color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.15);
}

.radio-card input:checked+.radio-card-label .radio-card-title {
    color: var(--accent-gold);
}

.radio-card input:checked+.radio-card-label .radio-card-subtitle {
    color: var(--accent-gold);
    font-weight: 600;
}

.radio-card input:disabled+.radio-card-label {
    opacity: 0.5;
    background: #f3f4f6;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none;
}

.radio-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    /* Dark text by default */
}

.radio-card-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    width: 100%;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent-gold);
    /* Solid, no gradient for cleaner look */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(180, 83, 9, 0.3);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #e5e7eb !important;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-primary) !important;
    color: var(--text-primary);
    background: #f9fafb;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Helper Classes */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hidden {
    display: none !important;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: none;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    border-left: 4px solid #22c55e;
    color: #166534;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: #e5e7eb;
    color: #374151;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.full {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        /* Better for long forms */
    }

    .container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 2rem;
        margin-top: 0.5rem;
    }

    .logo {
        max-width: 160px;
    }

    .radio-grid {
        grid-template-columns: 1fr;
        /* Stack cards on mobile */
        gap: 1rem;
    }

    .radio-card-label {
        padding: 1.5rem;
        flex-direction: row;
        /* Horizontal layout for better space usage */
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    /* Fix for term cards with more content */
    .radio-card-label.bordered {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
    }

    .radio-card-title {
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    /* Make active state more obvious on mobile */
    .radio-card input:checked+.radio-card-label {
        transform: scale(1.02);
    }

    /* Adjust badges */
    .badge {
        position: static;
        margin-left: 0.5rem;
    }

    /* Ensure modals fit */
    .modal-box {
        padding: 1.5rem;
        width: 95%;
    }
}

/* Support Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 450px;
    width: 90%;
    position: relative;
    border: 1px solid #e5e7eb;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-primary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}