/* static/css/style.css */

/* Font Faces (Ensure paths are correct relative to your static setup) */
@font-face {
    font-family: "SomarRounded";
    src: url("../fonts/SomarRoundedRegular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SomarRounded";
    src: url("../fonts/SomarRoundedBold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DG-Trika";
    src: url("../fonts/DGTrikaRegular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DG-Trika";
    src: url("../fonts/DGTrikaBold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --main-color: #0078ff;
    --second-main-color: #002157;
    --third-main-color: #eef5ff;
    --light-color: #ffffff;
    --sub-color: #3ccf4e;
    --card-bg-color: #ffffff;
    --card-title-color: #0078ff;
    --description-color: #555;
    --second-description-color: #888;
    --black-color: #222;
    --light-black-color: rgba(34, 34, 34, 0.85);
    --white-color: #ffffff;
    --main-color-rgb: 0, 120, 255;
    --sub-color-rgb: 60, 207, 78;
    --second-main-color-rgb: 0, 33, 87;
    --section-padding: 6rem 0;
    --border-radius: 15px;
    --box-shadow-light: 0 5px 15px rgba(0, 0, 0, 0.05);
    --box-shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-dark: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
body {
    font-family: "SomarRounded", sans-serif;
    color: var(--description-color);
    background-color: #f9fafb;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "DG-Trika", sans-serif;
    color: var(--second-main-color);
    font-weight: 700; /* Adjust as needed */
}

p,
span,
strong,
label,
a,
button,
li {
    font-family: "SomarRounded", "DG-Trika", sans-serif;
}

/* Display classes override (adjust as needed) */
.display-1 {
    font-size: 4.5rem;
    line-height: 1.1;
}
.display-2 {
    font-size: 4rem;
    line-height: 1.15;
}
.display-3 {
    font-size: 3.5rem;
    line-height: 1.2;
}
.display-4 {
    font-size: 3rem;
    line-height: 1.25;
}
.display-5 {
    font-size: 2.5rem;
    line-height: 1.3;
}
.display-6 {
    font-size: 1.75rem;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .display-1 {
        font-size: 3.5rem;
    }
    .display-2 {
        font-size: 3rem;
    }
    .display-3 {
        font-size: 2.8rem;
    }
    .display-4 {
        font-size: 2.5rem;
    }
    .display-5 {
        font-size: 2rem;
    }
    .display-6 {
        font-size: 1.5rem;
    }
}
@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem;
    }
    .display-2 {
        font-size: 2.5rem;
    }
}

img,
svg {
    vertical-align: middle;
    max-width: 100%; /* Basic responsiveness */
    height: auto;
}

/* Text & Background Utilities */
.text-primary {
    color: var(--main-color) !important;
}
.text-secondary {
    color: var(--second-main-color) !important;
}
.text-accent {
    color: var(--sub-color) !important;
}
.text-light-emphasis {
    color: rgba(var(--bs-light-rgb), 0.75) !important;
}
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.bg-primary {
    background-color: var(--main-color) !important;
}
.bg-secondary {
    background-color: var(--second-main-color) !important;
}
.bg-accent {
    background-color: var(--sub-color) !important;
}
.bg-light-subtle {
    background-color: var(--third-main-color) !important;
}

.text-gradient {
    background: linear-gradient(45deg, var(--main-color), var(--sub-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent; /* Standard property */
}

/* Button Styles */
.btn {
    font-family: "SomarRounded", sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-transform: none; /* Or uppercase if desired */
    box-shadow: var(--box-shadow-light);
    border: none; /* Assuming solid buttons don't need borders initially */
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--main-color-rgb), 0.2);
}
.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--main-color-rgb), 0.5); /* Focus indicator */
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.btn-primary {
    background-color: var(--main-color) !important;
    /* border-color: var(--main-color) !important; */
    color: var(--white-color) !important;
}
.btn-primary:hover {
    background-color: var(--sub-color) !important;
    /* border-color: var(--sub-color) !important; */
    color: var(--white-color) !important;
}
.btn-outline-primary {
    color: var(--light-color) !important;
    border-color: var(--main-color) !important;
    background-color: var(--sub-color) !important;
}
.btn-outline-primary:hover {
    background-color: var(--main-color) !important;
    color: var(--white-color) !important;
    border-color: var(--main-color) !important;
}
.btn-secondary {
    background-color: var(--second-main-color) !important;
    /* border-color: var(--second-main-color) !important; */
    color: var(--white-color) !important;
}
.btn-secondary:hover {
    background-color: var(--sub-color) !important;
    /* border-color: var(--sub-color) !important; */
    color: var(--white-color) !important;
}
.btn-accent {
    background-color: var(--sub-color) !important;
    /* border-color: var(--sub-color) !important; */
    color: var(--white-color) !important;
}
.btn-accent:hover {
    background-color: var(--main-color) !important;
    /* border-color: var(--main-color) !important; */
    color: var(--white-color) !important;
}
.btn-floating {
    width: 45px;
    height: 45px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1; /* Prevent text line-height issues */
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgb(180 32 32 / 0%);
    padding: 1.1rem 1.5rem;
    transition: padding 0.3s ease, background-color 0.3s ease;
}

.navbar-brand img {
    height: 72px;
    transition: height 0.3s ease;
}

.navbar-nav .nav-link {
    color: var(--white-color);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.5rem 1.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--main-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: var(--second-main-color);
}

.dropdown-item:hover {
    background-color: var(--main-color);
    color: white;
}

.lang-switcher {
    display: inline-flex;
    border: 2px solid var(--white-color);
    border-radius: 20px;
    overflow: hidden;
}

.lang-btn {
    border: none;
    background-color: transparent;
    color: var(--white-color);
    cursor: pointer;
    padding: 0.3rem 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background-color: var(--white-color);
    color: var(--main-color);
}

.lang-btn:hover {
    background-color: var(--white-color);
    color: var(--main-color);
}

/* ── Light / Scrolled Navbar State ─────────────────────── */
.navbar-light {
    padding: 0.6rem 1.5rem;
}

.navbar-light .navbar-brand img {
    height: 56px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--second-main-color);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--main-color);
}

.navbar-light .lang-switcher {
    border: 2px solid var(--main-color);
}

.navbar-light .lang-btn {
    color: var(--main-color);
}

.navbar-light .lang-btn.active {
    background-color: var(--main-color);
    color: var(--white-color);
}

.navbar-light .lang-btn:hover {
    background-color: var(--main-color);
    color: var(--white-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white-color);
    overflow: hidden;
    box-sizing: border-box;
    padding: 110px 0 60px;
    background-color: #0a1626;
    /* NOTE: no z-index here on purpose. A stacking context on .hero-section
       would trap the fixed-top navbar inside it, letting later positioned
       sections paint above the navbar while scrolling. */
}
.hero-section::before {
    /* Background overlay */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to bottom, rgba(8, 15, 28, 0.68) 0%, rgba(8, 15, 28, 0.42) 140px, rgba(0, 33, 87, 0.34) 55%, rgba(8, 15, 28, 0.62) 100%),
        var(--home-hero-bg, url("../imgs/hero/quran-learning-hero-default-v2.png"));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: 0;
}

/* Subtle background glowing radial light */
.hero-section::after {
    content: "";
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(var(--main-color-rgb), 0.2) 0%, rgba(var(--sub-color-rgb), 0.1) 50%, transparent 100%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    z-index: 2;
    position: relative;
}

/* Enrollment Badge */
.hero-enroll-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white-color);
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out forwards;
}
.hero-enroll-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--sub-color); /* Green pulse dot */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(60, 207, 78, 0.7);
    animation: pulseGlow 2s infinite;
}

.hero-text-col {
    animation: fadeInUp 1s ease-out forwards;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white-color);
    line-height: 1.15;
    /* Clean geometric sans (Poppins), as before — DG-Trika stays for other headings. */
    font-family: "Poppins", "SomarRounded", "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}
.hero-title .text-gradient-highlight {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--sub-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* Bullet list of key features */
.hero-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: fit-content;
}
.hero-benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}
.hero-benefits-list li i {
    color: var(--sub-color); /* green check */
    background: rgba(var(--sub-color-rgb), 0.15);
    padding: 0.25rem;
    border-radius: 50%;
    font-size: 0.95rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* Glowing Primary Button */
.hero-btn-primary {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--sub-color) 100%) !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(var(--main-color-rgb), 0.4) !important;
    color: white !important;
    font-weight: 700;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(var(--main-color-rgb), 0.6) !important;
    background: linear-gradient(135deg, var(--sub-color) 0%, var(--main-color) 100%) !important;
}

/* Secondary Button */
.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    font-weight: 600;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px);
}

/* Rating Proof Widget */
.hero-rating-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeInUp 1.2s ease-out forwards;
}
.hero-rating-proof .rating-stars {
    color: #ffb800; /* gold */
    font-size: 1.1rem;
    display: flex;
    gap: 0.2rem;
}
.hero-rating-proof .rating-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* Right Side Visual Column */
.hero-visual-col {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

/* Interactive Classroom Mockup Frame */
.classroom-mockup-frame {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.25rem;
    width: 100%;
    max-width: 520px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: floatFrame 6s ease-in-out infinite;
}

/* Mock Video Stream Area */
.mockup-video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.video-stream-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}
.video-stream-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-stream-item .stream-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: var(--second-main-color);
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.floating-badge i {
    color: var(--main-color);
    font-size: 1.1rem;
}
.floating-badge.badge-top-left {
    top: -20px;
    left: -30px;
    animation: floatBadge1 5s ease-in-out infinite;
}
.floating-badge.badge-bottom-right {
    bottom: -15px;
    right: -25px;
    animation: floatBadge2 5.5s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(60, 207, 78, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(60, 207, 78, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(60, 207, 78, 0);
    }
}
@keyframes floatFrame {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes floatBadge1 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-5px, -8px); }
    100% { transform: translate(0, 0); }
}
@keyframes floatBadge2 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(6px, 8px); }
    100% { transform: translate(0, 0); }
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.2rem;
    }
}
@media (max-width: 991px) {
    .hero-section {
        padding: 90px 0 60px;
        text-align: center;
    }
    .hero-enroll-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-description {
        font-size: 1.15rem;
    }
    .hero-benefits-list {
        margin-left: auto;
        margin-right: auto;
        align-items: flex-start;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-rating-proof {
        justify-content: center;
    }
    .hero-visual-col {
        margin-top: 0.75rem;
        margin-bottom: 3rem;
        width: 100%;
    }
}
@media (max-width: 768px) {
    .floating-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 12px;
    }
    .floating-badge.badge-top-left {
        top: -10px;
        left: -10px;
    }
    .floating-badge.badge-bottom-right {
        bottom: -10px;
        right: -10px;
    }
    .classroom-mockup-frame {
        border-radius: 20px;
        padding: 1rem;
    }
}
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-btn-primary, .hero-btn-secondary {
        width: 100%;
        text-align: center;
    }
    .floating-badge.badge-top-left {
        left: 5px;
        top: -15px;
    }
    .floating-badge.badge-bottom-right {
        right: 5px;
        bottom: -15px;
    }
    .classroom-mockup-frame {
        border-radius: 16px;
        padding: 0.75rem;
        max-width: 380px;
        margin: 0 auto;
    }
}

/* General Section Styling */
section {
    padding: var(--section-padding);
}
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}
.section-heading .display-5,
.section-heading .display-4 {
    /* Match heading levels */
    color: var(--second-main-color);
    margin-bottom: 0.75rem;
}
.section-heading .lead {
    color: var(--description-color);
    max-width: 650px; /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.6;
}
.form-header {
    /* Consistent Header Style */
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}
.form-header .header-title {
    color: var(--main-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: "DG-Trika", sans-serif;
}
.form-header::after {
    /* Underline */
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--sub-color);
    border-radius: 2px;
}
.form-header.text-start::after {
    /* Adjust for left-aligned header */
    left: 0;
    transform: translateX(0);
}

/* Features Section */
.features-section {
    background: linear-gradient(
        to bottom,
        rgba(var(--main-color-rgb), 0.03),
        transparent
    );
}
.feature-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    transition: all 0.3s ease;
    overflow: hidden; /* Prevent icon overflow */
    height: 100%; /* Ensure cards in a row have same height */
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-medium);
}
.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        45deg,
        rgba(var(--main-color-rgb), 0.1),
        rgba(var(--sub-color-rgb), 0.1)
    );
    margin-bottom: 1.5rem;
    flex-shrink: 0; /* Prevent shrinking */
}
.feature-icon-wrapper i {
    font-size: 1.8rem;
    color: var(--main-color);
}
.feature-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem; /* Adjust padding */
}
.feature-card h4 {
    color: var(--second-main-color);
    font-size: 1.25rem;
    font-weight: 600; /* Slightly less bold */
}
.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Who We Are Section */
.who-we-are-section {
    background-color: var(--white-color);
}
.who-we-are-section img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-medium);
}
.who-we-are-section h2 {
    margin-bottom: 1.5rem;
}
.who-we-are-section .lead {
    font-size: 1.2rem;
    color: var(--description-color);
    margin-bottom: 1.5rem;
}
.who-we-are-section p:not(.lead) {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Video Section */
.video-section {
    background: var(--third-main-color);
}
.video-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-medium);
    aspect-ratio: 16/9; /* Maintain aspect ratio */
    background-color: #eee; /* Placeholder background */
}
.video-container img,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#play-pause-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
    z-index: 5; /* Above cover image */
}
#play-pause-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--main-color);
}
#play-pause-button:hover #play-icon {
    color: var(--white-color);
}
#play-icon {
    font-size: 2rem;
    color: var(--main-color);
    transition: color 0.3s ease;
    line-height: 1; /* Ensure icon centered */
}
.video-text-content h2 {
    color: var(--second-main-color);
}
.video-text-content .lead {
    color: var(--description-color);
    font-size: 1.15rem;
}
.video-text-content .fa-check-circle {
    color: var(--main-color);
    flex-shrink: 0; /* Prevent shrinking */
}
.video-text-content p {
    line-height: 1.6;
}

/* Chat Section */
.chat-section {
    background: linear-gradient(
        135deg,
        rgba(var(--main-color-rgb), 0.9),
        rgba(var(--sub-color-rgb), 0.85)
    );
    background-size: cover;
    background-position: center;
    color: var(--white-color);
}
.chat-section h2 {
    color: var(--white-color);
}
.chat-section .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
}
#homeChatButton {
    background-color: var(--white-color) !important;
    color: var(--main-color) !important;
    border: none !important;
    font-weight: 700;
}
#homeChatButton:hover {
    background-color: var(--third-main-color) !important;
    color: var(--second-main-color) !important;
    transform: translateY(-3px); /* Consistent hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
#homeLastRoomContainer .card {
    background-color: rgba(255, 255, 255, 0.98); /* Slightly transparent */
    color: var(--black-color);
    border: none;
    box-shadow: var(--box-shadow-light);
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: calc(
        var(--border-radius) * 0.75
    ); /* Slightly smaller radius */
}
#homeLastRoomContainer .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-medium);
}
#homeLastRoomContainer h6 {
    color: var(--main-color);
    font-weight: 600;
}
#homeLastRoomContainer p {
    color: var(--description-color);
}
#homeJoinLastRoomBtn {
    border-color: var(--main-color);
    color: var(--main-color);
    font-weight: 600;
}
#homeJoinLastRoomBtn:hover {
    background-color: var(--main-color);
    color: var(--white-color);
}
.chat-section img {
    max-height: 450px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Stats Section */
.stats-section {
    background-color: #f0f2f5; /* Slightly different light background */
}
.stat-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    transition: all 0.3s ease;
    padding: 2rem 1.5rem; /* Adjust padding */
    height: 100%; /* Equal height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-medium);
}
.stat-card h3 {
    color: var(--main-color);
    margin-bottom: 0.5rem;
    font-weight: 700; /* Ensure boldness */
}
.stat-card p {
    color: var(--second-description-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Teachers Section */
.teachers-section-container {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

.teachers-section {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-medium);
    padding: 3rem;
}

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

/* Slider Container and Controls */
.teacher-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide overflow */
}

.teacher-slider {
    display: flex;
    transition: transform 0.4s ease;
    width: 100%;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.slider-item {
    min-width: 280px;
    max-width: 280px;
    flex: 0 0 auto;
}

/* Teacher Cards */
.teacher-card {
    border: 1px solid rgba(var(--main-color-rgb), 0.12);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 75px;
}

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

.teacher-image-container {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    z-index: 1;
}

.teacher-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 5px solid var(--white-color);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.teacher-card .card-body {
    padding: 1.5rem 1rem 1rem;
    flex-grow: 1;
    text-align: center;
}

.teacher-card h5 {
    color: var(--second-main-color);
    margin-bottom: 0.25rem;
}

.teacher-card .text-primary {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.teacher-card .text-muted {
    font-size: 0.9rem;
    line-height: 1.5;
}

.teacher-card .card-footer {
    background-color: transparent;
    border-top: 1px solid #eee;
    padding: 1rem;
    text-align: center;
}

/* Navigation Controls */
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.slider-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contact Section */
.contact-section {
    /* padding: 4rem 0; */ /* Handled by section wrapper */
}
.contact-card {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-medium);
    overflow: hidden;
    background-color: var(--white-color);
}
.contact-info-col {
    background: linear-gradient(135deg, var(--main-color), var(--sub-color));
    color: var(--white-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0; /* Default LTR */
    padding: 3rem;
}
.contact-info-col h3 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.contact-info-col p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
}
.contact-info-col i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.contact-info-col a {
    color: var(--white-color);
    text-decoration: none; /* Remove underline by default */
    border-bottom: 1px solid rgba(255, 255, 255, 0.5); /* Subtle underline */
    transition: border-bottom-color 0.3s ease;
}
.contact-info-col a:hover {
    border-bottom-color: var(--white-color); /* Stronger underline on hover */
}
.contact-info-col img {
    max-width: 250px;
    opacity: 0.8;
    margin-left: auto;
    margin-right: auto;
    display: block; /* Center image properly */
}
.contact-form-col {
    padding: 3rem;
}
.contact-form-col .form-header {
    text-align: left;
} /* Align form header left */
.contact-form-col .form-header::after {
    left: 0;
    transform: none;
} /* Adjust underline */

.form-floating > .form-control {
    min-height: calc(3.5rem + 2px); /* MDB default height */
    line-height: 1.25;
}
.form-floating > label {
    padding: 1rem 0.75rem; /* MDB default padding */
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--main-color);
}
.form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--main-color-rgb), 0.25);
}
.form-label {
    color: var(--second-description-color);
}
textarea.form-control {
    min-height: 150px; /* Ensure textarea height */
}
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545; /* Bootstrap default invalid color */
}
.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Footer */
.bg-footer {
    background-color: var(--second-main-color);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 4rem;
    padding-bottom: 1rem;
}
.footer-brand img {
    height: 70px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1); /* Make logo white */
    opacity: 0.9;
}
.bg-footer h5 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase; /* Style preference */
    letter-spacing: 0.5px;
}
.bg-footer p,
.bg-footer div,
.bg-footer li {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
}
.bg-footer .fw-bold {
    color: rgba(255, 255, 255, 0.9);
}
.bg-footer a {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
    text-decoration: none;
}
.bg-footer a:hover {
    color: var(--main-color);
}
.footer-links li {
    margin-bottom: 0.75rem;
}
.footer-links a::before {
    /* Optional marker */
    /* content: '\f054'; Angle right */
    /* font-family: 'Font Awesome 6 Free'; */
    /* font-weight: 900; */
    /* margin-right: 8px; */
    /* font-size: 0.8em; */
    /* color: var(--main-color); */
}
.footer-contact-info li {
    margin-bottom: 0.75rem;
}
.footer-contact-info i {
    margin-right: 0.75rem;
    color: var(--main-color);
    width: 20px; /* Align icons */
    text-align: center;
    flex-shrink: 0;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    font-size: 1.1rem;
    margin-right: 0.5rem;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.2s ease;
}
.social-icons a:hover {
    background-color: var(--main-color);
    color: var(--white-color);
    transform: scale(1.1);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ══════════════════════════════════════════════════════════════
   Floating Contact Action Stack (Unified, Organized & Professional)
   ══════════════════════════════════════════════════════════════ */
.floating-contact-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    /* Below the fixed navbar (1030) so page sections and widgets never cover
       navigation; toasts (1080) stay on top. */
    z-index: 1025;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

[dir="rtl"] .floating-contact-stack {
    right: auto;
    left: 24px;
    align-items: flex-start;
}

/* Base floating button */
.floating-contact-btn {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border-radius: 50px;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, background 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.floating-contact-btn:hover {
    transform: translateY(-4px) scale(1.04);
    text-decoration: none !important;
}

.floating-contact-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Tooltip on hover */
.floating-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(18, 24, 38, 0.92);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[dir="rtl"] .floating-tooltip {
    right: auto;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-6px);
}

.floating-contact-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* WhatsApp circular button */
.floating-whatsapp {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.floating-whatsapp i {
    font-size: 27px;
}

.floating-whatsapp:hover {
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    background: linear-gradient(135deg, #2ae26d 0%, #159c8d 100%);
    color: #fff !important;
}

/* Telegram circular button */
.floating-telegram {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.floating-telegram i {
    font-size: 24px;
    margin-right: 2px;
}

.floating-telegram:hover {
    box-shadow: 0 8px 24px rgba(34, 158, 217, 0.45);
    background: linear-gradient(135deg, #38b6f7 0%, #26a9e6 100%);
    color: #fff !important;
}

/* Live Chat Pill button */
.floating-livechat {
    gap: 10px;
    padding: 10px 18px 10px 12px;
    background: linear-gradient(135deg, var(--sub-color, #f39c12), var(--main-color, #2b5876));
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-height: 52px;
}

.floating-livechat:hover {
    box-shadow: 0 10px 28px rgba(var(--main-color-rgb, 43, 88, 118), 0.4);
    background: linear-gradient(135deg, var(--main-color, #2b5876), var(--sub-color, #f39c12));
    color: #fff !important;
}

.floating-chat-icon-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    flex-shrink: 0;
}

.floating-chat-ping {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid #fff;
    animation: chat-ping-pulse 1.8s ease-in-out infinite;
}

[dir="rtl"] .floating-chat-ping {
    right: auto;
    left: -2px;
}

@keyframes chat-ping-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.floating-chat-label {
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Helper Classes */
.hover-shadow {
    transition: all 0.3s ease;
}
.hover-shadow:hover {
    box-shadow: var(--box-shadow-medium); /* Use variable */
    transform: translateY(-5px);
}

/* RTL Adjustments */
body[dir="rtl"] {
    /* General text alignment */
    text-align: right;
}
body[dir="rtl"] .navbar-nav {
    margin-right: auto;
    margin-left: 0 !important;
}
body[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}
body[dir="rtl"] .ms-md-5 {
    margin-right: 3rem !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .ps-lg-4 {
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
}
body[dir="rtl"] .pe-lg-4 {
    padding-left: 1.5rem !important;
    padding-right: 0 !important;
}
body[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}
body[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .order-lg-1 {
    order: 2 !important;
} /* Swap order */
body[dir="rtl"] .order-lg-2 {
    order: 1 !important;
} /* Swap order */
body[dir="rtl"] .fa-chevron-left::before {
    content: "\f054";
} /* Swap arrows */
body[dir="rtl"] .fa-chevron-right::before {
    content: "\f053";
} /* Swap arrows */
body[dir="rtl"] .contact-info-col {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}
body[dir="rtl"] .contact-info-col i {
    margin-left: 12px;
    margin-right: 0;
}
body[dir="rtl"] .social-icons a {
    margin-left: 0.5rem;
    margin-right: 0;
}
body[dir="rtl"] .form-header.text-start {
    text-align: right !important;
} /* Adjust form header */
body[dir="rtl"] .form-header.text-start::after {
    right: 0;
    left: auto;
    transform: none;
}
body[dir="rtl"] .form-floating > label {
    right: 0;
    left: auto;
    transform-origin: 100% 0;
} /* Adjust floating label */
body[dir="rtl"] .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
} /* Adjust dropdown */
body[dir="rtl"] .dropdown-menu {
    text-align: right;
} /* Align dropdown text */
body[dir="rtl"] .navbar .nav-link::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
} /* Adjust underline */
body[dir="rtl"] .footer-contact-info i {
    margin-left: 0.75rem;
    margin-right: 0;
}
body[dir="rtl"] .footer-links a::before {
    margin-left: 8px;
    margin-right: 0;
    content: "\f053";
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        padding: 1.5rem;
        margin-top: 0.75rem;
        border-radius: 24px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    /* Default / Transparent Navbar Collapsed Card (navbar-dark) */
    .navbar.navbar-dark .navbar-collapse {
        background: rgba(0, 33, 87, 0.96); /* Deep navy glassmorphism */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1.5px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    }
    
    /* Scrolled / Light Navbar Collapsed Card (navbar-light) */
    .navbar.navbar-light .navbar-collapse {
        background: rgba(255, 255, 255, 0.98); /* White glassmorphism */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1.5px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    }

    .navbar .navbar-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .navbar .navbar-nav .nav-item {
        width: 100%;
        text-align: center;
    }

    .navbar .navbar-nav .nav-link {
        font-size: 1.15rem;
        font-weight: 600;
        padding: 0.6rem 0;
        display: inline-block;
        transition: all 0.2s ease;
    }

    /* Link Colors on Dark (Default) Navbar */
    .navbar.navbar-dark .navbar-collapse .nav-link {
        color: rgba(255, 255, 255, 0.85);
    }
    .navbar.navbar-dark .navbar-collapse .nav-link:hover,
    .navbar.navbar-dark .navbar-collapse .nav-link.active {
        color: var(--sub-color) !important; /* Premium green highlight on dark background */
        transform: translateY(-1px);
    }

    /* Link Colors on Light (Scrolled) Navbar */
    .navbar.navbar-light .navbar-collapse .nav-link {
        color: var(--second-main-color);
    }
    .navbar.navbar-light .navbar-collapse .nav-link:hover,
    .navbar.navbar-light .navbar-collapse .nav-link.active {
        color: var(--main-color) !important; /* Premium blue highlight on light background */
        transform: translateY(-1px);
    }

    .navbar .navbar-collapse .nav-link::after {
        display: none;
    } /* Hide underline in collapsed */

    .navbar .dropdown-menu {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
        border-radius: 12px;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
    }
    .navbar.navbar-light .dropdown-menu {
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
    }

    .navbar .dropdown-item {
        color: var(--second-main-color) !important;
        text-align: center;
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
    .navbar.navbar-light .dropdown-item {
        color: var(--second-main-color) !important;
    }
    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus {
        background-color: var(--main-color) !important;
        color: #ffffff !important;
    }

    /* Language Switcher Centering */
    .navbar .navbar-collapse .lang-switcher {
        margin: 0.75rem auto;
        display: inline-flex;
    }

    /* Action Buttons Mobile Styling */
    .navbar .navbar-collapse .btn-rounded {
        width: 100%;
        max-width: 280px;
        margin: 0.4rem auto;
        padding: 0.7rem 2rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 50px;
        display: block;
    }
}

    .hero-section {
        min-height: 80vh;
    }
    .section-padding {
        --section-padding: 4rem 0;
    } /* Reduce padding on smaller screens */
    .contact-info-col,
    .contact-form-col {
        padding: 2rem;
    }
    body[dir="rtl"] .contact-info-col {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    } /* Adjust radius on stack */
    body:not([dir="rtl"]) .contact-info-col {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    } /* Adjust radius on stack */
}

@media (max-width: 767.98px) {
    .display-1 {
        font-size: 2.5rem;
    }
    .display-2 {
        font-size: 2.2rem;
    }
    .display-3 {
        font-size: 2rem;
    }
    .display-4 {
        font-size: 1.8rem;
    }
    .display-5 {
        font-size: 1.6rem;
    }
    .display-6 {
        font-size: 1.4rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-description {
        font-size: 1rem;
    }
    .hero-button,
    .profile-button {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    .footer-bottom {
        text-align: center;
    }
    .footer-bottom span {
        display: block;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .floating-contact-stack {
        bottom: 16px;
        right: 16px;
        gap: 10px;
    }

    [dir="rtl"] .floating-contact-stack {
        right: auto;
        left: 16px;
    }

    .floating-whatsapp,
    .floating-telegram {
        width: 48px;
        height: 48px;
    }

    .floating-whatsapp i {
        font-size: 24px;
    }

    .floating-telegram i {
        font-size: 22px;
    }

    .floating-livechat {
        padding: 8px 14px 8px 10px;
        font-size: 0.88rem;
        min-height: 48px;
    }

    .floating-chat-icon-wrap {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Tabs Navigation */
.nav-tabs .nav-link {
    font-family: "SomarRounded", sans-serif;
    font-size: 17px;
    padding: 12px;
    font-weight: bold;
    border: none;
    color: var(--main-color);
}

.nav-tabs .nav-link.active {
    color: var(--white-color);
    background-color: var(--main-color);
    border-radius: 30px;
}

.nav-tabs .nav-link:hover {
    color: var(--sub-color);
    background-color: var(--card-bg-color);
    border-radius: 30px;
}

.circle-nav {
    border-radius: 50%;
    padding: 10px 20px;
}

.course-card {
    border-radius: 10px;
    border: 1px solid rgba(var(--main-color-rgb), 0.29);
}

.course-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.course-card .description {
    color: var(--description-color);
    font-size: var(--font-size-small);
}

.course-description {
    box-shadow: 0px 0px 15px rgba(var(--main-color-rgb), 0.15);
}

/* ----------------------------student_profile------------------------------ */

/* Profile Header */
.profile-header {
    background: linear-gradient(
        135deg,
        var(--card-bg-color) 0%,
        var(--white-color) 100%
    ); /* Light gradient background */
    border-radius: 10px; /* Fully rounded corners */
    text-align: center;
    box-shadow: 0px 0px 15px rgba(var(--main-color-rgb), 0.2); /* Subtle shadow */
}

.profile-header img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%; /* Fully rounded image */
    border: 4px solid var(--main-color); /* Green border */
    margin-bottom: 15px;
}

.profile-info {
    font-size: 1rem; /* Adjusted font size */
    color: var(--description-color); /* Gray text */
}

.info-title {
    font-family: "DG-Trika", sans-serif; /* Custom font for titles */
    font-weight: bold;
    color: var(--second-main-color); /* Dark blue color */
}

/* ---------------------------------------------Register/Login ---------------------------------*/

/* Background and typography */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background-color: var(--card-bg-color); /* Light background */
    padding: 50px 0; /* Add padding for better spacing */
}

/* Container */
.form-container {
    width: 100%;
    max-width: 700px;
    padding: 40px;
    border-radius: 15px; /* Fully rounded corners */
    box-shadow: 0px 0px 15px rgba(var(--main-color-rgb), 0.2); /* Subtle shadow */
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease; /* Smooth transition */
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h3 {
    font-weight: bold;
    color: var(--second-main-color); /* Dark blue color */
}

/* Button with gradient */
.btn-gradient {
    background: var(--main-color); /* Green to orange gradient */
    border: none;
    color: var(--white-color); /* White text */
    font-family: "SomarRounded", sans-serif; /* Custom font for buttons */
    font-weight: bold;
    padding: 10px 0;
    border-radius: 10px; /* Fully rounded button */
}

.btn-gradient:hover {
    background: var(--sub-color); /* Orange to green gradient on hover */
}

/* Default profile image */
.image-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Fully rounded image */
    border: 3px solid var(--main-color); /* Green border */
    object-fit: cover;
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.image-preview:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Fancy link */
.toggle-link {
    text-align: center;
    font-family: "SomarRounded", sans-serif; /* Custom font for links */
    font-weight: bold;
    color: var(--main-color); /* Green text */
    cursor: pointer;
    font-size: 0.9rem; /* Smaller font size for links */
    transition: color 0.3s ease; /* Smooth hover effect */
}

.toggle-link:hover {
    color: var(--sub-color); /* Orange text on hover */
}

/* Form animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* Select Dropdown */
.form-select {
    border: 1px solid var(--description-color); /* Gray border */
    border-radius: 5px; /* Rounded corners */
    font-family: "SomarRounded", sans-serif; /* Custom font for dropdown */
    color: var(--black-color); /* Black text */
}

.form-select:focus {
    border-color: var(--main-color); /* Green border on focus */
    box-shadow: 0px 0px 15px rgba(var(--main-color-rgb), 0.2); /* Subtle shadow on focus */
}

/* -----------------------Titles------------------------------------ */

/* Modern layered header design */
.header-container {
    position: relative;
    margin: -2rem -2rem 2rem -2rem;
    padding: 4rem 2rem 2rem;
    background: linear-gradient(
        45deg,
        var(--main-color),
        var(--second-main-color)
    );
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    overflow: hidden;
}

.diagonal-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 50%);
}

.floating-icon {
    position: absolute;
    top: -25px;
    right: -25px;
    background: rgba(255, 255, 255, 0.15);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.floating-icon i {
    font-size: 2rem;
    color: var(--white-color);
    transform: rotate(-45deg);
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white-color);
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Hover effects */
.floating-icon:hover {
    transform: scale(1.1) rotate(15deg);
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .header-container {
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 95%);
    }
    .floating-icon {
        width: 60px;
        height: 60px;
        top: -15px;
        right: -15px;
    }
}

/* ------------parent profiles------------------------------------ */

/* Custom Styles */
.profile-card {
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 15px rgba(var(--main-color-rgb), 0.2);
}

.add-profile {
    border: 2px dashed var(--primary-color);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-profile:hover {
    background-color: var(--background-color);
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.profile-details {
    font-size: 0.9rem;
    color: var(--light-text-color);
}

.input-group > .country-code-select {
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    padding-inline: 0.75rem 2rem;
    background-position: right 0.75rem center;
    white-space: nowrap;
}

[dir="rtl"] .input-group > .country-code-select,
html[lang="ar"] .input-group > .country-code-select {
    background-position: left 0.75rem center;
    padding-inline: 2rem 0.75rem;
}

@media (max-width: 420px) {
    .input-group > .country-code-select {
        flex-basis: 145px;
        width: 145px;
        min-width: 145px;
        max-width: 145px;
        font-size: 0.875rem;
    }
}

/* Footer Legal Links */
.footer-legal {
    font-size: 0.85rem;
}
.footer-legal a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-legal a:hover {
    color: var(--main-color);
    text-decoration: underline;
}
body[dir="rtl"] .footer-legal .list-inline-item {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* ── 2026-10 Home + auth polish (messages + responsive fixes) ── */
section[id],
div[id] {
    scroll-margin-top: 86px;
}

.auth-page {
    min-height: calc(100vh - 76px);
    background: linear-gradient(180deg, var(--third-main-color) 0%, #f9fafb 100%);
}

.auth-card {
    border: none;
    box-shadow: var(--box-shadow-medium);
}

.auth-card .alert {
    border-radius: 12px;
    font-size: 0.95rem;
}

.toast-wrapper .toast {
    box-shadow: var(--box-shadow-medium);
    border-radius: 12px;
    overflow: hidden;
}

.toast-wrapper .toast-body {
    font-weight: 600;
    line-height: 1.5;
}

.hero-section .hero-toggler {
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
}

.hero-section .hero-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.navbar-light .hero-toggler {
    border-color: rgba(0, 33, 87, 0.25);
    color: var(--second-main-color);
}

.teachers-section-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.teacher-slider-container {
    padding-top: 3.5rem;
    margin-top: -1rem;
}

.slider-item {
    padding-top: 3.25rem;
}

.teacher-card {
    margin-top: 0;
}

.footer-brand img {
    filter: none;
    opacity: 1;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 6px 10px;
}

.contact-card .form-control.is-invalid,
.contact-card .form-select.is-invalid {
    border-color: #dc3545;
}

@media (max-width: 991.98px) {
    section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .hero-section {
        padding: 96px 0 48px;
    }

    .teachers-section {
        padding: 1.75rem 1.25rem;
    }

    .teacher-slider-container {
        padding-top: 3rem;
    }

    .free-session-card {
        padding: 2rem 1.25rem;
    }

    .contact-info-col,
    .contact-form-col {
        padding: 1.75rem;
    }
}

@media (max-width: 576px) {
    section {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }

    .display-5 {
        line-height: 1.25;
    }

    .hero-actions .btn {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .toast-wrapper {
        left: 0.75rem;
        right: 0.75rem;
        align-items: stretch;
    }

    .toast-wrapper .toast {
        max-width: 100%;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .classroom-mockup-frame,
    .floating-badge,
    .hero-enroll-badge .pulse-dot,
    .hero-text-col,
    .hero-visual-col {
        animation: none;
    }

    .btn:hover,
    .feature-card:hover,
    .teacher-card:hover {
        transform: none;
    }
}

/* ── Scroll-reveal animation system ─────────────────── */
html {
    scroll-behavior: smooth;
}

/* Hidden state applies only when JS is available (html.js gate in base.html),
   so content is never invisible when scripts fail or are disabled. */
html.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.75s ease,
        transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

html.js .reveal.reveal-left {
    transform: translateX(-36px);
}

html.js .reveal.reveal-right {
    transform: translateX(36px);
}

html.js .reveal.reveal-scale {
    transform: scale(0.94) translateY(16px);
}

html.js .reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    html.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Mobile hero mockup: keep frame + badges inside the viewport ── */
@media (max-width: 991.98px) {
    .hero-visual-col {
        padding-left: 14px;
        padding-right: 14px;
    }

    .classroom-mockup-frame {
        max-width: 100%;
    }
}

/* ── Readable descriptive text (home sections) ── */
.feature-card p {
    font-size: 1.06rem;
    line-height: 1.7;
}

.who-we-are-section p:not(.lead) {
    font-size: 1.13rem;
    line-height: 1.8;
}

.video-text-content p {
    font-size: 1.1rem;
    line-height: 1.75;
}

.video-text-content .lead,
.chat-section .lead {
    font-size: 1.2rem;
}

.free-session-desc {
    font-size: 1.15rem;
}

.teacher-card .text-muted {
    font-size: 0.98rem;
    line-height: 1.6;
}

.contact-form-col .text-muted,
.contact-section p {
    font-size: 1.08rem;
}

/* ── Deep beautification pass ───────────────────────── */

/* Section headers: gradient flourish under centered titles */
.section-head h2::after {
    content: "";
    display: block;
    width: 76px;
    height: 5px;
    border-radius: 99px;
    margin: 16px auto 0;
    background: linear-gradient(90deg, var(--main-color), var(--sub-color));
    box-shadow: 0 2px 10px rgba(var(--main-color-rgb), 0.35);
}

/* Feature cards: accent bar + icon delight */
.feature-card {
    position: relative;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 5px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(90deg, var(--main-color), var(--sub-color));
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.feature-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.feature-card .feature-icon-wrapper {
    box-shadow: 0 8px 20px rgba(var(--main-color-rgb), 0.14);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s ease;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(45deg, var(--main-color), var(--sub-color));
}

.feature-card:hover .feature-icon-wrapper i {
    color: #fff !important;
}

/* Buttons: light-shine sweep */
.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s ease;
    z-index: 1;
    pointer-events: none;
}

.btn-shine:hover::after {
    left: 135%;
}

/* Chat section: ambient glow orbs */
.chat-section {
    position: relative;
    overflow: hidden;
}

.chat-section::before,
.chat-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.chat-section::before {
    width: 420px;
    height: 420px;
    top: -160px;
    left: -120px;
    background: rgba(255, 255, 255, 0.16);
}

.chat-section::after {
    width: 380px;
    height: 380px;
    bottom: -180px;
    right: -100px;
    background: rgba(0, 33, 87, 0.35);
}

/* Video play button: pulsing rings */
#play-pause-button::before,
#play-pause-button::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(var(--main-color-rgb), 0.55);
    animation: play-ring 2.2s ease-out infinite;
    pointer-events: none;
}

#play-pause-button::after {
    animation-delay: 1.1s;
}

@keyframes play-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

/* Who-we-are image: gradient ring frame */
.frame-gradient {
    border-radius: 24px;
    padding: 10px;
    background: linear-gradient(135deg, var(--main-color), var(--sub-color));
    box-shadow: var(--box-shadow-medium);
}

.frame-gradient img {
    border-radius: 16px;
    display: block;
    width: 100%;
}

/* Testimonials: oversized quote glyph */
.quote-card {
    position: relative;
}

.quote-card::before {
    content: "\201C";
    position: absolute;
    top: 2px;
    inset-inline-start: 20px;
    font-size: 4.5rem;
    line-height: 1;
    font-family: Georgia, "Times New Roman", serif;
    color: rgba(var(--main-color-rgb), 0.16);
    pointer-events: none;
}

/* Process steps: dashed connector line on desktop */
@media (min-width: 992px) {
    .steps-line {
        position: relative;
    }

    .steps-line::before {
        content: "";
        position: absolute;
        top: 52px;
        left: 13%;
        right: 13%;
        border-top: 2px dashed rgba(var(--main-color-rgb), 0.35);
        pointer-events: none;
    }

    .steps-line .feature-icon-wrapper {
        position: relative;
        z-index: 1;
        background: #fff;
    }
}

/* Free-session card: soft brand glow */
.free-session-card {
    box-shadow:
        0 20px 55px rgba(var(--main-color-rgb), 0.16),
        0 4px 18px rgba(var(--sub-color-rgb), 0.1);
}

/* Contact inputs: gentle lift on focus */
.contact-form-col .form-control:focus,
.contact-form-col .form-select:focus {
    transform: translateY(-1px);
}

/* Footer: gradient top edge + richer depth */
.bg-footer {
    background: linear-gradient(180deg, #00122e 0%, var(--second-main-color) 34%);
    border-top: 4px solid;
    border-image-source: linear-gradient(90deg, var(--main-color), var(--sub-color));
    border-image-slice: 1;
}

/* Back-to-top floating button (wired in base.html) */
.back-to-top {
    position: fixed;
    inset-inline-start: 22px;
    bottom: 22px;
    z-index: 1024;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--main-color), var(--sub-color));
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 8px 22px rgba(var(--main-color-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    cursor: pointer;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    transform: translateY(-3px);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    #play-pause-button::before,
    #play-pause-button::after {
        animation: none;
        display: none;
    }

    .btn-shine::after {
        display: none;
    }

    .back-to-top {
        transition: none;
    }
}
