/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'FogtwoNo5', serif;
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ede5 100%);
    color: #2c2c2c;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 2px solid #d4c4a8;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Logo Styles */
.logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container a {
    text-decoration: none;
    display: inline-block;
    border: none;
    outline: none;
}

.logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05);
}

/* Form Styles */
.application-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.form-section {
    margin-bottom: 50px;
}

.form-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e0d0;
    letter-spacing: 1px;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c2c2c;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* Input Styles */
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e0d0;
    border-radius: 6px;
    font-family: 'FogtwoNo5', serif;
    font-size: 1rem;
    color: #2c2c2c;
    background: #fafafa;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #c4a484;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 164, 132, 0.1);
}

/* Custom Input Wrapper */
.custom-input-wrapper {
    position: relative;
    width: 100%;
}

.custom-input-wrapper input {
    padding-right: 50px;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #c4a484;
    pointer-events: none;
    transition: all 0.3s ease;
}

.custom-input-wrapper:hover .input-icon {
    color: #b8956b;
    transform: translateY(-50%) scale(1.1);
}

.custom-input-wrapper input:focus + .input-icon {
    color: #c4a484;
    transform: translateY(-50%) scale(1.2);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'FogtwoNo5', serif;
}

/* Question Groups */
.question-group {
    margin-bottom: 40px;
    padding: 30px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #c4a484;
}

.question-group h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #e8e0d0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.radio-label:hover {
    border-color: #c4a484;
    background: #fefefe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

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

.radio-label input[type="radio"]:checked + .radio-custom {
    background: #c4a484;
    border-color: #c4a484;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.radio-label input[type="radio"]:checked ~ .option-text,
.radio-label input[type="radio"]:checked ~ .graph-option {
    color: #1a1a1a;
    font-weight: 500;
}

.option-text,
.graph-option {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
    color: #4a4a4a;
    transition: all 0.3s ease;
}

.graph-option {
    font-weight: 500;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.graph-image {
    width: 120px;
    height: 80px;
    border: 2px solid #e8e0d0;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.graph-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.radio-label:hover .graph-image {
    border-color: #c4a484;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.radio-label:hover .graph-image img {
    transform: scale(1.05);
}

.radio-label input[type="radio"]:checked ~ .graph-option .graph-image {
    border-color: #c4a484;
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ede5 100%);
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.2);
}

.radio-label input[type="radio"]:checked ~ .graph-option .graph-image img {
    transform: scale(1.1);
}

.graph-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-top: 5px;
}

/* Character Count */
.char-count {
    text-align: right;
    font-size: 0.9rem;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

/* Submit Button */
.form-actions {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e8e0d0;
}

.submit-btn {
    background: linear-gradient(135deg, #c4a484 0%, #b8956b 100%);
    color: #fff;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'FogtwoNo5', serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 164, 132, 0.4);
    background: linear-gradient(135deg, #b8956b 0%, #a6825a 100%);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .application-form {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .question-group {
        padding: 20px;
    }
    
    .radio-label {
        padding: 12px 15px;
    }
    
    .option-text {
        font-size: 0.95rem;
    }
    
    /* Graph images responsive styles */
    .graph-image {
        width: 100px;
        height: 70px;
    }
    
    .graph-label {
        font-size: 0.85rem;
    }
    
    /* Custom dropdown responsive styles */
    .dropdown-selected {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .dropdown-option {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .dropdown-options {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .form-section h2 {
        font-size: 1.5rem;
    }
    
    .question-group h3 {
        font-size: 1.1rem;
    }
    
    .submit-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    /* Custom dropdown mobile styles */
    .dropdown-selected {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .dropdown-option {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .dropdown-options {
        max-height: 200px;
    }
    
    .dropdown-arrow {
        font-size: 0.7rem;
    }
    
    /* Graph images mobile styles */
    .graph-image {
        width: 80px;
        height: 60px;
        padding: 8px;
    }
    
    .graph-label {
        font-size: 0.8rem;
    }
    
    /* Next steps mobile styles */
    .next-steps {
        padding: 25px 20px;
        margin-top: 30px;
    }
    
    .next-steps h2 {
        font-size: 1.8rem;
    }
    
    .next-steps-intro {
        font-size: 1.1rem;
    }
    
    .upload-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .essential-reading {
        padding: 20px;
    }
    
    .essential-reading h3 {
        font-size: 1.2rem;
    }
    
    .essential-reading li {
        padding: 12px;
    }
    
    /* Custom input wrapper mobile styles */
    .custom-input-wrapper input {
        padding-right: 45px;
    }
    
    .input-icon {
        right: 12px;
        font-size: 1.1rem;
    }
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
    font-family: 'FogtwoNo5', serif;
}

.dropdown-selected {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e0d0;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.dropdown-selected:hover {
    border-color: #c4a484;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 164, 132, 0.1);
}

.dropdown-selected.active {
    border-color: #c4a484;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 164, 132, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-text {
    font-size: 1rem;
    color: #2c2c2c;
    flex: 1;
}

.dropdown-text.placeholder {
    color: #999;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #c4a484;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.dropdown-selected.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #c4a484;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-options.active {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
    overflow-x: hidden;
}

.dropdown-option {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    color: #2c2c2c;
    position: relative;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ede5 100%);
    color: #1a1a1a;
    padding-left: 25px;
}

.dropdown-option.selected {
    background: linear-gradient(135deg, #c4a484 0%, #b8956b 100%);
    color: #fff;
    font-weight: 500;
}

.dropdown-option.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Dropdown Error States */
.custom-dropdown.error .dropdown-selected {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.custom-dropdown.error .dropdown-selected:hover {
    border-color: #d32f2f;
    background-color: #ffebee;
}

/* Custom scrollbar for dropdown options */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #c4a484;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #b8956b;
}

/* Focus styles for accessibility */
.custom-dropdown:focus-within .dropdown-selected {
    outline: 2px solid #c4a484;
    outline-offset: 2px;
}

/* Animation for dropdown opening */
@keyframes dropdownSlideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        max-height: 300px;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dropdownSlideUp {
    from {
        max-height: 300px;
        opacity: 1;
        transform: translateY(0);
    }
    to {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c4a484;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8956b;
}

/* Focus styles for accessibility */
.radio-label:focus-within {
    outline: 2px solid #c4a484;
    outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #c4a484;
    outline-offset: 2px;
}

/* Next Steps Section */
.next-steps {
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ede5 100%);
    border: 2px solid #c4a484;
    border-radius: 12px;
    padding: 40px;
    margin-top: 40px;
}

.next-steps h2 {
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.2rem;
}

.next-steps-content {
    max-width: 600px;
    margin: 0 auto;
}

.next-steps-intro {
    font-size: 1.2rem;
    color: #2c2c2c;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.upload-section {
    text-align: center;
    margin-bottom: 40px;
}

.upload-btn {
    background: linear-gradient(135deg, #c4a484 0%, #b8956b 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'FogtwoNo5', serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 164, 132, 0.4);
    background: linear-gradient(135deg, #b8956b 0%, #a6825a 100%);
}

.upload-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
}

.upload-icon {
    font-size: 1.2rem;
}

.upload-text {
    letter-spacing: 0.5px;
}

.upload-status {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.upload-status.success {
    color: #4caf50;
    font-weight: 500;
}

.upload-status.error {
    color: #d32f2f;
    font-weight: 500;
}

.essential-reading {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #c4a484;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.essential-reading h3 {
    color: #1a1a1a;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.essential-reading ul {
    list-style: none;
    padding: 0;
}

.essential-reading li {
    margin-bottom: 20px;
    padding: 15px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e8e0d0;
    line-height: 1.6;
}

.essential-reading li:last-child {
    margin-bottom: 0;
}

.essential-reading strong {
    color: #1a1a1a;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.essential-reading em {
    color: #666;
    font-style: italic;
    font-size: 0.95rem;
}

.essential-reading a {
    color: #c4a484;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.essential-reading a:hover {
    color: #b8956b;
    border-bottom-color: #b8956b;
    transform: translateY(-1px);
}

.essential-reading a:active {
    color: #a6825a;
    transform: translateY(0);
}

/* Animation for form sections */
.form-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
