/* 
* Tulip Academy - Main Stylesheet
* A modern, clean, professional design
*/

/* ===== Variables ===== */
:root {
    /* Modern Color Palette */
    --primary-color: #971AA3; /* Updated from coral red to purple */
    --secondary-color: #971AA3; /* Changed from teal to purple */
    --accent-color-1: #f8f9fa; /* Crisp off-white */
    --accent-color-2: #ffd166; /* Golden yellow */
    --accent-color-3: #102a43; /* Deep navy */
    --text-color: #334e68; /* Softer deep blue */
    --light-text: #829ab1; /* Warm gray */
    --white: #FFFFFF;
    --light-bg: #f7fafc;
    --border-color: #e3e8ee;
    
    /* Typography */
    --font-family: 'Tajawal', sans-serif;
    --h1-size: 2.25rem;
    --h2-size: 1.75rem;
    --h3-size: 1.35rem;
    --h4-size: 1.1rem;
    --body-size: 0.95rem;
    --small-size: 0.85rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.875rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3.5rem;
    
    /* Border Radius */
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.04), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-btn: 0 2px 5px rgba(151, 26, 163, 0.2);
    --shadow-btn-hover: 0 4px 10px rgba(151, 26, 163, 0.3);
}

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

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    letter-spacing: 0.01em;
    padding-top: 110px; /* Add padding for fixed header */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--h1-size);
}

h2 {
    font-size: var(--h2-size);
}

h3 {
    font-size: var(--h3-size);
}

h4 {
    font-size: var(--h4-size);
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--body-size);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color-3);
}

ul {
    list-style: none;
}

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

/* ===== Utility Classes ===== */
.container {
    width: 88%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-color-3);
    font-size: 1.8rem;
    font-weight: 800;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-full);
}

.section-header p {
    color: var(--light-text);
    max-width: 600px;
    margin: 0.5rem auto 0;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-btn);
}

.primary-btn:hover {
    background-color: #800d8a;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-hover);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 2px 5px rgba(151, 26, 163, 0.2);
}

.secondary-btn:hover {
    background-color: #800d8a;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(151, 26, 163, 0.3);
}

/* ===== Header Styles ===== */
header {
    width: 100%;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.85); /* Translucent white background */
    position: fixed; /* Fixed position */
    top: 0;
    left: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Slightly more translucent when scrolling with compact class */
header.compact {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.75); /* More translucent when scrolled */
}

/* Compact header state for scroll */
header.compact .container {
    min-height: 80px !important;
    transition: all 0.3s ease !important;
}

header.compact .logo img {
    height: 65px !important;
    transition: all 0.3s ease !important;
}

header .container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    position: relative;
    gap: 1rem;
    justify-content: space-between;
}

/* RTL (Arabic) alignment */
html[dir="rtl"] header .container {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

/* LTR (English) alignment */
html[dir="ltr"] header .container {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

.logo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

html[dir="rtl"] .logo {
    -webkit-box-ordinal-group: 2;
    -ms-flex-order: 2;
    order: 2; /* Middle element in RTL */
}

html[dir="ltr"] .logo {
    -webkit-box-ordinal-group: 2;
    -ms-flex-order: 1;
    order: 1; /* First element in LTR */
}

.logo img {
    height: 110px;
    border-radius: var(--border-radius-sm);
    box-shadow: none; /* Removed shadow for transparent background logo */
    transition: all 0.3s ease;
}

/* Compact state logo size */
header.compact .logo img {
    height: 65px !important;
    transition: all 0.3s ease !important;
}

html[dir="rtl"] .logo img {
    margin-left: 0.8rem;
    margin-right: 0;
}

html[dir="ltr"] .logo img {
    margin-right: 0.8rem;
    margin-left: 0;
}

.logo h1 {
    font-size: 1.3rem;
    margin-bottom: 0;
    color: var(--accent-color-3);
    font-weight: 700;
    white-space: nowrap;
}

/* Navigation */
nav {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

html[dir="rtl"] nav {
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-ordinal-group: 3;
    -ms-flex-order: 3;
    order: 3; /* Last element in RTL */
    margin-right: auto;
    margin-left: 0;
}

html[dir="ltr"] nav {
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-ordinal-group: 3;
    -ms-flex-order: 2;
    order: 2; /* Middle element in LTR */
    margin-left: auto;
    margin-right: 0;
}

nav ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

nav ul li {
    margin: 0 0.8rem;
    list-style: none;
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li:first-child {
    margin-left: 0;
}

html[dir="rtl"] nav ul li:last-child {
    margin-left: 0;
    margin-right: 0.8rem;
}

html[dir="rtl"] nav ul li:first-child {
    margin-right: 0;
    margin-left: 0.8rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Header Controls */
.header-controls {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    position: relative; /* Make sure it's positioned properly */
    flex: 0 0 auto; /* Prevent it from growing or shrinking */
}

html[dir="rtl"] .header-controls {
    -webkit-box-ordinal-group: 1;
    -ms-flex-order: 1;
    order: 1; /* First element in RTL mode */
}

html[dir="ltr"] .header-controls {
    -webkit-box-ordinal-group: 3;
    -ms-flex-order: 3;
    order: 3; /* Last element in LTR mode */
}

/* Language Switcher */
#language-switcher {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important; /* Make it absolute in all views */
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
    letter-spacing: 0.5px;
    font-size: 15px;
}

html[dir="rtl"] #language-switcher {
    left: 20px !important; /* In RTL, position to left corner */
    right: auto !important;
}

html[dir="ltr"] #language-switcher {
    right: 20px !important; /* In LTR, position to right corner */
    left: auto !important;
}

/* Mobile-specific adjustments */
@media (max-width: 992px) {
    /* Language switcher positioning for mobile */
    html[dir="rtl"] #language-switcher {
        left: 15px !important;
}

    html[dir="ltr"] #language-switcher {
        right: 15px !important;
    }
}

/* Mobile Menu Button - Hidden on Desktop */
#mobile-menu-button {
    width: 44px;
    height: 44px;
    background-color: var(--accent-color-1);
    border: none;
    border-radius: 50%;
    color: var(--accent-color-3);
    font-size: 1.25rem;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: none !important; /* Force hide on desktop with !important */
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: absolute;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Ensure mobile menu button is visible on mobile */
@media (max-width: 992px) {
    /* Header container positioning */
    header .container {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 1rem;
        min-height: 70px !important;
    }
    
    /* Mobile menu button positioning */
    #mobile-menu-button {
        position: absolute !important;
        display: flex !important;
        z-index: 9999 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    html[dir="rtl"] #mobile-menu-button {
        right: 15px !important;
        left: auto !important;
    }
    
    html[dir="ltr"] #mobile-menu-button {
        left: 15px !important; 
        right: auto !important;
    }
    
    /* Language switcher positioning */
    #language-switcher {
        position: absolute !important;
        display: flex !important;
        z-index: 9999 !important;
        top: 50% !important; 
        transform: translateY(-50%) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    html[dir="rtl"] #language-switcher {
        left: 15px !important;
        right: auto !important;
    }
    
    html[dir="ltr"] #language-switcher {
        right: 15px !important;
        left: auto !important;
    }
}

/* Additional header adjustments for smaller screens */
@media (max-width: 400px) {
    header .container {
        min-height: 60px !important;
        padding: 0.4rem !important;
    }
    
    html[dir="rtl"] #mobile-menu-button {
        right: 10px !important;
    }
    
    html[dir="ltr"] #mobile-menu-button {
        left: 10px !important;
    }
    
    html[dir="rtl"] #language-switcher {
        left: 10px !important;
    }
    
    html[dir="ltr"] #language-switcher {
        right: 10px !important;
    }
    
    /* Smaller logo on very small screens */
    header .logo img {
        height: 45px !important;
    }
}

/* Ultra small screens adjustments */
@media (max-width: 320px) {
    header .container {
        min-height: 55px !important;
    }
    
    html[dir="rtl"] #mobile-menu-button {
        right: 5px !important;
    }
    
    html[dir="ltr"] #mobile-menu-button {
        left: 5px !important; 
    }
    
    html[dir="rtl"] #language-switcher {
        left: 5px !important;
    }
    
    html[dir="ltr"] #language-switcher {
        right: 5px !important;
    }
    
    #mobile-menu-button,
    #language-switcher {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
}
    
    /* Header controls container */
    .header-controls {
        width: 100%;
        position: absolute;
        display: block;
        height: 100%;
    }
    
    html[dir="rtl"] .header-controls {
        left: 0;
    }
    
    html[dir="ltr"] .header-controls {
        right: 0;
    }
    
    /* Logo positioning */
    .logo {
        flex: 0 0 auto;
        position: relative;
        z-index: 99;
        margin: 0 auto;
    }
    
    html[dir="rtl"] .logo,
    html[dir="ltr"] .logo {
        order: 1;
    }
    
    .logo h1 {
        display: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo img {
        height: 100px !important; /* Increased for better visibility */
    }
    
    header.compact .logo img {
        height: 60px !important; /* Smaller logo when scrolled on medium screens */
        width: auto !important;
        transition: all 0.3s ease !important;
    }
    
    #mobile-menu-button {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    .language-switcher {
        min-width: 44px;
        height: 36px;
        padding: 0 10px;
    }
    
    .language-switcher i {
        margin-right: 4px;
    }
    
    html[dir="rtl"] .language-switcher i {
        margin-right: 0;
        margin-left: 4px;
    }
    
    .language-switcher span {
        font-size: 0.75rem;
    }
    
    .header-controls {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .logo img {
        height: 90px !important; /* Increased for better visibility */
    }
    
    header.compact .logo img {
        height: 50px !important; /* Smaller logo when scrolled on small screens */
    }
    
    #mobile-menu-button {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    
    .language-switcher {
        min-width: 42px;
        height: 34px;
        padding: 0 8px;
    }
    
    .language-switcher span {
        font-size: 0.7rem;
    }
    
    /* Improve text wrapping on small screens */
    p, h1, h2, h3, h4 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Reduce font size for small screens */
    body {
        font-size: 14px;
    }
    
    /* Make Arabic text elements fit better on small screens */
    [lang="ar"] p, 
    [dir="rtl"] p,
    [dir="rtl"] .service-card p,
    [dir="rtl"] .about-content p,
    [dir="rtl"] .pricing-info p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Add padding to containers to prevent text from touching edges */
    .container {
        width: 92%;
        padding: 0 10px;
    }
    
    /* Fix the service cards to prevent overflow */
    .service-card {
        padding: 1rem;
        width: 100%;
    }
    
    /* Adjust mission section text */
    .mission-section p {
        font-size: 0.9rem;
    }
    
    /* Fix curriculum text in pricing cards */
    .pricing-card.single-card .curriculum-message {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Responsive body padding for fixed header */
@media (max-width: 768px) {
    body {
        padding-top: 90px; /* Adjust padding for smaller header on mobile */
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 80px; /* Smaller padding for very small screens */
    }
}

/* For extra small devices */
@media (max-width: 400px) {
    body {
        font-size: 13px;
        padding-top: 70px; /* Even smaller padding for extra small screens */
    }
    
    /* Further reduce text size for very small screens */
    [dir="rtl"] p {
        font-size: 0.85rem;
    }
    
    /* Ensure container has enough breathing room */
    .container {
        width: 95%;
        padding: 0 8px;
    }
    
    /* Fix the line length for Arabic text */
    [dir="rtl"] .service-card p {
        line-height: 1.4;
        max-width: 100%;
    }
}

/* ===== Service Card Styles ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-md);
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

@media (max-width: 400px) {
    .services-grid {
        gap: 8px !important;
    }
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color-1);
    border-radius: var(--border-radius-full);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--secondary-color);
}

.service-icon i {
    font-size: 1.7rem;
    color: var(--accent-color-3);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
    color: var(--white);
}

.service-card h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--accent-color-3);
    font-size: 1.15rem;
}

.service-card p {
    margin-bottom: var(--spacing-md);
    color: var(--light-text);
    font-size: 0.85rem;
    flex-grow: 1;
}

.service-card .btn {
    margin-top: auto;
    align-self: center;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
}

/* ===== Pricing Section ===== */
.pricing {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
    position: relative;
}

.pricing .section-header {
    margin-bottom: var(--spacing-md);
}

/* Pricing Selector Container */
.pricing-selector-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--accent-color-1);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Qatar pricing overlay specific styles */
#qatar-price-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #971AA3 !important;
    z-index: 9999 !important;
    display: none;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0 !important;
}

#qatar-price-overlay h3 {
    color: white !important;
    font-size: 1rem !important;
    margin-bottom: 10px !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 10px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

@media (max-width: 400px) {
    #qatar-price-overlay h3 {
        font-size: 0.9rem !important;
        margin-bottom: 5px !important;
    }
    
    #qatar-price-overlay span:first-child {
        font-size: 2rem !important;
    }
}

#qatar-price-overlay div {
    display: flex !important;
    align-items: baseline !important;
    direction: ltr !important;
    justify-content: center !important;
}

#qatar-price-overlay span {
    display: inline-block !important;
    color: white !important;
}

#qatar-price-overlay span:first-child {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

/* New pricing layout for RTL design with card on left and options on right */
.pricing-layout {
    display: flex;
    flex-direction: row-reverse; /* Flip for RTL */
    gap: 25px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* Options/Selectors Styling */
.pricing-selectors {
    flex: 1;
    padding: 20px 25px;
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    min-width: 300px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-selectors:hover {
    box-shadow: var(--shadow-md);
}

.selectors-title {
    color: var(--accent-color-3);
    margin-bottom: 25px;
    padding-bottom: 15px;
    font-size: 1.3rem;
    text-align: right;
    position: relative;
    border-bottom: 2px solid var(--primary-color);
}

.selector-group {
    margin-bottom: 18px;
}

.selector-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-color-3);
    text-align: right;
}

.service-selector {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    background-color: var(--white);
    color: var(--text-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334e68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.service-selector:hover {
    border-color: #c8d3e0;
}

.service-selector:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(151, 26, 163, 0.15);
}

.pricing-info {
    margin-top: auto;
    background-color: rgba(253, 209, 102, 0.08);
    padding: 15px;
    border-radius: var(--border-radius-md);
    border-right: 2px solid var(--accent-color-2);
}

.pricing-info p {
    margin-bottom: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.pricing-info p:last-child {
    margin-bottom: 0;
}

.pricing-info i {
    color: var(--primary-color);
    margin-left: 8px;
    font-size: 1rem;
}

/* Unified Pricing Card */
.unified-pricing-card {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pricing-card.single-card {
    width: 100%;
    max-width: 320px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.pricing-card.single-card .pricing-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card.single-card .pricing-header h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--white);
    position: relative;
    z-index: 1;
    font-weight: 600;
}

/* Curriculum message styling */
.pricing-card.single-card .curriculum-message {
    color: var(--white);
    font-size: 0.8rem;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    opacity: 0.9;
    text-align: center;
    padding: 0 10px;
    max-width: 100%;
}

.pricing-card.single-card .price {
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    margin-top: 5px !important;
    position: relative !important;
    z-index: 5 !important; /* Higher z-index to ensure visibility */
    direction: ltr !important; /* Fix currency positioning */
    font-size: 0 !important; /* Reset font size */
    width: 100% !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.pricing-card.single-card .price .amount {
    order: 1 !important;
    font-size: 2.5rem !important; /* Force this size */
    font-weight: 700 !important;
    vertical-align: baseline !important;
    display: inline-block !important;
    color: white !important;
    max-width: fit-content !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pricing-card.single-card .price .currency {
    order: 2 !important;
    font-size: 0.9rem !important;
    margin-right: 0 !important;
    margin-left: 5px !important;
    font-weight: 500 !important;
    vertical-align: baseline !important;
    display: inline-block !important;
    color: white !important;
    max-width: fit-content !important;
    overflow: visible !important;
}

.pricing-card.single-card .price .period {
    order: 3 !important;
    font-size: 0.8rem !important;
    opacity: 0.9 !important;
    font-weight: 400 !important;
    vertical-align: baseline !important;
    display: inline-block !important;
    color: white !important;
    max-width: fit-content !important;
    overflow: visible !important;
}

/* Special price adjustments for small screens */
@media (max-width: 400px) {
    .pricing-card.single-card .price .amount {
        font-size: 2rem !important;
    }
    .pricing-card.single-card .price .currency,
    .pricing-card.single-card .price .period {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 320px) {
    .pricing-card.single-card .price .amount {
        font-size: 1.8rem !important;
    }
    .pricing-card.single-card .price .currency,
    .pricing-card.single-card .price .period {
        font-size: 0.7rem !important;
    }
}

/* Ensure text displays correctly for RTL */
html[dir="rtl"] .pricing-card.single-card .price .amount {
    direction: ltr !important;
    text-align: center !important;
}

/* Prevent unwanted shadow elements */
.pricing-card *:before,
.pricing-card *:after {
    display: none !important;
}

/* Force font and element visibility */
.pricing-card.single-card .price .amount,
.pricing-card.single-card .price .currency,
.pricing-card.single-card .price .period {
    opacity: 1 !important;
    visibility: visible !important;
}

.pricing-card.single-card .pricing-features {
    padding: 10px 15px;
    background-color: var(--white);
    flex-grow: 1;
}

.pricing-card.single-card .pricing-features ul {
    padding: 0;
    margin: 0;
}

.pricing-card.single-card .pricing-features ul li {
    padding: 5px 0;
    margin-bottom: 0;
    font-size: 0.85rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    line-height: 1.4;
    text-align: right;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 5px;
}

.pricing-card.single-card .pricing-features ul li:last-child {
    border-bottom: none;
}

.pricing-card.single-card .pricing-features ul li i {
    color: var(--white);
    margin-left: 10px;
    font-size: 0.7rem;
    min-width: 16px;
    background-color: var(--secondary-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(151, 26, 163, 0.2);
}

.pricing-card.single-card .service-description {
    padding: 0 15px 6px;
    background-color: var(--white);
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-color);
    text-align: right;
    border-top: 1px dashed var(--border-color);
    padding-top: 6px;
    margin-top: 5px;
    max-height: none;
    overflow-y: visible;
}

.pricing-card.single-card .btn {
    display: block;
    margin: 0;
    padding: 10px;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: var(--secondary-color);
    color: white;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.pricing-card.single-card .btn:hover {
    background-color: #800d8a;
}

/* Responsive styles for the pricing layout */
@media (max-width: 992px) {
    .pricing-layout {
        flex-direction: column;
        gap: 25px;
    }
    
    .pricing-selectors,
    .unified-pricing-card {
        width: 100%;
    }
    
    .unified-pricing-card {
        justify-content: center;
        padding-right: 0;
    }
    
    .pricing-card.single-card {
        max-width: 320px;
        margin: 0 auto 25px;
        position: static;
    }
    
    .selectors-title {
        text-align: center;
        border-bottom: 2px solid var(--primary-color);
    }
    
    .selector-group label {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .pricing-selector-container {
        padding: 20px 15px;
    }
    
    .pricing-selectors {
        padding: 15px;
    }
    
    .pricing-card.single-card {
        max-width: 100%;
    }
    
    .selectors-title {
        font-size: 1.1rem;
    }
    
    .service-selector {
        padding: 10px;
    }
    
    .pricing-info {
        padding: 10px;
    }
}

/* ===== Services Section ===== */
.services {
    padding: var(--spacing-xl) 0;
    background-color: var(--accent-color-1);
    position: relative;
}

/* Service Tabs */
.service-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.service-tab {
    padding: 0.55rem 1.1rem;
    margin: 0 0.35rem 0.7rem;
    background-color: var(--white);
    color: var(--accent-color-3);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.service-tab:hover {
    background-color: var(--accent-color-1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(151, 26, 163, 0.25);
}

.service-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease forwards;
}

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

.testimonial-content {
    padding: 25px;
    flex-grow: 1;
    position: relative;
}

.testimonial-content p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.testimonial-content p::before {
    content: '"';
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-left: 3px;
}

.testimonial-content p::after {
    content: '"';
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 3px;
}

/* ===== Testimonials Section ===== */
.testimonials {
    padding: var(--spacing-xl) 0;
    background-color: var(--accent-color-1);
    position: relative;
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 15px 5px 25px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.testimonials-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.testimonial-card {
    scroll-snap-align: center;
    min-width: 300px;
    flex: 1;
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.testimonial-author {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    background-color: rgba(151, 26, 163, 0.05);
    border-top: 1px solid var(--border-color);
}

.testimonial-author img {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-full);
    margin-left: 15px;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px rgba(151, 26, 163, 0.1);
}

.testimonial-author h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--accent-color-3);
}

.testimonial-author p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--light-text);
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
    position: relative;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
}

/* New styling for the social links container */
.social-links-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 0;
    width: 100%;
    max-width: 500px;
}

.social-links-container .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--accent-color-1);
    color: var(--accent-color-3);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.social-links-container .social-link i {
    margin-left: 15px;
    font-size: 1.5rem;
}

.social-links-container .social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.social-links-container .whatsapp-link {
    background-color: #25D366; /* WhatsApp brand green */
    color: var(--white);
}

.social-links-container .whatsapp-link i {
    color: var(--white);
}

.social-links-container .social-link:nth-child(1) {
    background-color: #4267B2;
    color: white;
}

.social-links-container .social-link:nth-child(3) {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
    .social-links-container {
        padding: 20px 0;
    }
    
    .social-links-container .social-link {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .social-links-container .social-link i {
        font-size: 1.3rem;
    }
}

.contact-form {
    flex: 1.5;
    min-width: 300px;
}

#contactForm {
    background-color: var(--accent-color-1);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-color-3);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    background-color: var(--white);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(151, 26, 163, 0.15);
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--accent-color-1);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-of-type {
    border-bottom: none;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: var(--secondary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
}

.info-item p {
    margin: 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--white);
    color: var(--accent-color-3);
    border-radius: var(--border-radius-full);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.whatsapp-btn {
    display: flex;
    align-items: center;
    background-color: #971AA3;
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: auto;
}

.whatsapp-btn i {
    margin-left: 8px;
    font-size: 1.1rem;
}

.whatsapp-btn span {
    font-size: 0.85rem;
    font-weight: 600;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(151, 26, 163, 0.2);
}

/* ===== Footer ===== */
footer {
    background-color: var(--accent-color-3);
    color: var(--white);
    padding-top: var(--spacing-lg);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo-img {
    width: 110px;
    height: 110px;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: none; /* Removed shadow for transparent background logo */
}

.footer-logo h3 {
    margin-bottom: 10px;
    color: var(--white);
    font-size: 1.2rem;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    max-width: 250px;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-newsletter {
    flex: 1.5;
    min-width: 300px;
}

.footer-newsletter h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.footer-newsletter form {
    display: flex;
}

.footer-newsletter input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.footer-newsletter input:focus {
    outline: none;
}

.footer-newsletter button {
    padding: 10px 15px;
    border: none;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    background-color: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.footer-newsletter button:hover {
    background-color: #ff4146;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin: 0;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 42, 67, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

.modal-header {
    background-color: var(--accent-color-3);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.close-modal {
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-content-inner {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    background-color: var(--accent-color-1);
    display: flex;
    justify-content: flex-end;
}

/* Course details styling */
.highlight-box {
    background-color: rgba(253, 209, 102, 0.08);
    border-radius: var(--border-radius-md);
    padding: 15px;
    margin-bottom: 15px;
    border-right: 2px solid var(--accent-color-2);
}

.highlight-box h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--accent-color-3);
}

.comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.comparison-item {
    background-color: var(--white);
    padding: 12px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.comparison-item h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--accent-color-3);
    display: flex;
    align-items: center;
}

.comparison-item h4 i {
    margin-left: 8px;
    color: var(--secondary-color);
}

.comparison-item p {
    font-size: 0.8rem;
    line-height: 1.5;
}

.course-list {
    padding-right: 15px;
    margin: 10px 0;
}

.course-list li {
    margin-bottom: 8px;
    position: relative;
    padding-right: 15px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.course-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.emoji {
    font-style: normal;
}

/* Responsive styles */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .footer-content {
        justify-content: space-between;
    }
    
    .testimonial-card {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: var(--spacing-md);
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 20px;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .footer-content > div {
        flex: 0 0 100%;
    }
    
    .comparison {
        grid-template-columns: 1fr;
    }
    
    .modal-content-inner {
        max-height: 50vh;
    }
    
    .testimonial-card {
        min-width: 260px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .container {
        width: 92%;
    }
    
    .hero-content .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .testimonial-card {
        min-width: 90vw;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(
        rgba(16, 42, 67, 0.7),
        rgba(16, 42, 67, 0.8)
    ), url('../assets/29.jpg');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    text-align: center;
    margin: 0 auto;
    padding: var(--spacing-xl);
    animation: fadeInUp 1s ease-out;
    background-color: rgba(16, 42, 67, 0.4);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-content h1 {
    color: var(--white);
    font-size: 2.6rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 800;
}

.hero-content p {
    color: var(--accent-color-1);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    font-weight: 500;
}

.hero-btns {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-content .btn {
    padding: 0.85rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.4s ease;
    border-radius: 50px;
}

.hero-content .btn i {
    margin-left: 8px;
}

.hero-content .btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-content .primary-btn {
    background-color: var(--primary-color);
    padding: 0.85rem 2.5rem;
}

.hero-content .secondary-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content .secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

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

/* ===== About Us Section ===== */
.about-us {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* About content wrapper (left column) */
.about-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    background-color: var(--accent-color-1);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.about-content h3 {
    color: var(--accent-color-3);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.about-content h3::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-full);
}

.about-intro, .about-mission {
    margin-bottom: var(--spacing-md);
}

.about-content p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.about-tagline {
    font-weight: 600;
    color: var(--accent-color-3);
    font-size: 1.1rem;
    line-height: 1.6;
}

.about-tagline.highlight {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: var(--spacing-sm) 0;
    padding: var(--spacing-xs) 0;
    border-right: 3px solid var(--primary-color);
    padding-right: var(--spacing-sm);
    background-color: rgba(151, 26, 163, 0.05);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

/* Stats section */
.about-stats {
    flex: 1;
    min-width: 250px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    align-content: center;
}

.stat-item {
    text-align: center;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 3px solid var(--primary-color);
}

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

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--accent-color-3);
    font-weight: 600;
}

/* Features section styling */
.about-features-wrapper {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.about-features-wrapper h3 {
    color: var(--accent-color-3);
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.about-features-wrapper h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-full);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    background-color: var(--accent-color-1);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}

.about-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.about-feature i {
    color: var(--white);
    margin-left: var(--spacing-md);
    font-size: 1.5rem;
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(151, 26, 163, 0.2);
}

.about-feature div {
    flex: 1;
}

.about-feature h4 {
    color: var(--accent-color-3);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.about-feature p {
    margin-bottom: 0;
    font-size: var(--body-size);
    color: var(--text-color);
    line-height: 1.6;
}

.about-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px dashed var(--border-color);
}

.about-cta .about-tagline {
    margin-bottom: var(--spacing-md);
}

.about-cta .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .about-content-wrapper {
        flex-direction: column;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

@media (min-width: 992px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* End of responsive styles */

@media (max-width: 992px) {
    /* Mobile logo */
    .logo {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.6rem 0;
        margin: 0 auto !important;
    }
    
    .logo img {
        height: 120px !important; /* Larger logo for all mobile views */
        width: auto;
        margin: 0 !important;
        object-fit: contain;
        box-shadow: none !important;
        border-radius: 0 !important; /* No border radius for transparent logo */
        transition: all 0.3s ease !important;
    }
    
    header.compact .logo img {
        height: 60px !important;
    }
    
    /* Adjust header height to accommodate larger logo */
    header .container {
        min-height: 130px !important;
        transition: all 0.3s ease;
    }
    
    /* Compact header height for mobile */
    header.compact .container {
        min-height: 70px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Adjust mobile menu positioning to match new header height */
    nav.active {
        top: 130px !important;
    }
    
    /* Adjust mobile menu position for compact header */
    header.compact ~ nav,
    header.compact ~ nav.active {
        top: 70px !important;
    }
    
    header.compact ~ nav.active {
        top: 70px !important;
    }
    
    /* Position the mobile menu button */
    #mobile-menu-button {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    .logo h1 {
        display: none;
    }
}

/* Mobile menu fixes */
@media (max-width: 992px) {
    /* Mobile navigation core styles */
    nav {
        position: fixed !important;
        top: 90px !important; /* Match header height */
        width: 100% !important;
        height: calc(100vh - 90px) !important;
        background-color: rgba(255, 255, 255, 0.9) !important; /* Slightly translucent */
        z-index: 99 !important;
        display: flex !important;
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-box-pack: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) !important;
        transition: all 0.3s ease !important;
    }
    
    /* Active mobile menu */
    nav.active {
        opacity: 1 !important;
        visibility: visible !important; 
        transform: translateY(0) !important;
        overflow-y: auto !important;
    }
    
    /* Menu button when menu is active */
    #mobile-menu-button.active,
    nav.active ~ #mobile-menu-button {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
}

/* Additional Shrinking Header Media Query Styles */
@media (max-width: 992px) {
    header.compact {
        padding: 10px 0 !important;
    }
    
    header.compact .container {
        min-height: 70px !important;
    }
    
    header.compact .logo img {
        height: 60px !important;
    }
    
    header.compact ~ nav,
    header.compact ~ nav.active {
        top: 80px !important; /* Adjust for compact header height */
    }
}

@media (max-width: 768px) {
    header.compact .logo img {
        height: 55px !important;
    }
}

@media (max-width: 576px) {
    header.compact .logo img {
        height: 50px !important;
    }
}

/* Add these additional targeted styles to fix the specific overflowing text in service cards */

/* Target the specific paragraph that's overflowing */
[dir="rtl"] .about-content p, 
[dir="rtl"] .service-card p,
[dir="rtl"] .service-card h3 {
    /* Improve text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    hyphens: auto;
}

/* Add specific styles for the curriculum description text */
[dir="rtl"] .about-intro p {
    font-size: 0.9rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

@media (max-width: 576px) {
    /* Make the service cards more compact on mobile */
    .service-card {
        padding: 1rem;
    }
    
    /* Reduce font size for service cards on mobile */
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Fix the specific overflowing paragraph */
    [dir="rtl"] .about-intro p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Services section adjustments */
    .services-grid {
        grid-gap: 0.75rem;
    }
}

/* Add new specific style for the long curriculum list */
.long-curriculum-list {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    hyphens: auto;
    font-size: 0.92rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .long-curriculum-list {
        font-size: 0.85rem;
        line-height: 1.4;
        letter-spacing: -0.01em;
    }
}

/* Add these styles to improve service cards display in mobile view */

/* Service cards specific fixes for mobile */
@media (max-width: 576px) {
    /* Make service cards more compact */
    .services-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
    
    /* Service card content adjustments */
    .service-card {
        padding: 1.25rem 1rem;
        min-height: unset;
    }
    
    /* Make service card title and text smaller */
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    /* Make service card description more compact */
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        /* Ensure text doesn't overflow */
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Make button smaller */
    .service-card .btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Fix the card icon size */
    .service-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }
    
    .service-icon i {
        font-size: 1.2rem;
    }
} 

/* Add these styles for better text flow in header and hero sections */

@media (max-width: 576px) {
    /* Hero section text adjustments */
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        /* Ensure text doesn't overflow */
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        hyphens: auto;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    /* Header adjustments */
    header .logo h1 {
        font-size: 1.1rem;
    }
    
    /* About section title adjustments */
    .about-intro h3,
    .about-mission h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    /* Improve button text size */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ===== Enhanced Mobile Responsiveness ===== */

/* Base mobile typography improvements */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 0.9rem;
    }
    
    /* Improve text wrapping for all elements */
    p, h1, h2, h3, h4, h5, h6, a, span, li {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Specific fixes for Arabic text */
    [dir="rtl"] p, 
    [dir="rtl"] h3, 
    [dir="rtl"] li,
    [dir="rtl"] .service-card p,
    [dir="rtl"] .service-card h3,
    [dir="rtl"] .about-content p,
    [dir="rtl"] .pricing-info p {
        font-size: 0.9rem;
        line-height: 1.5;
        max-width: 100%;
        letter-spacing: -0.01em;
    }
    
    /* Reduce spacing in containers */
    .container {
        width: 92%;
        padding: 0 10px;
    }
    
    /* Make service cards more compact */
    .service-card {
        padding: 1rem;
    }
    
    /* Service card content */
    .service-card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    /* Smaller icons in service cards */
    .service-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 0.75rem;
    }
    
    .service-icon i {
        font-size: 1.3rem;
    }
    
    /* More compact buttons */
    .service-card .btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }
    
    /* Pricing section adjustments */
    .pricing-card.single-card .pricing-features ul li {
        font-size: 0.8rem;
        padding: 5px 0;
    }
    
    /* Hero section adjustments */
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .hero-content .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    html {
        font-size: 13px;
    }
    
    body {
        font-size: 0.85rem;
    }
    
    /* Further reduce text size */
    [dir="rtl"] p, 
    [dir="rtl"] .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Maximize screen space */
    .container {
        width: 94%;
        padding: 0 8px;
    }
    
    /* Make service cards even more compact */
    .service-card {
        padding: 0.8rem;
    }
    
    .service-card h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    /* Smaller service icon */
    .service-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.6rem;
    }
    
    .service-icon i {
        font-size: 1.1rem;
    }
    
    /* Tighter grid */
    .services-grid {
        gap: 0.75rem;
    }
    
    /* Hero section for tiny screens */
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-btns {
        gap: 10px;
    }
    
    .hero-content .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Testimonial cards */
    .testimonial-card {
        min-width: 85vw;
    }
    
    /* About features */
    .about-feature {
        padding: 0.8rem;
    }
    
    .about-feature i {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-left: 0.75rem;
    }
    
    .about-feature h4 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .about-feature p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Pricing section */
    .pricing-selectors {
        padding: 1rem;
    }
    
    .selectors-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .selector-group label {
        font-size: 0.85rem;
    }
    
    .service-selector {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Pricing card */
    .pricing-card.single-card .price .amount {
        font-size: 2rem !important;
    }
    
    .pricing-card.single-card .curriculum-message {
        font-size: 0.75rem;
        padding: 0 5px;
    }
}

/* Ultra small devices */
@media (max-width: 320px) {
    html {
        font-size: 12px;
    }
    
    body {
        font-size: 0.8rem;
    }
    
    /* Maximize space usage */
    .container {
        width: 96%;
        padding: 0 6px;
    }
    
    /* Further compact service cards */
    .service-card {
        padding: 0.7rem;
    }
    
    .service-card h3 {
        font-size: 0.95rem;
    }
    
    .service-card p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Minimal service icon */
    .service-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }
    
    .service-icon i {
        font-size: 1rem;
    }
    
    /* Super compact grid */
    .services-grid {
        gap: 0.5rem;
    }
    
    /* Header adjustments */
    header .logo img {
        height: 45px !important;
    }
    
    #mobile-menu-button,
    #language-switcher {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
    
    /* Minimal hero content */
    .hero-content {
        padding: 1.2rem 0.8rem;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
    }
    
    .hero-content .btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
    }
    
    /* Curriculum paragraph specific fix */
    .long-curriculum-list {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Section headers */
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-header p {
        font-size: 0.8rem;
    }
}

/* Fix specific problematic elements that overflow */
.long-curriculum-list {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    hyphens: auto;
    font-size: 0.92rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .long-curriculum-list {
        font-size: 0.85rem;
        line-height: 1.4;
        letter-spacing: -0.01em;
    }
}

/* Service cards specific fixes for mobile */
@media (max-width: 576px) {
    /* Grid layout for service cards */
    .services-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
    
    /* Service card content sizing */
    .service-card {
        padding: 1.25rem 1rem;
        min-height: unset;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
        /* Text overflow handling */
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .service-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Fix modal overflow issues */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
    }
    
    .modal-content-inner {
        max-height: 70vh;
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
}

/* Fix mobile menu display */
@media (max-width: 992px) {
    nav.active {
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    nav ul li a {
        display: block !important;
        width: 100% !important;
        padding: 10px !important;
        margin: 4px 0 !important;
        font-size: 0.95rem !important;
    }
}

/* Fix contact section for small screens */
@media (max-width: 576px) {
    .social-links-container .social-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .social-links-container .social-link i {
        font-size: 1.2rem;
        margin-left: 10px;
    }
}

/* Fix pricing section for small devices */
@media (max-width: 576px) {
    .pricing-selector-container {
        padding: 15px 10px;
    }
    
    .pricing-layout {
        gap: 15px;
    }
    
    .service-selector {
        font-size: 0.85rem;
        padding: 10px;
        background-position: left 0.8rem center;
    }
    
    .selector-group {
        margin-bottom: 12px;
    }
    
    .pricing-card.single-card .price .amount {
        font-size: 2.2rem !important; 
    }
    
    .pricing-card.single-card .price .currency,
    .pricing-card.single-card .price .period {
        font-size: 0.85rem !important;
    }
}

/* Fix footer for small screens */
@media (max-width: 576px) {
    footer {
        padding-top: 2rem;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .footer-logo-img {
        width: 80px;
        height: 80px;
    }
    
    .footer-logo h3 {
        font-size: 1.1rem;
    }
    
    .footer-links h4,
    .footer-newsletter h4 {
        font-size: 0.95rem;
    }
}

/* Final Mobile Responsiveness Fixes */

/* Ensure all text elements have proper overflow handling */
* {
    max-width: 100%;
}

/* Global text wrapping */
body, p, h1, h2, h3, h4, h5, h6, a, li, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-word;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Arabic specific overflow handling */
[dir="rtl"] * {
    text-overflow: ellipsis;
}

/* Adjust background images for mobile */
@media (max-width: 576px) {
    .hero {
        background-position: center center;
    }
}

/* Prevent input zoom on iOS */
@media (max-width: 576px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Fix padding in tables and lists */
@media (max-width: 400px) {
    table {
        max-width: 100%;
        display: block;
        overflow-x: auto;
    }
    
    ul, ol {
        padding-right: 15px;
        padding-left: 15px;
    }
}

/* Fix any remaining overflow issues */
.service-card, .testimonial-card, .about-feature, .pricing-card, .footer-content > div {
    overflow: hidden;
}

/* Force max width on any images or media */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Fix spacing in pricing section for ultra small screens */
@media (max-width: 320px) {
    .pricing-layout {
        gap: 10px;
    }
    
    .pricing-selector-container {
        padding: 10px 8px;
    }
}

/* Ensure buttons don't overflow their containers */
.btn {
    white-space: normal;
    max-width: 100%;
}

/* Force proper element sizing regardless of other rules */
* {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

/* Fix specific element known to cause problems */
.long-curriculum-list {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Force all text to wrap */
[dir="rtl"] p, 
[dir="rtl"] h3, 
[dir="rtl"] li,
[dir="rtl"] .service-card p,
[dir="rtl"] .service-card h3,
[dir="rtl"] .about-content p,
[dir="rtl"] .pricing-info p {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* ===== CRITICAL MOBILE FIXES ===== */

/* Force responsive layout for all screen sizes */
@media (max-width: 576px) {
    /* Force single column layout for all grids */
    .services-grid,
    .about-features,
    .footer-content,
    .about-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Force proper text sizes */
    body {
        font-size: 14px !important;
    }
    
    h1, .hero-content h1 {
        font-size: 1.5rem !important;
    }
    
    h2, .section-header h2 {
        font-size: 1.3rem !important;
    }
    
    h3, .service-card h3 {
        font-size: 1.1rem !important;
    }
    
    p, .service-card p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Prevent all overflow */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix button and link sizes */
    .btn, a.btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        white-space: normal !important;
        height: auto !important;
        min-height: 35px !important;
    }
    
    /* Fix hero section */
    .hero-content {
        padding: 1rem !important;
        width: 90% !important;
        max-width: 90% !important;
    }
    
    /* Fix header */
    header {
        min-height: auto !important;
        max-height: 60px !important;
    }
    
    header .container {
        min-height: 60px !important;
        max-height: 60px !important;
    }
    
    .logo img {
        height: 45px !important;
        width: auto !important;
    }
    
    /* Fix service cards */
    .service-card {
        padding: 12px !important;
        margin-bottom: 10px !important;
    }
    
    .service-icon {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 8px !important;
    }
    
    .service-icon i {
        font-size: 1rem !important;
    }
    
    /* Fix pricing section */
    .pricing-selector-container {
        padding: 10px !important;
    }
    
    .pricing-selectors {
        padding: 10px !important;
    }
    
    .selector-group {
        margin-bottom: 8px !important;
    }
    
    .selectors-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
    }
    
    .service-selector {
        padding: 8px !important;
        font-size: 0.85rem !important;
    }
    
    /* Fix curriculum message */
    .long-curriculum-list {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
    }
    
    /* Fix Qatar price overlay */
    #qatar-price-overlay h3 {
        font-size: 0.9rem !important;
        padding: 0 5px !important;
    }
    
    #qatar-price-overlay span:first-child {
        font-size: 1.8rem !important;
    }
    
    /* Fix pricing card */
    .pricing-card.single-card .pricing-header {
        padding: 15px 10px !important;
    }
    
    .pricing-card.single-card .pricing-features {
        padding: 8px 10px !important;
    }
    
    .pricing-card.single-card .pricing-features ul li {
        font-size: 0.8rem !important;
        padding: 4px 0 !important;
    }
    
    /* Fix about section */
    .about-content-wrapper {
        padding: 15px !important;
    }
    
    .about-feature {
        padding: 10px !important;
    }
    
    .about-feature i {
        margin-left: 8px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
    }
    
    /* Fix social links */
    .social-links-container .social-link {
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
    }
    
    .social-links-container .social-link i {
        font-size: 1.1rem !important;
        margin-left: 8px !important;
    }
}

/* Even stronger fixes for extra small screens */
@media (max-width: 400px) {
    /* Further reduce font sizes */
    body {
        font-size: 13px !important;
    }
    
    h1, .hero-content h1 {
        font-size: 1.3rem !important;
    }
    
    h2, .section-header h2 {
        font-size: 1.2rem !important;
    }
    
    h3, .service-card h3 {
        font-size: 1rem !important;
    }
    
    p, .service-card p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    /* Tighter containers */
    .container {
        width: 94% !important;
        padding: 0 5px !important;
    }
    
    /* Force single column */
    .about-stats {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .stat-item {
        margin-bottom: 8px !important;
        padding: 10px !important;
    }
    
    /* Fix buttons */
    .btn, a.btn {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        min-height: 30px !important;
    }
    
    /* Make header ultra compact */
    header .container {
        min-height: 50px !important;
        max-height: 50px !important;
    }
    
    .logo img {
        height: 40px !important;
    }
    
    #mobile-menu-button,
    #language-switcher {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 0.8rem !important;
    }
    
    /* Fix service cards */
    .service-card {
        padding: 10px !important;
    }
    
    .service-icon {
        width: 35px !important;
        height: 35px !important;
        margin-bottom: 6px !important;
    }
    
    .service-icon i {
        font-size: 0.9rem !important;
    }
    
    /* Fix card button */
    .service-card .btn {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }
    
    /* Fix curriculum text */
    .long-curriculum-list {
        font-size: 0.8rem !important;
        line-height: 1.25 !important;
    }
}

/* Extreme fixes for ultra small screens */
@media (max-width: 320px) {
    /* Minimal font sizes */
    body {
        font-size: 12px !important;
    }
    
    h1, .hero-content h1 {
        font-size: 1.2rem !important;
    }
    
    h2, .section-header h2 {
        font-size: 1.1rem !important;
    }
    
    h3, .service-card h3 {
        font-size: 0.95rem !important;
    }
    
    p, .service-card p {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
    }
    
    /* Maximize screen usage */
    .container {
        width: 98% !important;
        padding: 0 4px !important;
    }
    
    /* Micro header */
    header .container {
        min-height: 45px !important;
        max-height: 45px !important;
    }
    
    .logo img {
        height: 35px !important;
    }
    
    #mobile-menu-button,
    #language-switcher {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 0.7rem !important;
    }
    
    /* Minimal service cards */
    .service-card {
        padding: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .service-icon {
        width: 30px !important;
        height: 30px !important;
        margin-bottom: 5px !important;
    }
    
    .service-icon i {
        font-size: 0.8rem !important;
    }
    
    /* Tiny buttons */
    .btn, a.btn {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
        min-height: 28px !important;
    }
    
    .service-card .btn {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
    }
    
    /* Fix pricing section */
    .pricing-selector-container {
        padding: 8px !important;
    }
    
    .pricing-selectors {
        padding: 8px !important;
    }
    
    .selector-group {
        margin-bottom: 6px !important;
    }
    
    .selector-group label {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    
    .service-selector {
        padding: 6px !important;
        font-size: 0.75rem !important;
    }
    
    /* Fix Qatar price overlay */
    #qatar-price-overlay h3 {
        font-size: 0.8rem !important;
    }
    
    #qatar-price-overlay span:first-child {
        font-size: 1.6rem !important;
    }
    
    /* Remove spacing where possible */
    section {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .section-header {
        margin-bottom: 1rem !important;
    }
    
    /* Fix about features */
    .about-content-wrapper,
    .about-features-wrapper {
        padding: 10px !important;
    }
    
    .about-feature {
        padding: 8px !important;
        margin-bottom: 6px !important;
    }
    
    .about-feature i {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ===== TALL PHONE OPTIMIZATIONS ===== */

/* Handle extra tall aspect ratios */
@media screen and (min-aspect-ratio: 2/3) and (max-width: 576px) {
    /* Adjust section padding for tall phones */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Add more vertical breathing room */
    .section-header {
        margin-bottom: 2rem !important;
    }
    
    /* Prevent content from being too crowded vertically */
    .services-grid,
    .about-features,
    .about-stats {
        gap: 1rem !important;
    }
    
    /* Adjust hero section for tall screens */
    .hero {
        min-height: 50vh !important;
        height: auto !important;
    }
    
    /* Improve button spacing */
    .hero-btns {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
}

/* Extreme tall phones (like iPhone 12 Pro Max, Galaxy S21 Ultra, etc.) */
@media screen and (min-aspect-ratio: 9/20) and (max-width: 576px) {
    /* Add even more vertical spacing */
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Adjust hero for very tall phones */
    .hero {
        min-height: 40vh !important;
    }
    
    /* Make the hero content centered vertically */
    .hero-content {
        margin-top: 2vh !important;
        margin-bottom: 2vh !important;
    }
    
    /* More spacing between elements */
    .services-grid,
    .about-features,
    .about-stats {
        gap: 1.5rem !important;
    }
    
    /* Add more breathing room to cards */
    .service-card {
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
    }
}

/* Fix sticky header for tall phones */
@media screen and (max-height: 900px) and (max-width: 576px) {
    header.compact {
        padding: 0.2rem 0 !important;
    }
    
    header.compact .logo img {
        height: 40px !important;
    }
}

/* Better vertical scaling for tables and lists */
@media (max-width: 576px) {
    table {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
    
    ul, ol {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }
}

/* Fix for scrolling experience */
html, body {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
}

/* Prevent horizontal scrolling on all screen sizes */
body, html {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Force proper viewport sizing */
@media (max-width: 576px) {
    .container {
        width: 92vw !important;
        max-width: 92vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Fix any potential absolute positioning */
    .hero-content,
    .pricing-card,
    .pricing-selectors,
    .modal-content {
        max-width: 92vw !important;
        width: 92vw !important;
    }
}

/* Prevent inputs from zooming in on iOS */
input, select, textarea {
    font-size: 16px !important;
}

/* Control image sizing on tall phones */
@media screen and (min-aspect-ratio: 2/3) and (max-width: 576px) {
    img, .service-icon, .logo img, .footer-logo-img {
        max-height: 75vh !important;
    }
}

/* Improve positioning of fixed elements */
.floating-whatsapp {
    position: fixed !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 50px !important;
    height: 50px !important;
    bottom: 20px !important;
    right: 20px !important;
    background-color: #25d366 !important;
    color: #FFF !important;
    border-radius: 50px !important;
    text-align: center !important;
    font-size: 22px !important;
    box-shadow: 2px 2px 3px #999 !important;
    z-index: 9999 !important;
}

@media (max-height: 700px) {
    .floating-whatsapp {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }
}

@media (max-height: 500px) {
    .floating-whatsapp {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}

/* Handle landscape mode better */
@media (max-height: 450px) and (orientation: landscape) {
    /* Optimize for landscape mode on phones */
    .hero {
        min-height: 100vh !important;
    }
    
    .hero-content {
        padding: 1rem !important;
        max-width: 600px !important;
    }
    
    .hero-content h1 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-content p {
        font-size: 0.8rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Adjust header for landscape */
    header .container {
        min-height: 50px !important;
    }
    
    .logo img {
        height: 40px !important;
    }
    
    /* Compact sections for landscape */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Viewport Responsive Units Fix */
@media (max-width: 576px) {
    :root {
        --spacing-xs: 0.5rem !important;
        --spacing-sm: 0.75rem !important;
        --spacing-md: 1rem !important;
        --spacing-lg: 1.5rem !important;
        --spacing-xl: 2.5rem !important;
    }
    
    .section-padding {
        padding-top: var(--spacing-lg) !important;
        padding-bottom: var(--spacing-lg) !important;
    }
    
    /* Adjust any fixed height elements */
    .service-card,
    .about-feature,
    .testimonial-card {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Footer spacing for tall phones */
    footer {
        padding-top: 2rem !important;
    }
    
    .footer-content {
        gap: 1.5rem !important;
    }
    
    .footer-bottom {
        padding: 1rem 0 !important;
    }
}

/* Special layout for ultra-tall phones */
@media screen and (min-height: 800px) and (max-width: 576px) {
    section {
        padding-top: 5vh !important;
        padding-bottom: 5vh !important;
    }
    
    .hero {
        min-height: 60vh !important;
    }
    
    /* Add vertical spacing between sections for better scrolling */
    .section-header {
        margin-bottom: 3vh !important;
    }
    
    .services-grid,
    .about-features,
    .about-stats {
        gap: 2vh !important;
    }
    
    /* Give footer room to breathe */
    footer {
        padding-top: 3vh !important;
    }
    
    .footer-content {
        gap: 2vh !important;
        margin-bottom: 2vh !important;
    }
}

html[dir="ltr"] #language-switcher {
    margin-right: 0;
}

/* Only apply absolute positioning on mobile */
@media (max-width: 992px) {
    /* Language switcher positioning for mobile */
    #language-switcher {
        position: absolute !important;
        z-index: 9999 !important;
        top: 50% !important; 
        transform: translateY(-50%) !important;
    }
    
    html[dir="rtl"] #language-switcher {
        left: 15px !important;
        right: auto !important;
    }
    
    html[dir="ltr"] #language-switcher {
        right: 15px !important;
        left: auto !important;
    }
}

.language-switcher span {
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    display: inline-block;
    text-transform: uppercase;
}