:root {
    --color-primary: #1b590f;
    --color-secondary: #f1f8f0;
    --color-dark: #14330b;
    --color-gray: #4B5563;
    --color-tech: #00c853;
    --font-heading: "Outfit", sans-serif;
    --font-body: "Outfit", sans-serif;
    --font-arabic: "Cairo", sans-serif;
    /* You might need to import this if not available, but user said 'follow branding' so assuming standard web fonts or user has it. I will import it to be safe */
}

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-secondary);
    color: var(--color-dark);
    color: var(--color-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Arabic Font Override */
[dir="rtl"] body {
    font-family: var(--font-arabic);
    line-height: 1.6;
    /* Improved readability for Arabic */
}

.main-container {
    display: flex;
    flex: 1;
    width: 100%;
    position: relative;
    /* Removed fixed height/overflow hidden to allow natural flow */
}

.mobile-header {
    display: none;
    padding: 1rem;
    background: white;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    justify-content: space-between;
    align-items: center;
    direction: ltr;
    /* Force LTR so logo stays on left */
}

.mobile-header .logo {
    height: 40px;
    width: auto;
}

.panel-header {
    /* Removed absolute positioning for natural flow */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2rem;
    z-index: 10;
    direction: ltr;
    /* Force LTR so logo stays on left */
}

.desktop-logo {
    height: 60px;
}

.lang-toggle {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.lang-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    width: 100%;
    /* height: 100%; Removed fixed height */
}

/* RTL Layout Flip */
[dir="rtl"] .content-wrapper {
    flex-direction: row-reverse;
}

/* Left Panel */
.left-panel {
    flex: 1 1 500px;
    /* Basis of 500px ensures it wraps on smaller screens */
    background: linear-gradient(135deg, var(--color-secondary) 0%, #ffffff 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from center to allow header at top */
    position: relative;
}

[dir="rtl"] .left-panel {
    background: linear-gradient(-135deg, var(--color-secondary) 0%, #ffffff 100%);
    text-align: right;
}

/* Panel header handles logo and toggle positioning */
.hero-content {
    max-width: 600px;
}

[dir="rtl"] .hero-content {
    margin-left: auto;
    /* Push content to right */
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.highlight {
    color: var(--color-primary);
}

.date {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-tech);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.location-info {
    margin-bottom: 2rem;
}

.location-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-address {
    font-size: 1.05rem;
    color: var(--color-gray);
    margin-left: 1.8rem;
    line-height: 1.5;
    /* Align with text start of location name (approx icon width) */
}

[dir="rtl"] .location-address {
    margin-left: 0;
    margin-right: 1.8rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--color-gray);
    margin-bottom: 3rem;
}

.activities-list {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(27, 89, 15, 0.08);
}

.activity-item .icon {
    font-size: 1.5rem;
}

/* Right Panel */
.right-panel {
    flex: 1 1 400px;
    /* Basis of 400px ensures it wraps */
    min-height: 500px;
    /* Ensure visual height when stacked */
    background: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-4.0.3&auto=format&fit=crop&w=1740&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.right-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 51, 11, 0.4);
    backdrop-filter: blur(5px);
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

[dir="rtl"] .form-card {
    text-align: right;
}

.form-card h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.form-card p {
    color: var(--color-gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: var(--color-dark);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234B5563'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    cursor: pointer;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group select {
    font-family: var(--font-arabic);
}

[dir="rtl"] .form-group select {
    background-position: left 1rem center;
}

.form-group input:focus,
.form-group select:focus,
.phone-input-container:focus-within {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(27, 89, 15, 0.1);
    background-color: white;
}

.phone-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Force LTR for the phone container internals so +212 stays on left or right logically? 
   Actually, for phone numbers, it is usually better to keep them LTR even in Arabic context. */
.phone-input-container {
    direction: ltr;
}

.phone-prefix {
    padding: 1rem 0 1rem 1rem;
    color: var(--color-gray);
    font-weight: 600;
    font-family: var(--font-body);
    background: transparent;
    flex-shrink: 0;
}

.phone-input-container input {
    border: none;
    background: transparent;
    padding-left: 0.5rem;
    box-shadow: none !important;
    /* Remove focus shadow from inner input */
}

.phone-input-container input:focus {
    outline: none;
    border: none;
    background: transparent;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

[dir="rtl"] .submit-btn {
    font-family: var(--font-arabic);
}

.submit-btn:hover {
    background-color: var(--color-dark);
    transform: translateY(-2px);
}

/* Responsive Design - Mostly handled by flex-wrap now, just tweaks */
@media (max-width: 968px) {

    /* Kept for specific adjustments if needed, but layout direction is handled by wrap */
    .hero-content h1 {
        font-size: 3rem;
    }
}

/* Mobile Optimizations (< 480px) */
@media (max-width: 480px) {
    .panel-header {
        display: none;
        /* Ensure hidden on mobile if not already */
    }

    .mobile-header {
        padding: 0.75rem 1rem;
    }

    .mobile-header .logo {
        height: 32px;
        width: auto;
    }

    .lang-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
    }

    .left-panel {
        padding: 2rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
        /* Smaller heading */
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .activities-list {
        gap: 1rem;
    }

    .activity-item {
        width: 100%;
        /* Full width buttons on mobile */
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .right-panel {
        padding: 2rem 1rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .form-card h2 {
        font-size: 1.75rem;
    }

    .success-icon {
        font-size: 3rem;
    }
}

/* Success Message Styles */
.success-message {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.success-message h3 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-text {
    color: var(--color-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}