:root {
    --primary-color: #213c5e; /* Navy Blue from the image */
    --secondary-color: #898e94; /* Gray from the image */
    --accent-color: #3b82f6; /* Modern Blue for interactive elements */
    --bg-color: #ffffff;
    --text-color: #1f2937;
    --modal-bg: rgba(33, 60, 94, 0.4); /* Glassmorphism backdrop */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    animation: fadeIn 1s ease-in-out;
}

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

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logo-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    line-height: 1;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.4em;
    margin-left: 0.4em; /* Adjust to balance letter-spacing visually */
}

/* Features */
.features {
    font-family: 'Oswald', sans-serif;
    color: var(--secondary-color);
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1.2;
    font-weight: 500;
}

/* Persian & Sub info */
.persian-description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.fa-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-color);
}

.en-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--primary-color);
    font-weight: 400;
}

.year {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--primary-color);
    margin-top: 0.5rem;
    font-weight: 300;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px; /* Pill shape for premium feel */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #172a42;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

.btn-submit {
    flex: 2;
    background-color: var(--primary-color);
    color: white;
    justify-content: center;
    position: relative;
    margin-top: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
}

.btn-cancel {
    flex: 1;
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    justify-content: center;
}

.btn-cancel:hover {
    background-color: #e2e8f0;
    color: #475569;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: var(--modal-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    text-align: right;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.modal-desc {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f9fafb;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 60, 94, 0.1);
    background-color: #fff;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background-color: #def7ec;
    color: #03543f;
}

.form-message.error {
    display: block;
    background-color: #fde8e8;
    color: #9b1c1c;
}

/* New Form Layout Styles */
.form-group-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.half-width {
    flex: 1;
}

.radio-group-container {
    background-color: #f8fafc;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-row label {
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

/* iOS Style Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Pill Options for Best Time */
.best-time-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.best-time-label {
    margin-bottom: 0.8rem !important;
    text-align: right;
}

.pill-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill-options input[type="radio"] {
    display: none;
}

.pill-options label {
    padding: 0.6rem 1.2rem;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
    color: var(--text-color);
    margin: 0 !important;
    font-weight: 500 !important;
}

.pill-options input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(33, 60, 94, 0.2);
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
    position: absolute;
    right: 1.5rem;
}

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

/* Responsive tweaks */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .form-group-row {
        flex-direction: column;
        gap: 0;
    }

    .pill-options {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }
}
