/* =========================================
   TASHAFI (تشافي) - DESIGN SYSTEM
   Premium, Minimal, Arabic RTL
========================================= */

@font-face {
    font-family: 'TheYearofTheCamel';
    src: url('../fonts/TheYearofTheCamel-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'TheYearofTheCamel';
    src: url('../fonts/TheYearofTheCamel-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'TheYearofTheCamel';
    src: url('../fonts/TheYearofTheCamel-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TheYearofTheCamel';
    src: url('../fonts/TheYearofTheCamel-ExtraBold.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

:root {
    /* Color Palette - Light Mode - Healing & Professional */
    --primary-color: #2C4C3B; /* Deep Sage Green */
    --primary-light: #3D6B53;
    --secondary-color: #E8EDE9; /* Light Sage / Cool Grey-Green */
    --accent-color: #C28F5B; /* Earthy Warm Clay/Gold */
    --accent-hover: #D89F65;
    --text-main: #1A2B22; /* Forest Green tint for softer text */
    --text-muted: #5C7065;
    --bg-main: #F4F7F5; /* Very soft sage-white */
    --bg-card: #FFFFFF;
    --border-color: #E1E8E3;
    
    --shadow-sm: 0 2px 8px rgba(44, 76, 59, 0.05);
    --shadow-md: 0 8px 24px rgba(44, 76, 59, 0.08);
    --shadow-lg: 0 16px 32px rgba(44, 76, 59, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html[data-theme="dark"] {
    /* Color Palette - Dark Mode - Deep Forest */
    --primary-color: #518A6D;
    --primary-light: #62A382;
    --secondary-color: #1A241E; /* Dark Card Bg */
    --accent-color: #D3A575;
    --accent-hover: #E6B685;
    --text-main: #E8EBE9;
    --text-muted: #9AA8A0;
    --bg-main: #121A16; /* Very dark green-black */
    --bg-card: #1C2620;
    --border-color: #2A3830;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* =========================================
   RESET & BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
    font-size: 15px; /* ZOOM OUT: Scale down rem units */
}

@media (max-width: 768px) {
    html {
        font-size: 14px; /* ZOOM OUT further on mobile */
    }
}

body {
    font-family: 'TheYearofTheCamel', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   ANIMATIONS (Fade In & Logo)
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Logo Float Animation */
@keyframes floatLogo {
    0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05)); }
    50% { transform: translateY(-15px) scale(1.02); filter: drop-shadow(0 20px 25px rgba(0,0,0,0.1)); }
    100% { transform: translateY(0px) scale(1); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05)); }
}

.hero-logo-anim {
    max-width: 85%;
    height: auto;
    animation: floatLogo 6s ease-in-out infinite;
    display: block;
    margin: 0 auto;
}

.nav-logo {
    height: 75px; /* Enlarged as requested */
    width: auto;
    object-fit: contain;
}

.footer-logo-img {
    height: 70px; /* Adjust as needed */
    width: auto;
    object-fit: contain;
}

/* =========================================
   TYPOGRAPHY
========================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.8rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: bold; text-align: center; margin-bottom: 3rem; position: relative; }
h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 50px;
}
h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; color: var(--text-muted); font-size: 1.1rem; }

/* =========================================
   COMPONENTS
========================================= */
.container {
    width: 100%;
    max-width: 1140px; /* Reduced for better proportion */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2.2rem; /* Scaled down padding */
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    outline: none;
    position: relative;
    z-index: 1;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(44, 76, 59, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 76, 59, 0.3);
    color: #fff;
}

.btn-accent {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(194, 143, 91, 0.2);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194, 143, 91, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(244, 247, 245, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

html[data-theme="dark"] header {
    background-color: rgba(18, 26, 22, 0.9);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px; /* Slightly taller to fit larger logo */
}

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--primary-color); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 85px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-main) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Sections */
section {
    padding: 5rem 0; /* Zoomed out padding */
    position: relative;
}

.section-bg {
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.8rem; /* Scaled down padding */
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.card:hover .card-icon {
    transform: scale(1.1);
    color: var(--primary-color);
}

.course-card, .consultant-card {
    padding: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-img-top {
    height: 200px;
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body p { flex: 1; }

.price {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 1.2rem 0;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: rgba(194, 143, 91, 0.15);
    color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Booking Section */
.booking-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(194, 143, 91, 0.15);
}

/* Footer */
footer {
    background-color: #16261E; /* Deep Sage Forest */
    color: #E8EDE9;
    padding: 5rem 0 2rem;
    border-top: 4px solid var(--accent-color);
}

html[data-theme="dark"] footer {
    background-color: #0A120E;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

footer h3 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

footer p {
    color: #9AA8A0;
    line-height: 1.7;
}

.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: #9AA8A0; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-color); transform: translateX(-5px); display: inline-block; }

.newsletter-form { display: flex; margin-top: 1.2rem; }
.newsletter-form input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 0.8rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    width: 100%;
    outline: none;
    font-family: inherit;
}
.newsletter-form button {
    background: var(--accent-color);
    color: #16261E;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
}

.social-icons { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    transition: var(--transition);
}
.social-icons a:hover {
    background-color: var(--accent-color);
    color: #16261E;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    nav { height: 80px; }
    .nav-links { display: none; }
    .hero { flex-direction: column; text-align: center; padding-top: 100px; }
    .hero-content { margin-bottom: 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-logo-anim { max-width: 90%; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    section { padding: 4rem 0; }
}
