/* ===========================
   Global Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-light: #dbeafe;
    --secondary-color: #06b6d4;
    --accent-color: #ec4899;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --light-bg: #f0f9ff;
    --border-color: #e0e7ff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 25%, #1e40af 50%, #1e3a8a 75%, #0f172a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================
   Container
   =========================== */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===========================
   Header
   =========================== */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 50%, #06b6d4 100%);
    color: white;
    padding: 70px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
    animation: slideDown 0.8s ease;
}

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

.header-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.header-logo {
    margin-bottom: 20px;
    display: inline-block;
    animation: slideDown 0.8s ease;
}

.header-logo img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

.header-logo img:hover {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    transform: scale(1.05);
}

.header-content h1 {
    font-size: 3.2rem;
    margin-bottom: 12px;
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1.1;
}

.header-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.header-address {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-description {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 300;
    margin-bottom: 25px;
    letter-spacing: 0.2px;
}

.header-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    margin-top: 15px;
}

/* ===========================
   Main Content
   =========================== */
.main-content {
    flex: 1;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 40px;
}

.form-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.98) 100%);
    border-radius: 16px;
    padding: 45px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    border: 2px solid;
    border-image: linear-gradient(135deg, #3b82f6, #06b6d4, #ec4899) 1;
    transition: var(--transition);
}

.form-wrapper:hover {
    box-shadow: 0 25px 60px -12px rgba(59, 130, 246, 0.3);
}

.form-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* ===========================
   Form Sections
   =========================== */
.form-section {
    border: none;
    padding: 0;
    margin-bottom: 30px;
}

.form-section:not(:last-of-type) {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section legend {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    padding: 0 0 15px 0;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #3b82f6, #06b6d4, #ec4899) 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid;
    border-image: linear-gradient(135deg, #3b82f6, #06b6d4) 1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-image: linear-gradient(135deg, #06b6d4, #ec4899) 1;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, #ffffff, #f0faff);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===========================
   Select Input
   =========================== */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* ===========================
   Checkboxes
   =========================== */
.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-group.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* ===========================
   Hints and Errors
   =========================== */
.hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.error-message {
    display: none;
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
}

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

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
    background-color: rgba(220, 38, 38, 0.02);
}

/* ===========================
   Form Actions
   =========================== */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    flex: 1;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0891b2 100%);
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    color: var(--primary-dark);
    border: 2px solid;
    border-image: linear-gradient(135deg, #3b82f6, #06b6d4) 1;
    font-weight: 700;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #c7d2fe 0%, #bae6fd 100%);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
}

/* ===========================
   Loading State
   =========================== */
.loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    margin-top: 20px;
}

.loading.show {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===========================
   Success Message
   =========================== */
.success-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.success-message.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.success-content h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.success-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===========================
   Sidebar
   =========================== */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(240, 249, 255, 0.97) 100%);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 20px;
    border-left: 6px solid;
    border-image: linear-gradient(180deg, #3b82f6, #06b6d4, #ec4899) 1;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(224, 242, 254, 0.99) 100%);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 18px;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-list .icon {
    font-size: 1.3rem;
}

.contact-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-list a:hover {
    text-decoration: underline;
}

.hours li {
    list-style: none;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .info-sidebar {
        flex-direction: row;
    }

    .info-card {
        position: static;
    }

    .form-wrapper {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8rem;
    }

    .form-wrapper {
        padding: 20px;
    }

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

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

    .btn {
        width: 100%;
    }

    .info-sidebar {
        flex-direction: column;
    }

    .info-card {
        width: 100%;
    }

    .main-content {
        padding: 20px 15px;
        gap: 15px;
    }

    .success-content {
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }

    .header-content p {
        font-size: 0.9rem;
    }

    .form-section legend {
        font-size: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .success-content {
        padding: 30px 20px;
    }

    .success-content h3 {
        font-size: 1.3rem;
    }
}
