/* General Styling & Variables */
:root {
    --primary-color: #2D2D2D; --accent-color: #C58940; --background-color: #FDFDFD;
    --text-color: #333; --subtle-gray: #f4f6f8; --white-color: #FFFFFF; --whatsapp-green: #25D366;
    --success-green: #28a745; --german-black: #000000; --german-red: #DD0000; --german-gold: #FFCC00;
}

/* Base styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    font-family: 'Montserrat', 'Cairo', sans-serif; margin: 0; line-height: 1.7;
    background-color: var(--background-color); color: var(--text-color);
    opacity: 0; transition: opacity 0.5s ease-in-out;
}
body.loaded { opacity: 1; }

/* Preloader */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-color); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}
#preloader.fade-out { opacity: 0; visibility: hidden; }
.spinner {
    width: 50px; height: 50px; border: 5px solid var(--subtle-gray);
    border-top: 5px solid var(--accent-color); border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Section Animation */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); padding: 1rem 0;
    position: fixed; width: 100%; top: 0; z-index: 1000; border-bottom: 1px solid #eee;
}
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    width: 90%; max-width: 1200px; margin: 0 auto;
}
.logo { font-size: 1.8rem; font-weight: 900; text-decoration: none; }
.logo .black { color: var(--german-black); }
.logo .red { color: var(--german-red); }
.logo .gold { color: var(--german-gold); }

.nav-links { list-style: none; display: flex; gap: 2.5rem; padding: 0; margin: 0; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 600; padding-bottom: 5px; }
.controls-container { display: flex; align-items: center; gap: 1.5rem; }
.lang-switcher button {
    background: none; border: 1px solid #ddd; border-radius: 5px; padding: 5px 10px;
    cursor: pointer; font-weight: 600; transition: all 0.3s;
}
.lang-switcher button:hover, .lang-switcher button.active {
    background-color: var(--primary-color); color: var(--white-color); border-color: var(--primary-color);
}
.hamburger { display: none; cursor: pointer; }
.hamburger .bar {
    display: block; width: 25px; height: 3px; margin: 5px auto;
    background-color: var(--primary-color); transition: all 0.3s ease-in-out;
}

/* MOBILE NAVIGATION STYLES */
@media (max-width: 992px) {
    html { scroll-padding-top: 85px; }
    .nav-links {
        position: fixed; left: -100%; top: 85px;
        background: var(--white-color); flex-direction: column;
        width: 100%; text-align: center; transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); gap: 0;
    }
    .nav-links.active { left: 0; }
    .nav-links li { padding: 1.5rem 0; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .hero-content h1 { font-size: 3rem; }
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.pexels.com/photos/164595/pexels-photo-164595.jpeg?auto=compress&cs=tinysrgb&w=1260') no-repeat center center/cover;
    min-height: 90vh; display: flex; justify-content: center; align-items: center;
    text-align: center; color: var(--white-color); padding: 120px 2rem 2rem;
}
.hero-content h1 { font-size: 4rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.3; text-shadow: 1px 1px 5px rgba(0,0,0,0.5); }
.hero-content .subtitle { font-size: 1.4rem; font-weight: 400; max-width: 650px; margin: 0 auto 2.5rem auto; opacity: 0.95; }
.cta-button {
    display: inline-block; padding: 14px 35px; background: var(--accent-color); color: white;
    text-decoration: none; border-radius: 50px; font-weight: 700; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-button:hover { transform: translateY(-3px) scale(1.05); background-color: #b17934; }
.hero-benefits {
    margin-top: 2rem; display: flex; justify-content: center;
    gap: 2rem; flex-wrap: wrap; color: var(--white-color); font-weight: 600;
}

/* General Section Styling */
section { padding: 8rem 2rem; }
section h2 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; color: var(--primary-color); text-align: center;}
section > p { max-width: 700px; margin: 0 auto 4rem auto; font-size: 1.2rem; line-height: 1.8; text-align: center;}

/* Newsletter Section & Custom Form */
#newsletter { background-color: var(--subtle-gray); }
.form-wrapper { max-width: 600px; margin: 0 auto; }
.custom-form {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 2rem;
}
.custom-form .input {
    flex-grow: 1;
    border: 2px solid #ddd;
    background-color: var(--white-color);
    padding: 15px 20px;
    border-radius: 50px;
    font-family: 'Montserrat', 'Cairo', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.custom-form .input:focus {
    outline: none;
    border-color: var(--accent-color);
}
.custom-form .submit-button {
    background-color: var(--accent-color);
    color: var(--white-color);
    font-family: 'Montserrat', 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.custom-form .submit-button:hover {
    background-color: #b17934;
    transform: translateY(-2px);
}
.hidden-input { display: none; }
#form-success-message { text-align: center; }
.success-icon {
    width: 60px;
    height: 60px;
    color: var(--success-green);
    margin-bottom: 1rem;
}
#form-success-message h3 { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 0.5rem; }
#form-success-message p { font-size: 1.1rem; color: #555; }
@media (max-width: 600px) {
    .custom-form { flex-direction: column; }
}

/* Courses Section & Cards */
.courses-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; max-width: 1400px; margin: 0 auto; }
.course-card {
    background: var(--white-color); border-radius: 10px; border: 1px solid #e0e0e0;
    transition: all 0.3s ease; display: flex; flex-direction: column; overflow: hidden;
}
.course-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: transparent; }
.course-card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; text-align: left;}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h3 { color: var(--primary-color); margin: 0; font-size: 1.8rem; font-weight: 700; }
.price { background-color: var(--primary-color); color: var(--white-color); padding: 5px 15px; border-radius: 20px; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.card-content > p { flex-grow: 1; }
.course-details { border-top: 1px solid var(--subtle-gray); margin-top: 1.5rem; padding-top: 1.5rem; }
.course-details h4 { margin: 0 0 1rem 0; font-weight: 700; color: var(--primary-color); }
.process-list { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.process-list li { margin-bottom: 0.5rem; position: relative; padding-inline-start: 25px; }
.process-list li::before {
    content: '✔'; color: var(--accent-color); position: absolute; left: 0; top: 0;
}
.bonus-item { display: flex; align-items: center; background: #faf8f5; padding: 1rem; border-radius: 5px; }
.bonus-item svg { width: 24px; height: 24px; fill: var(--accent-color); margin-inline-end: 10px; flex-shrink: 0; }
.whatsapp-button {
    display: block; margin-top: auto; padding: 12px 20px; background: var(--accent-color);
    color: white; text-decoration: none; border-radius: 50px; font-weight: 700;
    text-align: center; transition: background-color 0.3s ease;
}
.whatsapp-button:hover { background: #b17934; }

/* Testimonials Section */
.testimonials-section { background-color: var(--subtle-gray); }
.testimonials-container { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 3rem; }
.testimonial-card {
    background-color: var(--white-color); border-radius: 10px; padding: 2rem; max-width: 350px;
    text-align: center; border-top: 5px solid var(--accent-color); box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.testimonial-card img {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    margin-bottom: 1rem; border: 3px solid var(--subtle-gray);
}
.testimonial-quote { font-style: italic; color: #555; margin-bottom: 1rem; }
.testimonial-name { font-weight: 700; color: var(--primary-color); }

/* Support Section */
.support-section { background-color: var(--white-color); }
.features-container { display: flex; justify-content: center; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.feature {
    background: var(--white-color); border-radius: 10px; max-width: 350px; text-align: center;
    padding: 2.5rem; border: 1px solid #e0e0e0;
}
.feature-icon {
    width: 60px; height: 60px; margin: 0 auto 1.5rem auto;
    background: var(--primary-color); border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
}
.feature-icon svg { width: 28px; height: 28px; fill: var(--white-color); }
.feature h3 { color: var(--primary-color); margin-top: 0; font-size: 1.5rem; }

/* Footer & Floating Button */
footer { text-align: center; padding: 2.5rem; background: var(--primary-color); color: var(--white-color); }
.floating-whatsapp {
    position: fixed; width: 60px; height: 60px; bottom: 30px;
    background-color: var(--whatsapp-green); color: var(--white-color);
    border-radius: 50px; text-align: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: all 0.3s ease;
}
.floating-whatsapp:hover { transform: scale(1.1); background-color: #128C7E; }

/* RTL/LTR Styles */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-links li { margin-left: 0; margin-right: 2.5rem; }
[dir="rtl"] .lang-switcher button { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .card-content, [dir="rtl"] .feature { text-align: right; }
[dir="rtl"] .process-list li::before { right: 0; left: auto; }
[dir="rtl"] .floating-whatsapp { right: auto; left: 30px; }
[dir="ltr"] .card-content, [dir="ltr"] .feature { text-align: left; }
[dir="ltr"] .floating-whatsapp { left: auto; right: 30px; }