/* General Styling */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: #f7f9fc;
    /* Clean light gray background */
    margin: 0;
    color: #333;
    line-height: 1.6;
    padding-top: 70px;
    /* space for fixed header so content isn't hidden */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1,
h2,
h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.2em;
    line-height: 1.2;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
}

/* Header Styling */
.main-header {
    background-color: var(--header-bg, #fff);
    padding: 12px 0;
    box-shadow: var(--header-shadow, 0 2px 10px rgba(0, 0, 0, 0.05));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    gap: 20px;
}

/* Group theme toggle and hamburger together on the right */
.main-header .right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0;
}

.main-header .theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    line-height: 1;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-header .theme-toggle:hover {
    background: var(--bg-tertiary, #f0f2f5);
    color: var(--primary-color, #a7f300);
}

.main-header .nav-toggle {
    background: transparent;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: none;
}

.main-header .nav-toggle:hover {
    background: var(--bg-tertiary, #f0f2f5);
    border-color: var(--primary-color, #a7f300);
}

/* Center menu and push controls to the right on desktop */
.main-header .main-nav {
    flex: 1;
}

.main-header .main-nav .nav-menu {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.main-header .header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-header .header-login {
    margin-right: 0;
}

@media (min-width: 769px) {
    .main-header .nav-toggle {
        display: none;
    }
}

/* Logo - Left Side on Desktop */
.logo {
    text-decoration: none;
    font-size: 1.8em;
    font-weight: 700;
    color: #a7f300;
    transition: color 0.3s ease;
    z-index: 1001;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo:hover {
    color: #92d900;
}

/* Navigation - Center on Desktop */
.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.main-nav li {
    margin: 0;
    position: relative;
}

/* Hide mobile login item on desktop */
.mobile-login-item {
    display: none;
}

/* Navigation Links with Underline Animation */
.main-nav a {
    text-decoration: none;
    color: var(--text-secondary, #555);
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #a7f300;
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: #a7f300;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Login Button - Right Side on Desktop */
.header-login {
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95em;
    line-height: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.desktop-login {
    display: inline-block;
}

.mobile-login-link {
    color: #a7f300 !important;
    font-weight: 700 !important;
}

/* Hamburger Toggle Button */
.nav-toggle {
    display: none;
    background: var(--bg-tertiary, #f0f2f5);
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-primary, #333);
    padding: 8px 12px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: var(--primary-color, #a7f300);
    color: var(--primary-text, #333);
    border-color: var(--primary-color, #a7f300);
}

.nav-toggle.active {
    background: var(--primary-color, #a7f300);
    color: var(--primary-text, #333);
}

.hamburger-icon {
    display: block;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.nav-toggle.active .hamburger-icon {
    transform: rotate(90deg);
}

/* Hero Section */
.hero-section {
    background-color: #fefefe;
    padding: 80px 0;
    /* border-bottom: 1px solid #eee; */
}

.hero-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
    font-size: 3.2em;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary, #fff) 0%, var(--primary-color, #a7f300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25em;
    color: var(--text-secondary, #b0b0b0);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Badge Pill */
.badge-pill {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(167, 243, 0, 0.1) 0%, rgba(167, 243, 0, 0.05) 100%);
    border: 1px solid rgba(167, 243, 0, 0.3);
    border-radius: 50px;
    color: var(--primary-color, #a7f300);
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.cta-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Modern Hero Buttons */
.btn-primary-hero,
.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary-hero {
    background: linear-gradient(135deg, #a7f300 0%, #92d900 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(167, 243, 0, 0.3);
}

.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(167, 243, 0, 0.4);
}

.btn-primary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary-hero:hover::before {
    left: 100%;
}

.btn-secondary-hero {
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    border: 2px solid var(--border-color, #3a3a3a);
}

.btn-secondary-hero:hover {
    background: var(--bg-tertiary, #3a3a3a);
    border-color: var(--primary-color, #a7f300);
    transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

/* .stat-item {
    text-align: center;
} */

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color, #a7f300);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-secondary, #b0b0b0);
    font-weight: 500;
}

input::placeholder {
    color: --text-secondary;
    opacity: 1;
}

.button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: center;
}

.button.primary {
    background-color: #a7f300;
    /* Lemon green accent */
    color: #fff;
    border: 2px solid #a7f300;
}

.button.primary:hover {
    background-color: #92d900;
    border-color: #92d900;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(167, 243, 0, 0.3);
}

.button.secondary {
    background-color: transparent;
    color: #a7f300;
    /* Lemon green accent */
    border: 2px solid #a7f300;
}

.button.secondary:hover {
    background-color: #a7f300;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(167, 243, 0, 0.2);
}

.hero-media {
    flex: 1;
    text-align: center;
    max-width: 100%;
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.hero-media img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(167, 243, 0, 0.15);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-media img:hover {
    box-shadow: 0 25px 70px rgba(167, 243, 0, 0.2);
}

/* Before/After Slider Styles */
.before-after-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(167, 243, 0, 0.15);
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.before-after-slider:hover {
    box-shadow: 0 25px 70px rgba(167, 243, 0, 0.2);
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.before-image {
    position: relative;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
}

.after-image {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.1s ease-out;
}

.image-label {
    position: absolute;
    top: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 2;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.before-image .image-label {
    right: 20px;
    z-index: 1;
}

.after-image .image-label {
    left: 20px;
    z-index: 4;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: col-resize;
    transition: left 0.1s ease-out;
}

.slider-line {
    flex: 1;
    width: 4px;
    background: linear-gradient(to bottom, transparent, #a7f300, transparent);
    box-shadow: 0 0 10px rgba(167, 243, 0, 0.5);
}

.slider-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #a7f300;
    box-shadow: 0 4px 15px rgba(167, 243, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    border: 4px solid white;
    animation: sliderPulse 2s ease-in-out infinite;
}

.slider-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(167, 243, 0, 0.7);
    animation: none;
}

.before-after-slider.is-dragging .slider-button,
.before-after-slider.has-interacted .slider-button {
    animation: none;
}

.slider-button i {
    font-size: 0.8em;
    color: #1a1a1a;
}

.slider-button .fa-chevron-left {
    margin-right: -2px;
}

.slider-button .fa-chevron-right {
    margin-left: -2px;
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    .slider-button {
        width: 40px;
        height: 40px;
    }
    
    .slider-button i {
        font-size: 0.7em;
    }
    
    .image-label {
        top: 15px;
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .before-image .image-label {
        right: 15px;
    }
    
    .after-image .image-label {
        left: 15px;
    }
}

@media (max-width: 480px) {
    .slider-button {
        width: 35px;
        height: 35px;
    }
    
    .slider-line {
        width: 3px;
    }
    
    .slider-handle {
        width: 3px;
    }
    
    .image-label {
        top: 12px;
        padding: 5px 10px;
        font-size: 0.75em;
    }
    
    .before-image .image-label {
        right: 12px;
    }
    
    .after-image .image-label {
        left: 12px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sliderPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(167, 243, 0, 0.5);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 25px rgba(167, 243, 0, 0.8), 0 0 0 8px rgba(167, 243, 0, 0.2);
    }
}

@keyframes sliderWiggle {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    25% {
        transform: translateX(-3px) scale(1.05);
    }
    75% {
        transform: translateX(3px) scale(1.05);
    }
}

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

/* Features Section */
.features-section {
    padding: 120px 0;
    background: var(--bg-primary);
    position: relative;
}

.features-section h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 70px;
    color: var(--text-primary);
    font-weight: 700;
}

.feature-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 48px 36px;
    width: 350px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(20px);
}

.feature-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover);
    border-color: rgba(167, 243, 0, 0.3);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 3.5em;
    margin-bottom: 24px;
    color: var(--primary-color);
    display: block;
    transition: all 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(167, 243, 0, 0.5));
}

.feature-card h3 {
    font-size: 1.5em;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
    text-align: center;
}

.testimonial-slider-placeholder {
    display: flex;
    /* Simple layout for placeholder, can be replaced with JS slider */
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.testimonial-item {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    max-width: 400px;
    text-align: center;
    flex: 1;
    min-width: 280px;
}

.testimonial-item p {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.testimonial-item h4 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

.note {
    font-size: 0.9em;
    color: #888;
}

.note span {
    background-color: #e6ffe6;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Footer Styling */
.main-footer {

    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 50px 0 20px;
    font-size: 0.95em;
    border-top: 1px solid var(--border-color);
}

.main-footer .container {
    display: flex;
    justify-content: center;
    /* بدل space-between */
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    text-align: center;
    /* يظبط النصوص داخل كل قسم */
}

.footer-section {
    flex: 1;
    min-width: 250px;
    text-align: center;
    /* يظبط العناوين والفقرات */
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.footer-section p,
.footer-section ul {
    color: var(--text-secondary);
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.social-icons {
    justify-content: center;
    /* يظبط أيقونات التواصل في المنتصف */
    display: flex;
}

.social-icons a {
    color: var(--text-secondary);
    font-size: 1.8em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.footer-legal {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9em;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

.footer-legal span {
    color: var(--text-secondary);
}

/* Responsive visibility helpers */
.desktop-only {
    display: none;
}

.mobile-only {
    display: block;
}

@media (min-width: 769px) {
    .desktop-only {
        display: inline-flex;
    }

    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }
}

/* RTL Support for Header Organization */
[dir="rtl"] .main-header .container {
    direction: ltr;
}

[dir="rtl"] .main-header .logo {
    order: 3;
}

[dir="rtl"] .main-header .main-nav {
    order: 2;
}

[dir="rtl"] .main-header .header-actions {
    order: 1;
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .main-header .right-controls {
    order: 4;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .badge-pill {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-media {
        margin-top: 40px;
        order: 2;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .cta-buttons {
        justify-content: center;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        padding: 14px 28px;
        font-size: 1em;
    }

    .hero-stats {
        justify-content: center;
        gap: 30px;
    }

    .stat-number {
        font-size: 2em;
    }

    .stat-label {
        font-size: 0.85em;
    }

    .features-section {
        padding: 80px 0;
    }

    .features-section h2 {
        font-size: 2.2em;
        margin-bottom: 50px;
    }

    .feature-cards {
        gap: 20px;
        padding: 0 20px;
    }

    .feature-card {
        width: 100%;
        max-width: 400px;
        padding: 40px 28px;
    }

    .feature-card i {
        font-size: 3em;
        margin-bottom: 20px;
    }

    .feature-card h3 {
        font-size: 1.35em;
    }

    .feature-card p {
        font-size: 0.9em;
    }

    .main-footer .container {
        justify-content: center;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        margin-bottom: 20px;
    }

    .footer-section ul {
        display: inline-block;
        /* For centering lists */

    }

    .social-icons {
        text-align: center;
    }

    .social-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    /* Mobile header optimizations */
    .main-header .container {
        gap: 8px !important;
    }

    .main-header .right-controls {
        gap: 6px !important;
    }

    .main-header .header-actions {
        gap: 8px !important;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .hero-content h1 {
        font-size: 2em;
        -webkit-text-fill-color: initial;
        background: none;
        color: var(--text-primary, #fff);
    }

    .hero-content p {
        font-size: 1em;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
        padding-top: 20px;
    }

    .stat-item {
        width: 100%;
    }

    .stat-number {
        font-size: 2.5em;
    }

    .features-section {
        padding: 60px 0;
    }

    .features-section h2 {
        font-size: 2em;
        margin-bottom: 40px;
    }

    /* Mobile Navigation Styles */
    .main-nav {
        position: fixed;
        top: 70px;
        right: 0;

        background-color: var(--header-bg, #fff);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
        z-index: 999;
    }

    .main-nav.active {
        max-height: 500px;
        opacity: 1;
        padding: 20px;
    }

    .main-nav .nav-menu a {
        color: var(--text-primary, #333) !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        padding: 14px 16px !important;
        display: block;
        border-radius: 8px;
    }

    .main-nav .nav-menu a:hover,
    .main-nav .nav-menu a.active {
        background-color: var(--bg-tertiary, #f0f2f5);
        color: var(--primary-color, #a7f300) !important;
    }

    .mobile-login-link {
        font-size: 1.15em !important;
    }

    /* Hide desktop login button on mobile */
    .desktop-login {
        display: none !important;
    }

    /* Show hamburger menu button */
    .nav-toggle {
        display: block !important;
        font-size: 1.3rem !important;
        padding: 7px 9px !important;
    }

    /* Prevent body scroll when menu is open */
    body.nav-open {
        overflow: hidden;
    }

    .container {
        padding: 0 16px;
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-section .container {
        flex-direction: column;
        gap: 30px;
    }

    .hero-content {
        margin-top: 50px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.4em;
    }

    .hero-content p {
        font-size: 1.05em;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .button {
        width: 100%;
        max-width: 280px;
    }

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

    .feature-cards {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .feature-card {
        width: 100%;
        padding: 25px;
        margin: 0;
    }

    .testimonial-slider-placeholder {
        flex-direction: column;
        align-items: center;
    }

    .testimonial-item {
        width: 100%;
        max-width: unset;
    }

    .main-footer .container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        width: 100%;
    }
}

@media (max-width: 600px) {
    /* Further optimize header for smaller screens */
    .main-header .container {
        gap: 6px !important;
    }

    .main-header .right-controls {
        gap: 4px !important;
    }

    .main-header .header-actions {
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 56px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.6em;
        margin-bottom: 25px;
    }

    .container {
        padding: 0 12px;
    }

    .logo {
        font-size: 1.4em;
    }

    /* Extra tight spacing for very small screens */
    .main-header .container {
        gap: 4px !important;
        padding: 8px 10px !important;
    }

    .nav-toggle {
        font-size: 1.2rem !important;
        padding: 6px 8px !important;
    }

    .hero-section {
        padding: 35px 0;
    }

    .hero-content h1 {
        font-size: 1.8em;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    .button {
        padding: 12px 24px;
        font-size: 0.95em;
        max-width: 100%;
    }

    .feature-cards {
        gap: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-card i {
        font-size: 2.5em;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: 1.3em;
        margin-bottom: 8px;
    }

    .feature-card p {
        font-size: 0.95em;
    }

    .testimonial-item {
        padding: 20px;
    }

    .testimonial-item p {
        font-size: 0.95em;
    }

    .main-footer {
        padding: 30px 0 20px;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .footer-section h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    .footer-section p,
    .footer-section li {
        font-size: 0.9em;
    }
}