/* --- General Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html,
body {
    width: 100%;
    /* SINGLE-FOLD FIT: Set height to 100% of viewport height */
    height: 100vh;      
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: #333;
    /* SINGLE-FOLD FIT: Prevent vertical scroll on desktop */
    overflow-y: hidden; 
}

/* ⚠️ RTL STYLES FOR ARABIC (Controlled by JS setting body direction) */
body[style*="direction: rtl"] {
    font-family: 'Cairo', sans-serif !important; 
    text-align: right;
}

body[style*="direction: rtl"] .header {
    justify-content: flex-start; 
}

body[style*="direction: rtl"] .language-switch .dropdown-content {
    right: auto;
    left: 0;
}

/* --- Main Page Container (wraps everything) --- */
.page-container {
    width: 100%;
    /* SINGLE-FOLD FIT: Make container take up full viewport height */
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- Header / Language Switch --- */
.header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 20px 40px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.language-switch .dropdown {
    position: relative;
    display: inline-block;
}

/* 💥 DROPDOWN DESIGN REVERTED */
.language-switch .dropbtn {
    background-color: #fff;
    color: #7D1254;
    border: 2px solid #7D1254;
    border-radius: 10px;
    /* Reverted to larger padding and font size */
    padding: 6px 20px; 
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.language-switch .dropbtn .arrow {
    font-size: 0.7rem;
}

.language-switch .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background-color: #fff;
    min-width: 100px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.language-switch .show {
    display: block;
}

.language-switch .dropdown-content a {
    color: #7D1254;
    /* Reverted to larger padding */
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.language-switch .dropdown-content a:hover {
    background-color: #f2f2f2;
}

/* --- Hero Section (Image and Content) --- */
.hero-section {
    display: flex;
    flex-direction: row;
    width: 100%;
    /* SINGLE-FOLD FIT: Make the section fill the entire available space */
    height: 100%; 
}

.hero-image {
    flex: 1;
    /* SINGLE-FOLD FIT: Make image fill its height container */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* SINGLE-FOLD FIT: Use space-between for distribution */
    justify-content: space-between; 
    align-items: center;
    padding: 80px 40px 40px 40px;
    text-align: center;
    /* SINGLE-FOLD FIT: Make content fill its height container */
    height: 100%;
}

/* --- Content Elements --- */
.logo {
    margin-bottom: 0;
    margin-top: 0; 
}

.logo img {
    width: 120px;
}

h1 {
       font-size: 48px;
    color: #1A1A1A;
    line-height: 1.2;
    margin-bottom: 0;
    font-weight: 400;
    flex-shrink: 1;
}

.burjeel-glow-logo-img {
    display: block;
    width: 100%;
    max-width: 60%;
    height: auto;
    margin: 0 auto;
    padding: 0.5rem 0; 
    flex-shrink: 1;
}

.coming-soon {
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 5px;
    margin: 5px 0; 
    font-weight: 500;
}

.subscribe-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem; 
    font-weight: 400;
}

/* --- Form Styles --- */
.notify-form {
    display: flex;
    flex-direction: column;
    gap: 0px; 
    width: 100%;
    max-width: 480px;
    min-height: 250px;
    text-align: left; 
}

.input-group {
    margin-bottom: 8px; 
}
#notify-form p{
    text-align: center;
    font-weight: 500;
}

.notify-form input {
    padding: 12px; 
    border: 1px solid #C1C7CD;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    direction: inherit; 
    margin-bottom: 3px; 
    transition: all 0.2s ease;
}

/* Validation Visuals */
.notify-form input:focus {
    border-color: #7D1254;
    box-shadow: 0 0 5px rgba(125, 18, 84, 0.5); 
}

.notify-form input.input-error {
    border-color: #d9534f; 
    box-shadow: 0 0 8px rgba(217, 83, 79, 0.7); 
}

.notify-form input.input-error:hover {
    border-color: #c9302c; 
    box-shadow: 0 0 10px rgba(201, 48, 44, 0.8);
}

.error-message {
    display: block;
    color: #d9534f;
    font-size: 0.75rem; 
    font-weight: 500;
    margin-top: 0;
    padding: 0 5px;
    text-align: inherit; 
}


.notify-form input::placeholder {
    color: #697077;
}

.notify-form button {
    background-color: #87194B;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 1px;
    transition: background 0.3s ease;
    margin: 10px auto 0rem auto; 
}

.notify-form button:hover {
    background-color: #a4166b;
}

#message {
    margin-top: 8px; 
    font-size: 0.9rem;
    font-weight: 500;
    direction: inherit; 
    text-align: inherit;
}

/* --- Media Queries for Responsiveness --- */

/* Tablet and Mobile: Allow scrolling and return to normal flow */
@media (max-width: 1024px) {
    html,
    body,
    .page-container,
    .hero-section,
    .hero-content {
        height: auto;     /* Restore normal height flow */
        min-height: 100vh; /* Ensure content is at least one viewport high */
        overflow-y: auto; /* Allow vertical scroll */
    }
    
    .hero-section {
        flex-direction: column;
        padding-top: 0; 
    }

    .hero-image {
        width: 100%;
        height: 50vh;
        min-height: 250px;
    }

    .hero-content {
        width: 100%;
        padding: 80px 20px 80px;
        min-height: auto;
        justify-content: center; 
        gap: 15px;
    }
    
    .header {
        padding: 15px 20px;
    }

    /* 💥 DROPDOWN MOBILE STYLE IS NOW CONSISTENT WITH DESKTOP */
    .language-switch .dropbtn {
        padding: 6px 20px; /* Keep the larger size */
        font-size: 0.9rem; /* Keep the larger size */
    }
    /* ---------------------------------------------------- */

    .logo {
        margin-top: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .burjeel-glow-logo-img {
        width: 70%;
    }

    .notify-form {
        max-width: 300px;
    }

    .notify-form button {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 30px 15px 60px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .burjeel-glow-logo-img {
        width: 85%;
    }

    /* Keep all text/content small for smaller screens, but dropdown retains its design */
    .subscribe-text,
    .coming-soon,
    #message,
    .error-message {
        font-size: 0.8rem;
    }
}