/* =========================================
   Fonts & CSS Variables
========================================= */
@font-face {
    font-family: 'YearOfHandicrafts';
    src: url('../fonts/خط عام الحرف اليدوية 2025/TheYearofHandicrafts-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* Fallback for other weights if available */
@font-face {
    font-family: 'YearOfHandicrafts';
    src: url('../fonts/خط عام الحرف اليدوية 2025/TheYearofHandicrafts-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

:root {
    /* Fonts */
    --font-primary: 'YearOfHandicrafts', 'Inter', sans-serif;
    --font-arabic: 'YearOfHandicrafts', 'Inter', sans-serif;

    /* Light Theme Palette (Psychological & Professional) */
    --clr-bg-light: #f8fafc;
    --clr-alt-light: #ffffff;
    --clr-text-light: #0f172a;
    --clr-muted-light: #475569;
    --clr-primary-light: #0f766e; /* Deep Teal */
    --clr-primary-hover-light: #115e59;
    --clr-secondary-light: #0369a1;
    --clr-border-light: #e2e8f0;
    --clr-card-bg-light: rgba(255, 255, 255, 0.7);
    --clr-overlay-light: rgba(255, 255, 255, 0.8);

    /* Dark Theme Palette (Default) */
    --clr-bg-dark: #0f172a;
    --clr-alt-dark: #1e293b;
    --clr-text-dark: #f8fafc;
    --clr-muted-dark: #cbd5e1;
    --clr-primary-dark: #14b8a6; /* Teal */
    --clr-primary-hover-dark: #2dd4bf;
    --clr-secondary-dark: #38bdf8;
    --clr-border-dark: #334155;
    --clr-card-bg-dark: rgba(30, 41, 59, 0.7);
    --clr-overlay-dark: rgba(15, 23, 42, 0.8);

    /* Default (Dark Mode) */
    --bg: var(--clr-bg-dark);
    --alt-bg: var(--clr-alt-dark);
    --text: var(--clr-text-dark);
    --muted: var(--clr-muted-dark);
    --primary: var(--clr-primary-dark);
    --primary-hover: var(--clr-primary-hover-dark);
    --secondary: var(--clr-secondary-dark);
    --border: var(--clr-border-dark);
    --card-bg: var(--clr-card-bg-dark);
    --overlay: var(--clr-overlay-dark);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);

    /* Layout & Spacing */
    --nav-height: 60px;
    --section-pad-y: 3rem;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg: var(--clr-bg-light);
    --alt-bg: var(--clr-alt-light);
    --text: var(--clr-text-light);
    --muted: var(--clr-muted-light);
    --primary: var(--clr-primary-light);
    --primary-hover: var(--clr-primary-hover-light);
    --secondary: var(--clr-secondary-light);
    --border: var(--clr-border-light);
    --card-bg: var(--clr-card-bg-light);
    --overlay: var(--clr-overlay-light);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* =========================================
   Reset & Base Styles
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-padding {
    padding: var(--section-pad-y) 0;
}

.alt-bg {
    background-color: var(--alt-bg);
}

.section-header {
    margin-bottom: 3rem;
}

.section-header.center {
    text-align: center;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.divider.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 1.1rem;
}

/* =========================================
   Arabic Typography Utilities
========================================= */
.arabic-text {
    font-family: var(--font-arabic);
}

.arabic-text.large {
    font-size: 1.25rem;
    line-height: 1.8;
}

.arabic-text.medium {
    font-size: 1rem;
    line-height: 1.7;
}

.arabic-text.small {
    font-size: 0.85rem;
    line-height: 1.6;
}


/* =========================================
   Typography & Buttons
========================================= */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    color: var(--text);
}

.btn-primary, .btn-secondary, .btn-outline, .btn-primary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
}

[data-theme="light"] .btn-primary {
    color: #fff;
}

[data-theme="dark"] .btn-primary {
    color: #0f172a;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-primary-small {
    background-color: var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

[data-theme="dark"] .btn-primary-small {
    color: #0f172a;
}
[data-theme="light"] .btn-primary-small {
    color: #ffffff;
}

.btn-primary-small:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--alt-bg);
    border-color: var(--primary);
}

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

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

[data-theme="dark"] .btn-outline:hover {
    color: #0f172a;
}
[data-theme="light"] .btn-outline:hover {
    color: #fff;
}


/* =========================================
   Navigation
========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: var(--card-bg);
    z-index: -1;
}

.nav-container {
    width: 95%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.logo-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auth-btn-nav {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

.nav-links {
    display: none; /* Mobile first */
}

.nav-actions {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 0.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#theme-toggle:hover {
    color: var(--primary);
}

#theme-icon-light { display: none; }
#theme-icon-dark { display: block; }

[data-theme="light"] #theme-icon-light { display: block; }
[data-theme="light"] #theme-icon-dark { display: none; }

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 16px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-link {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem;
    text-align: center;
}

.btn-primary-mobile {
    background-color: var(--primary);
    border-radius: var(--border-radius-sm);
}

[data-theme="dark"] .btn-primary-mobile {
    color: #0f172a;
}
[data-theme="light"] .btn-primary-mobile {
    color: #fff;
}

/* =========================================
   Hero Section
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) + 2rem);
    position: relative;
    overflow: hidden;
}

/* Background blob */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.15;
    filter: blur(40px);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero-text .badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero-text .subtitle {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-text .intro {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.profile-image-container {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary-hover), var(--primary));
    background-size: 300% 300%;
    padding: 8px;
    box-shadow: 0 20px 40px -10px rgba(20, 184, 166, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.booking-poster {
    max-width: 100%;
    max-height: 550px;
    object-fit: contain;
    border-radius: var(--border-radius);
    border: 2px solid rgba(20, 184, 166, 0.3);
    box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.2);
    animation: floatPoster 6s ease-in-out infinite;
    transition: var(--transition);
}

.booking-poster:hover {
    border-color: var(--primary);
}

.profile-img-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--alt-bg);
    display: none; /* hidden until src is added */
}

/* Show image if src is not empty */
.profile-img-placeholder:not([src=""]) {
    display: block;
}

/* Hide fallback if image is shown */
.profile-img-placeholder:not([src=""]) + .profile-icon-fallback {
    display: none;
}

.profile-icon-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--alt-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon-fallback i {
    font-size: 8rem;
    color: var(--muted);
}

.animate-profile {
    animation: floatProfile 6s ease-in-out infinite, gradientFrame 8s ease infinite;
}

@keyframes floatProfile {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); box-shadow: 0 30px 50px -10px rgba(20, 184, 166, 0.5); }
    100% { transform: translateY(0px); }
}

@keyframes gradientFrame {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatPoster {
    0% { transform: translateY(0px); box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.2); }
    50% { transform: translateY(-12px); box-shadow: 0 25px 45px -5px rgba(20, 184, 166, 0.4); }
    100% { transform: translateY(0px); box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.2); }
}

/* =========================================
   About Section
========================================= */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--muted);
}

.about-text strong {
    color: var(--text);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-card h4 {
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.85rem;
    color: var(--muted);
}

/* =========================================
   Expertise Section (Tabs)
========================================= */
.expertise-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.skill-card, .service-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.skill-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.skill-card .icon-wrapper {
    width: 50px;
    height: 50px;
    background-color: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.skill-card .icon-wrapper i {
    font-size: 1.5rem;
    color: var(--primary);
}

.skill-card h3 {
    margin-bottom: 1rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card ul li {
    color: var(--muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-card ul li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
}

.service-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--muted);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 45px;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 3px solid var(--bg);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.timeline-content .date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
}

/* =========================================
   Courses Section
========================================= */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.course-card {
    background: var(--alt-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.course-thumbnail {
    height: 160px;
    background: linear-gradient(45deg, var(--border), var(--alt-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.course-thumbnail i.ph-image {
    font-size: 3rem;
    color: var(--muted);
    opacity: 0.5;
}

/* Added style for actual image when added */
.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.course-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-badge {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: 0.5rem;
}

.course-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.course-info h3 small {
    color: var(--muted);
    font-weight: 400;
}

.course-info p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.subscribe-btn {
    width: 100%;
}

/* =========================================
   Booking Section
========================================= */
.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
}

.booking-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.booking-text p {
    color: var(--muted);
    margin-bottom: 2rem;
}

.booking-embed {
    height: 380px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--alt-bg);
}

.external-booking-btn {
    display: inline-flex;
    margin-top: 1rem;
}

/* =========================================
   Footer
========================================= */
.footer {
    background-color: var(--alt-bg);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1rem;
}

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

.footer-brand h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--muted);
}

.footer-links h3, .footer-contact h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--muted);
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border: 1px solid var(--border);
}

.social-links a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .social-links a:hover {
    color: #0f172a;
}
[data-theme="light"] .social-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

/* =========================================
   Modal
========================================= */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text);
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.subscription-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    background-color: var(--alt-bg);
    color: var(--text);
}

.subscription-form input:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========================================
   Animations (Scroll Reveal)
========================================= */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.fade-up {
    transform: translateY(30px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Media Queries (Desktop First... Wait, no! Mobile First above, overriding for larger screens here)
========================================= */

@media (min-width: 768px) {
    :root {
        --section-pad-y: 4rem;
        --nav-height: 70px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-container {
        width: 90%;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .auth-btn-nav {
        padding: 0.5rem 1.2rem;
        font-size: 1rem;
    }

    .nav-actions {
        flex: 0 1 auto;
        justify-content: flex-end;
        gap: 1.5rem;
        margin-left: 0;
    }

    #theme-toggle {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text .subtitle {
        font-size: 1.2rem;
    }

    .hero-text .intro {
        font-size: 1.1rem;
    }

    .profile-image-container {
        width: 300px;
        height: 300px;
    }

    .stat-card i {
        font-size: 2rem;
    }

    .service-card i {
        font-size: 2.5rem;
    }

    .course-thumbnail {
        height: 200px;
    }

    .course-thumbnail i.ph-image {
        font-size: 4rem;
    }

    .booking-embed {
        height: 500px;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hero-text {
        flex: 1;
        padding-right: 2rem;
    }

    .hero-cta {
        flex-direction: row;
    }

    .hero-visual {
        flex: 1;
    }

    .about-grid {
        flex-direction: row;
        align-items: center;
    }

    .about-text {
        flex: 3;
        padding-right: 2rem;
    }

    .about-stats {
        flex: 2;
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking-wrapper {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .footer-top {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .hamburger {
        display: none;
    }

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

    .nav-links a {
        font-weight: 500;
        font-size: 0.95rem;
    }

    .nav-links a:hover:not(.btn-primary-small) {
        color: var(--primary);
    }

    .hero::before {
        width: 500px;
        height: 500px;
        top: 10%;
        right: 0;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .grid-3 {
        grid-template-columns: repeat(4, 1fr);
    }

    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   Toast Notifications
========================================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--alt-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success i { color: var(--primary); }
.toast.success { border-left: 4px solid var(--primary); }
.toast.error i { color: #ef4444; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info i { color: #3b82f6; }
.toast.info { border-left: 4px solid #3b82f6; }

/* =========================================
   Modern Section Dividers
========================================= */
.modern-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(99%);
    z-index: 10;
}

.modern-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

.modern-divider .shape-fill {
    fill: var(--alt-bg);
}

.alt-bg + .modern-divider .shape-fill {
    fill: var(--bg);
}

@media (min-width: 768px) {
    .modern-divider svg {
        height: 60px;
    }
}

/* =========================================
   Mobile UI Optimizations
========================================= */
@media (max-width: 767px) {
    .btn-primary, .btn-secondary, .btn-outline {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .section-padding {
        padding: 3rem 1rem;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-text .subtitle {
        font-size: 1.1rem;
    }
    .hero-cta {
        width: 100%;
    }
    .profile-image-container {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
}

/* =========================================
   Footer Utilities
========================================= */
.footer-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.75;
    transition: opacity 0.2s, color 0.2s;
}
.footer-link:hover { opacity: 1; color: var(--primary); }

.footer-social-btn {
    width: 36px;
    height: 36px;
    background: var(--alt-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}
.footer-social-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(20,184,166,0.08); }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr !important; }
}

/* Mobile Menu Icons */
.mobile-link { font-size: 0.95rem; font-weight: 500; padding: 0.6rem 1.25rem; display: flex; align-items: center; gap: 0.6rem; border-radius: 8px; transition: background 0.15s, color 0.15s; text-align: left; }
.mobile-link:hover { background: rgba(20,184,166,0.08); color: var(--primary); }
.mobile-link i { font-size: 1.05rem; color: var(--primary); }

/* Legal Pages */
.legal-page { padding-top: calc(var(--nav-height) + 3rem); min-height: 100vh; padding-bottom: 5rem; }
.legal-hero { background: linear-gradient(135deg, rgba(20,184,166,0.07) 0%, transparent 60%); border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem; margin-bottom: 3rem; }
.legal-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.legal-hero p { color: var(--muted); }
.legal-content h2 { font-size: 1.1rem; color: var(--text); margin: 2.5rem 0 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.legal-content h2 i { color: var(--primary); font-size: 1rem; }
.legal-content p, .legal-content li { color: var(--muted); line-height: 1.8; font-size: 0.95rem; }
.legal-content ul { padding-left: 1.5rem; list-style: disc; }
.legal-content ul li { margin-bottom: 0.4rem; }
.legal-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(20,184,166,0.1); color: var(--primary); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; margin-bottom: 1rem; }
