/* --- المتغيرات الأساسية --- */
:root {
    --dark-bg: #222;
    --orange: #ffaa00;
    --white: #fff;
    --light-gray: #f8f8f8;
    --gray-text: #333;
}

/* --- الستايل الأساسي --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: var(--dark-bg);
    color: var(--gray-text);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
body > header {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* مهم للقائمة ديال التيليفون */
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
}

.nav-links a:hover {
    color: var(--orange);
}

.nav-links a.active {
    color: var(--orange);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2em;
}

.social-icons a:hover {
    color: var(--orange);
}

/* --- Hero Carousel (Slider) --- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 450px; /* ارتفاع ثابت باش المحتوى لي تحت منو ميتخربقش */
    overflow: hidden;
}

.carousel-images-container {
    width: 100%;
    height: 100%;
}

.carousel-images-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-images-container img.active {
    opacity: 1;
}

/* --- Why Choose Us Section --- */
.why-choose-us-section {
    background-color: var(--light-gray);
    padding: 40px 20px;
    text-align: center;
}

.why-choose-us-section h2 {
    font-size: 2.1em;
    margin-bottom: 30px;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; /* باش يهبطو لتحت فالشاشات المتوسطة */
}

.feature-item {
    flex-basis: 200px; /* عرض أساسي لكل عنصر */
}

.feature-item i {
    font-size: 3em;
    color: var(--orange);
    margin-bottom: 15px;
}

.feature-item p {
    font-size: 1.1em;
    font-weight: bold;
}
body.login-page {
    background-color: var(--light-gray);
}


body.login-page .nav-links a.active {
    color: var(--orange);
}

.login-page-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 40px 0;
}

.login-illustration { max-width: 500px; }
.login-illustration img { max-width: 100%; }

.login-container {
    background-color: #2c2c2c;
    border-radius: 15px;
    padding: 40px;
    width: 400px;
    max-width: 100%;
    color: #fff;
}

.login-logo { text-align: center; margin-bottom: 10px; }
.login-logo img { width: 80px; }
.login-header { text-align: center; margin-bottom: 25px; }
.login-header h2 { margin: 0 0 5px 0; font-size: 2em; }
.login-header p { margin: 0; color: #ccc; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; }
.form-group input { width: 100%; padding: 12px; border: none; border-radius: 5px; box-sizing: border-box; }
.password-input-container { position: relative; }
.password-input-container i { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); cursor: pointer; color: #888; }
.forgot-password { display: block; text-align: right; font-size: 0.9em; color: #ccc; text-decoration: none; margin-top: 8px; }
.login-button { display: block; width: 100%; padding: 12px; background-color: #ffa500; color: #fff; border: none; border-radius: 5px; font-size: 1.1em; font-weight: bold; cursor: pointer; margin-top: 30px; }
.login-button:hover { background-color: #e69900; }
/* --- Footer --- */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding-top: 50px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    color: var(--orange);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a:hover {
    color: var(--orange);
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    font-size: 0.9em;
    background-color: #1a1a1a;
}

/* --- بداية الكود ديال Responsive Menu --- */

.hamburger-menu {
    display: none; /* مخفي فالشاشات الكبيرة */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.error-message {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.error-message:empty {
    display: none;
}
/* --- Shared public page content --- */
.page-main {
    background-color: var(--light-gray);
}

.page-hero {
    padding: 64px 20px 44px;
    text-align: center;
    background-color: var(--white);
}

.page-hero h1,
.page-hero h2 {
    max-width: 900px;
    margin: 0 auto 16px;
    line-height: 1.25;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Abonnement */
.packs-section {
    padding: 60px 20px;
    background-color: var(--light-gray);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.section-header h1,
.section-header h2 {
    margin: 0 0 14px;
    font-size: 2.1rem;
}

.section-header p {
    margin: 0;
    line-height: 1.7;
}

.packs-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.pack-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pack-card .card-header {
    padding: 26px 20px;
    text-align: center;
    color: var(--white);
    background-color: var(--dark-bg);
    border-top: 5px solid var(--orange);
}

.pack-card .card-header h3,
.pack-card .price {
    margin: 0;
}

.pack-card .price {
    margin-top: 8px;
    color: var(--orange);
    font-size: 1.45rem;
    font-weight: bold;
}

.pack-card .card-content {
    flex: 1;
    padding: 24px;
}

.pack-card .card-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pack-card .card-content li {
    padding: 10px 0;
    line-height: 1.45;
    border-bottom: 1px solid #ededed;
    overflow-wrap: anywhere;
}

.pack-card .card-content li:last-child {
    border-bottom: 0;
}

.pack-card .number {
    color: #c67d00;
    font-weight: bold;
}

.pack-footer {
    padding: 0 24px 24px;
}

.button,
.submit-button,
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 6px;
    background-color: var(--orange);
    color: #1a1a1a;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.pack-footer .button {
    width: 100%;
}

.button:hover,
.submit-button:hover,
.contact-button:hover {
    background-color: #e69900;
}

/* Contact */
.contact-section {
    padding: 60px 20px;
    background-color: var(--light-gray);
}

.contact-header {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}

.contact-header h1 {
    margin: 0 0 16px;
    font-size: 2.1rem;
}

.contact-header p {
    line-height: 1.7;
}

.octaprint-highlight {
    color: #c67d00;
    font-weight: bold;
}

.contact-form {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

/* About */
.about-page {
    padding-bottom: 60px;
    background-color: var(--light-gray);
}

.about-header {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--white);
}

.about-header h1 {
    max-width: 920px;
    margin: 0 auto 18px;
    font-size: 2.1rem;
    line-height: 1.3;
}

.about-header p {
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.7;
}

.service-section {
    padding: 55px 20px 0;
}

.service-content {
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.service-section:nth-of-type(even) .service-content {
    flex-direction: row-reverse;
}

.service-image,
.service-text {
    flex: 1 1 0;
    min-width: 0;
}

.service-image img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.service-text h2 {
    margin-top: 0;
    color: #c67d00;
}

.service-text p,
.service-text li {
    line-height: 1.7;
}

.contact-cta {
    padding: 55px 20px 0;
    text-align: center;
}

/* Privacy policy */
.privacy-page {
    padding: 56px 20px 72px;
    background-color: var(--light-gray);
}

.privacy-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.privacy-toc,
.privacy-content {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.privacy-toc {
    position: sticky;
    top: 82px;
    padding: 24px;
}

.privacy-toc h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.privacy-toc ol {
    margin: 0;
    padding-left: 22px;
}

.privacy-toc li {
    margin: 7px 0;
}

.privacy-toc a {
    color: var(--gray-text);
    text-decoration: none;
}

.privacy-toc a:hover {
    color: #b36f00;
    text-decoration: underline;
}

.privacy-content {
    padding: 38px;
}

.privacy-content section {
    scroll-margin-top: 90px;
    padding-bottom: 22px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e8e8e8;
}

.privacy-content section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.privacy-content h2 {
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.privacy-content p,
.privacy-content li {
    line-height: 1.75;
}

.privacy-content a {
    color: #9b6200;
}

.privacy-updated {
    margin-top: 14px !important;
    color: #666;
    font-size: 0.95rem;
}

/* الكود الخاص بالشاشات الصغيرة (أقل من 768px) */
@media (max-width: 768px) {

    .header-container .nav-links,
    .header-container .social-icons {
        display: none;
    }

    .hamburger-menu {
        display: flex; /* كيولي باين */
    }

    .nav-links.active {
        display: flex;
        position: absolute;
        top: 100%; /* كيجي تحت الهيدر مباشرة */
        left: 0;
        width: 100%;
        background-color: var(--dark-bg);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .nav-links.active ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    
    .nav-links.active li {
        width: 100%;
        text-align: center;
    }

    .nav-links.active li a {
        padding: 15px;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active li:last-child a {
        border-bottom: none;
    }

    .features-list {
        flex-direction: column;
        align-items: center;
    }

    .hero-carousel {
        height: 280px;
    }

    .packs-container {
        grid-template-columns: 1fr;
    }

    .service-content,
    .service-section:nth-of-type(even) .service-content {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }

    .service-image img {
        max-height: 260px;
    }

    .privacy-layout {
        grid-template-columns: 1fr;
    }

    .privacy-toc {
        position: static;
    }

    .privacy-content,
    .contact-form {
        padding: 24px;
    }

    .page-hero,
    .about-header {
        padding-top: 44px;
        padding-bottom: 34px;
    }

    .page-hero h1,
    .about-header h1,
    .section-header h1,
    .section-header h2,
    .contact-header h1 {
        font-size: 1.75rem;
    }
     .login-illustration {
        display: none; /* كنخبيو الصورة فالتيليفون */
    }
    .login-page-content {
        justify-content: center;
        padding: 30px 20px;
    }

    .login-container {
        padding: 28px 22px;
    }
}

@media (max-width: 430px) {
    .container,
    .header-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-carousel {
        height: 230px;
    }

    .why-choose-us-section,
    .packs-section,
    .contact-section,
    .privacy-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-col {
        min-width: 0;
        flex-basis: 100%;
    }

    .privacy-content,
    .privacy-toc,
    .contact-form {
        padding: 20px;
    }
}
