/* add-foo.css - Custom CSS for a Formal, Minimalist & Controlled Neon Design */

/* General Body Styles - Crucial for Scroll Snapping */
html {
    scroll-behavior: smooth; /* لتمرير سلس بين الأقسام */
}

body {
    direction: rtl; /* Set text direction to right-to-left for Arabic */
    text-align: right; /* Align text to the right */
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* More professional font stack */
    background-color: #121212; /* Even darker, almost black background */
    color: #E0E0E0; /* Light text for high contrast */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex; /* لترتيب الهيدر والمين عمودياً */
    flex-direction: column;
    min-height: 100vh; /* لضمان أن الخلفية تغطي كامل الشاشة */
    font-size: 16px;
    overflow-y: scroll; /* السماح بالتمرير العمودي */
    scroll-snap-type: y mandatory; /* **الأهم**: تمكين Scroll Snapping على المحور Y، إلزامي */
    -webkit-overflow-scrolling: touch; /* لتحسين التمرير على iOS */
}

/* Scrollbar Styling for a refined look */
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-track {
    background: #1A1A1A;
}
body::-webkit-scrollbar-thumb {
    background-color: #00B3B3; /* Matches primary accent color */
    border-radius: 10px;
    border: 2px solid #1A1A1A;
}
body::-webkit-scrollbar-thumb:hover {
    background-color: #00CCCC;
}

/* Header Container */
header {
    background-color: #121212;
    border-bottom: 1px solid #282828;
    box-shadow: 0 2px 10px rgba(0, 200, 200, 0.05);
    position: sticky; /* جعل الهيدر ثابتًا أثناء التمرير */
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* منع الهيدر من الانكماش */
    min-height: 70px; /* Minimum height for desktop, will adjust for mobile */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* Allow items to wrap in smaller screens */
}

/* Header Logo */
.header-logo {
    height: 3.5rem;
    width: 3.5rem;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #00E6E6;
    box-shadow: 0 0 10px rgba(0, 230, 230, 0.5);
    flex-shrink: 0; /* Prevent logo from shrinking */
}

/* Navigation */
nav {
    flex-grow: 1; /* Allow nav to take available space */
    text-align: left; /* Align nav content to left in RTL */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align nav items to the right in RTL */
    flex-wrap: wrap; /* Allow nav items to wrap */
}

nav ul li {
    margin-right: 35px; /* Spacing between nav items */
}

nav ul li:last-child {
    margin-right: 0;
}

.nav-link {
    color: #A0A0A0;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Active Nav Link Style */
.nav-link.active {
    color: #00E6E6;
    text-shadow: 0 0 10px #00E6E6, 0 0 20px rgba(0, 230, 230, 0.5);
}

.nav-link.active::after {
    width: 100%;
    left: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #00CCCC;
    box-shadow: 0 0 8px #00CCCC;
    transition: width 0.3s ease-out;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link:hover {
    color: #00E6E6;
    text-shadow: 0 0 10px #00E6E6, 0 0 20px rgba(0, 230, 230, 0.5);
}

.nav-button-primary {
    background-color: #008C8C;
    color: #FFFFFF;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 0 15px rgba(0, 140, 140, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-button-primary:hover {
    background-color: #00A3A3;
    box-shadow: 0 0 25px rgba(0, 163, 163, 0.6), 0 0 40px rgba(0, 163, 163, 0.4);
    transform: translateY(-2px);
}

/* Main content area - Container for scrollable sections */
main {
    flex-grow: 1; /* لجعل main يملأ المساحة المتبقية */
    width: 100%;
    display: flex;
    flex-direction: column; /* لترتيب الأقسام عمودياً */
    padding-top: 20px; /* Add some space above the first card */
    padding-bottom: 20px; /* Add some space below the last card */
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

/* Section Cards - The core of the new Scroll Snapping design */
.section-card {
    display: flex; /* لترتيب المحتوى داخل البطاقة */
    flex-direction: column;
    align-items: center;
    justify-content: center; /* لتوسيط المحتوى داخل كل قسم عمودياً */

    height: calc(100vh - var(--header-height, 70px)); /* Dynamic height, adjusted by JS */
    min-height: 500px; /* Minimum height to prevent content crunching */
    flex-shrink: 0; /* منع الأقسام من الانكماش */
    scroll-snap-align: start; /* **الأهم**: نقطة التقاط التمرير تبدأ من بداية العنصر */

    padding: 4rem; /* Padding inside the card */
    border-radius: 12px;
    background-color: #1A1A1A;
    border: 1px solid #2F2F2F;
    width: 90%; /* نسبة مئوية للعرض */
    max-width: 800px; /* أقصى عرض */
    margin: 0 auto 50px auto; /* توسيط البطاقة أفقياً وترك مسافة أسفلها */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: #00CCCC;
    position: relative; /* لإعطاء البطاقة سياقًا للتحولات والتأثيرات */

    /* Animation initial state (optional, can be refined with JS) */
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s ease-in-out;
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

/* Class for active section - Managed by JS for visual feedback/animation */
.section-card.active-section {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effect for cards (now applies to all visible cards) */
.section-card:hover {
    transform: translateY(-10px); /* More pronounced lift on hover */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
                0 0 70px rgba(0, 255, 255, 0.2); /* Subtle card-wide glow */
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    color: #00E6E6;
    text-shadow: 0 0 15px rgba(0, 230, 230, 0.7);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
    width: 100%;
}

/* Section Description */
.section-description {
    font-size: 1.05rem;
    color: #B0B0B0;
    text-align: center;
    margin-bottom: 50px;
    max-width: 650px;
    line-height: 1.7;
}

/* Form Styling */
.card-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 550px;
    padding-top: 0;
    padding-bottom: 1rem;
}

/* Input Labels */
.input-label {
    display: block;
    font-size: 0.95rem;
    color: #A5A5A5;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: right;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid #3A3A3A;
    border-radius: 6px;
    background-color: #1F1F1F;
    color: #E0E0E0;
    font-size: 1rem;
    text-align: right;
    box-shadow: inset 0 0 8px rgba(0, 200, 200, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: #808080;
    opacity: 0.9;
}

.input-field:focus {
    border-color: #00E6E6;
    background-color: #282828;
    box-shadow: inset 0 0 15px rgba(0, 230, 230, 0.4),
                0 0 20px rgba(0, 230, 230, 0.6);
}

/* File Input */
.hidden-file-input {
    display: none;
}

.file-input-label {
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid #00CCCC;
    border-radius: 6px;
    background-color: #2F2F2F;
    color: #00CCCC;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 12px rgba(0, 204, 204, 0.3);
    transition: all 0.3s ease;
}

.file-input-label .icon {
    font-size: 1.1em;
    margin-left: 10px;
}

.file-input-label:hover {
    background-color: #00CCCC;
    color: #121212;
    box-shadow: 0 0 25px rgba(0, 204, 204, 0.7);
    transform: translateY(-1px) scale(1.005);
}

/* Submit Button */
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.1rem 2.2rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;

    background: linear-gradient(45deg, #008C8C, #006666);
    color: #E0E0E0;
    box-shadow: 0 4px 18px rgba(0, 140, 140, 0.4),
                0 0 30px rgba(0, 140, 140, 0.6);
}

.submit-button:hover {
    background: linear-gradient(45deg, #00A3A3, #007A7A);
    box-shadow: 0 7px 25px rgba(0, 163, 163, 0.6),
                0 0 45px rgba(0, 163, 163, 0.8);
    transform: translateY(-2px) scale(1.005);
    color: #FFFFFF;
}

.submit-button:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 10px rgba(0, 140, 140, 0.3);
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-15deg);
    transition: right 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.submit-button:hover::before {
    right: 100%;
}

/* --- Responsive adjustments --- */

/* Medium Screens (e.g., Tablets, Small Laptops) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 20px; /* Slightly less padding than large screens */
    }

    nav ul {
        justify-content: flex-end; /* Keep nav items to the right in RTL */
        gap: 20px; /* Adjust gap between nav items */
    }

    nav ul li {
        margin-right: 0; /* Remove specific margin for this breakpoint */
    }

    .nav-link {
        padding: 7px 12px;
        font-size: 0.95rem;
    }

    .nav-button-primary {
        padding: 9px 24px;
        font-size: 0.95rem;
    }

    .section-card {
        padding: 3rem; /* Slightly reduced padding */
        max-width: 700px; /* Slightly narrower cards */
        margin-bottom: 40px; /* Less space between cards */
        min-height: 450px; /* Ensure a good minimum height */
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .card-form {
        gap: 1.3rem;
        max-width: 500px;
    }

    .input-field, .file-input-label, .submit-button {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
}


/* Small Screens (e.g., Mobile Phones) - Max-width 768px and below */
@media (max-width: 768px) {
    header {
        height: auto; /* Allow header height to be determined by its content */
        padding: 1rem 0; /* Consistent padding */
        min-height: unset; /* Remove min-height restriction */
    }

    .container {
        flex-direction: column;
        padding: 0 15px; /* Reduced horizontal padding for smaller screens */
    }

    .header-logo {
        margin-bottom: 15px; /* Space between logo and nav on mobile */
    }

    nav ul {
        flex-direction: row; /* Keep nav items in a row (with wrapping) */
        justify-content: center; /* Center nav items horizontally */
        margin-top: 0; /* Adjust margin if needed */
        width: 100%; /* Take full width */
        gap: 8px; /* Gap between nav items */
    }

    nav ul li {
        margin-right: 0; /* Remove fixed right margin */
    }

    .nav-link, .nav-button-primary {
        flex-shrink: 0; /* Prevent links/buttons from shrinking too much */
        font-size: 0.85rem; /* Smaller font size for nav links */
        padding: 6px 12px; /* Adjusted padding */
    }

    .nav-button-primary {
        margin-top: 15px; /* Space above the button */
        padding: 8px 20px; /* Adjusted padding for button */
    }

    main {
        padding-top: 10px; /* Less top padding for main on mobile */
        padding-bottom: 10px; /* Less bottom padding for main on mobile */
    }

    /* Adjust section-card height for mobile, considering the header */
    .section-card {
        height: calc(100vh - var(--header-mobile-height, 150px)); /* Fallback value for safety */
        min-height: 400px; /* Ensure a minimum readable height */
        padding: 2rem 1.5rem; /* Adjusted padding for content inside the card */
        width: 95%; /* Wider card on mobile */
        margin-bottom: 25px; /* Less space between cards */
    }

    .section-title {
        font-size: 1.8rem; /* Smaller title font size */
        margin-bottom: 15px;
    }
    .section-description {
        font-size: 0.9rem; /* Smaller description font size */
        margin-bottom: 25px;
    }
    .card-form {
        gap: 1rem; /* Smaller gap in form */
    }
    .input-label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    .input-field, .file-input-label, .submit-button {
        padding: 0.8rem 0.9rem; /* Smaller padding for inputs/buttons */
        font-size: 0.9rem;
    }
    .submit-button {
        font-size: 1rem; /* Slightly larger for submit button */
    }
}

/* Further adjustments for very small screens (e.g., old iPhones SE) */
@media (max-width: 480px) {
    .header-logo {
        height: 3rem;
        width: 3rem;
    }

    nav ul {
        gap: 5px; /* Even smaller gap for very small screens */
    }

    .nav-link, .nav-button-primary {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .section-card {
        padding: 1.5rem 1rem; /* More constrained padding */
        min-height: 350px; /* Even smaller min-height if absolutely necessary */
        height: calc(100vh - var(--header-mobile-height-sm, 170px)); /* Adjusted dynamic height for very small screens */
    }
    .section-title {
        font-size: 1.5rem;
    }
    .section-description {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    .input-field, .file-input-label, .submit-button {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    .submit-button {
        font-size: 0.95rem;
    }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .section-card {
        padding: 3rem; /* Slightly reduced padding */
        max-width: 700px; /* Slightly narrower cards */
        margin-bottom: 40px; /* Less space between cards */
        min-height: 450px; /* Ensure a good minimum height */
    }
    /* ... other styles ... */
}
/* Adjust header-height for JS to dynamically set for section-card calculations */
:root {
    --header-height: 70px; /* Default for desktop */
    --header-mobile-height: 150px; /* Placeholder for typical mobile stacked header */
    --header-mobile-height-sm: 170px; /* Placeholder for very small mobile stacked header */
}