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

:root {
    --primary-color: #4AD295;
    --dark-bg: #000000;
    --light-bg: #222222;
    --white: #FFFFFF;
    --text-light: #999999;
    --border-color: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: var(--dark-bg);
    overflow-x: hidden;
}

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

/* Header */
header {
    padding: 20px 0;
    background: var(--dark-bg);
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: 300;
    color: var(--white);
    letter-spacing: 6px;
    margin: 0;
}

/* Hero Section */
.hero {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.hero h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Fixed Bottom Progress Bar */
.fixed-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Hide mobile navigation on desktop */
.mobile-progress-nav {
    display: none;
}

.progress-sections {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 8px;
}

.progress-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.section-indicator {
    width: 100%;
    height: 6px;
    background: var(--light-bg);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.section-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--section-progress, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #2FAB7A 100%);
    transition: width 0.5s ease;
}

.progress-section.active .section-indicator {
    height: 8px;
    box-shadow: 0 0 10px rgba(74, 210, 149, 0.5);
}

.progress-section.completed .section-indicator {
    height: 6px;
    box-shadow: none;
}

.progress-section.completed .section-indicator::after {
    background: var(--primary-color);
}

.section-label {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}

.progress-section.completed .section-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-section.active .section-label {
    color: var(--white);
}

.progress-section:hover .section-indicator {
    transform: scaleY(1.2);
}

.progress-section:hover .section-label {
    color: var(--white);
}

/* Form Section */
.form-section {
    padding: 60px 0 100px;
    background: var(--dark-bg);
}

.partner-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section-block {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.form-section-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 210, 149, 0.1);
}

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

.form-section-block:nth-child(1) { animation-delay: 0.1s; }
.form-section-block:nth-child(2) { animation-delay: 0.2s; }
.form-section-block:nth-child(3) { animation-delay: 0.3s; }
.form-section-block:nth-child(4) { animation-delay: 0.4s; }
.form-section-block:nth-child(5) { animation-delay: 0.5s; }
.form-section-block:nth-child(6) { animation-delay: 0.6s; }
.form-section-block:nth-child(7) { animation-delay: 0.7s; }
.form-section-block:nth-child(8) { animation-delay: 0.8s; }
.form-section-block:nth-child(9) { animation-delay: 0.9s; }

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.5px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.9;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(74, 210, 149, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:hover:not(:focus),
input[type="email"]:hover:not(:focus),
input[type="tel"]:hover:not(:focus),
input[type="url"]:hover:not(:focus),
input[type="number"]:hover:not(:focus),
input[type="time"]:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
    border-color: #444;
}

input::placeholder,
textarea::placeholder {
    color: #666;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234AD295' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
input[type="file"] {
    width: 100%;
    padding: 20px;
    background: rgba(74, 210, 149, 0.05);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(74, 210, 149, 0.1);
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 210, 149, 0.1);
}

.field-note {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* Validation Error Messages */
.validation-error {
    font-size: 12px;
    color: #ff4757;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideDown 0.2s ease;
}

.validation-error::before {
    content: '⚠';
    font-size: 14px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: #ff4757;
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/* Checkboxes and Radio Buttons */
.checkbox-group,
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.3);
}

.checkbox-label:hover,
.radio-label:hover {
    background: rgba(74, 210, 149, 0.08);
    border-color: rgba(74, 210, 149, 0.3);
    transform: translateX(2px);
}

input[type="checkbox"]:checked + span,
input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span,
.radio-label span {
    font-size: 14px;
    color: var(--white);
}

.agreement-checkbox {
    background: rgba(74, 210, 149, 0.05);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
}

.agreement-checkbox span {
    font-size: 14px;
    line-height: 1.6;
}

.agreement-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
}

.agreement-checkbox a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 210, 149, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2FAB7A 100%);
    color: #000;
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary:disabled::before {
    display: none;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.submit-note {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-light);
}

/* Footer */
footer {
    background: #000;
    color: var(--white);
    padding: 40px 0;
    border-top: 1px solid #222;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Success Message */
.success-message {
    display: none;
    background: rgba(74, 210, 149, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 40px auto;
    max-width: 600px;
}

.success-message.show {
    display: block;
}

.success-message h3 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 15px;
}

.success-message p {
    color: var(--white);
    font-size: 16px;
    line-height: 1.6;
}

/* Availability Schedule Grid */
.schedule-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-schedule-action {
    padding: 8px 16px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-schedule-action:hover {
    background: rgba(74, 210, 149, 0.1);
    border-color: var(--primary-color);
}

.availability-grid {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.grid-table {
    border-collapse: separate;
    border-spacing: 4px;
    width: 100%;
    min-width: 700px;
}

.grid-table th {
    background: var(--light-bg);
    color: var(--white);
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.grid-table .time-label {
    background: transparent;
    color: var(--text-light);
    font-size: 12px;
    text-align: right;
    padding-right: 12px;
    font-weight: 400;
}

.time-slot {
    width: 50px;
    height: 40px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    position: relative;
}

.time-slot:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(74, 210, 149, 0.3);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.time-slot.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    font-size: 16px;
}

/* Legend */
.schedule-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.legend-box.available {
    background: var(--primary-color);
}

.legend-box.unavailable {
    background: var(--dark-bg);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Typography */
    .hero h2 {
        font-size: 28px;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 15px;
        padding: 0 10px;
    }

    /* Container & Spacing */
    .container {
        padding: 0 15px;
    }

    .form-section-block {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    /* Form Layout */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .checkbox-group,
    .radio-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Inputs - Make them larger for touch */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 14px;
        min-height: 48px; /* Better touch target */
    }

    textarea {
        min-height: 120px;
    }

    /* File Upload */
    input[type="file"] {
        font-size: 14px;
        padding: 12px;
    }

    /* Buttons */
    .btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }

    /* Availability Grid - Make scrollable horizontally */
    #availabilityGrid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .grid-table {
        min-width: 580px; /* Slightly smaller for better fit */
        font-size: 12px;
    }

    .grid-table th {
        font-size: 11px;
        padding: 10px 4px;
    }

    .time-label {
        font-size: 10px;
        min-width: 60px;
    }

    .time-slot {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    /* Schedule Legend */
    .schedule-legend {
        flex-direction: column;
        gap: 12px;
        font-size: 12px;
    }

    /* Footer */
    footer {
        margin-top: 20px;
        padding: 25px 0;
        margin-bottom: 80px; /* Space for fixed progress bar */
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    /* Progress Bar - Mobile Navigation Style */
    .fixed-progress-bar {
        padding: 12px 15px;
        bottom: 0;
    }

    /* Hide the dots layout on mobile */
    .progress-sections {
        display: none !important;
    }

    /* Show mobile navigation style */
    .mobile-progress-nav {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }

    .mobile-progress-text {
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: var(--white);
        font-weight: 500;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-progress-step {
        font-size: 12px;
        color: var(--text-light);
        display: block;
    }

    .mobile-progress-bar {
        width: 100%;
        height: 4px;
        background: var(--border-color);
        border-radius: 2px;
        overflow: hidden;
    }

    .mobile-progress-fill {
        height: 100%;
        background: var(--primary-color);
        transition: width 0.3s ease;
        border-radius: 2px;
    }

    .mobile-nav-indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--border-color);
        position: relative;
        flex-shrink: 0;
        cursor: pointer;
        transition: transform 0.2s, background 0.2s, opacity 0.2s;
    }

    .mobile-nav-indicator.has-prev:hover,
    .mobile-nav-indicator.has-next:hover {
        transform: scale(1.2);
    }

    .mobile-nav-indicator.has-prev:active,
    .mobile-nav-indicator.has-next:active {
        transform: scale(0.9);
    }

    /* Disable navigation when no prev/next */
    .mobile-nav-indicator:not(.has-prev):not(.has-next) {
        opacity: 0.3;
        cursor: default;
    }

    .mobile-nav-indicator.has-prev::before,
    .mobile-nav-indicator.has-next::after {
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--text-light);
        opacity: 0.5;
    }

    .mobile-nav-indicator.has-prev::before {
        left: -10px;
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-nav-indicator.has-next::after {
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-nav-indicator.active {
        background: var(--primary-color);
        box-shadow: 0 0 10px rgba(74, 210, 149, 0.6);
    }

    .mobile-nav-indicator.completed {
        background: var(--primary-color);
    }

    .mobile-nav-indicator.completed.has-prev::before,
    .mobile-nav-indicator.completed.has-next::after {
        background: var(--primary-color);
        opacity: 0.7;
    }

    /* Header/Logo */
    .logo h1 {
        font-size: 20px;
    }

    .logo-image {
        height: 35px;
    }

    /* Success Message */
    .success-message {
        padding: 30px 20px;
    }

    .success-message h3 {
        font-size: 22px;
    }

    .success-message p {
        font-size: 14px;
    }

    /* Schedule Actions */
    .schedule-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-schedule-action {
        width: 100%;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .hero h2 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .form-section-block {
        padding: 15px 12px;
    }

    .section-title {
        font-size: 16px;
    }

    .grid-table {
        min-width: 520px;
    }

    .time-slot {
        width: 32px;
        height: 32px;
    }

    .section-label {
        font-size: 7px;
    }

    .logo h1 {
        font-size: 18px;
    }
}
