@import "tailwindcss/index.css";
@import "./components/contact-form.css";
@import "./components/blog-content.css";

@source "../views/**/*.blade.php";
@source "../**/*.js";

/* ===== CRITICAL: Force Tailwind to ONLY use class-based dark mode ===== */
/* Tell Tailwind v4 to use ONLY .dark class, NOT @media (prefers-color-scheme) */
@variant dark (.dark &);

/* ===== Custom Theme ===== */
/* Primary & Secondary colors are set dynamically from HomePageController via inline styles in :root */
/* These fallback values are used if the controller doesn't provide theme colors */
@theme {
    /* Accent Colors */
    --color-accent: #8b5cf6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Neutral Colors */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Fonts */
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-heading: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
}

/* Fallback theme colors (used if not set by controller) */
:root {
    /* Primary Colors - Blue (Default) */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af;
    --color-primary-900: #1e3a8a;

    /* Secondary Colors - Cyan (Default) */
    --color-secondary-50: #ecfeff;
    --color-secondary-100: #cffafe;
    --color-secondary-200: #a5f3fc;
    --color-secondary-300: #67e8f9;
    --color-secondary-400: #22d3ee;
    --color-secondary-500: #06b6d4;
    --color-secondary-600: #0891b2;
    --color-secondary-700: #0e7490;
    --color-secondary-800: #155e75;
    --color-secondary-900: #164e63;

    /* Light Mode Colors (Default) */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-tertiary: #f3f4f6;
    --color-text-primary: #111827;
    --color-text-secondary: #4b5563;
    --color-text-tertiary: #6b7280;
    --color-border: #e5e7eb;
    --color-card-bg: #ffffff;
    --color-footer-bg: #111827;
    --color-footer-text: #ffffff;
}

/* Dark Mode Colors */
.dark {
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #cbd5e1;
    --color-text-tertiary: #94a3b8;
    --color-border: #334155;
    --color-card-bg: #1e293b;
    --color-footer-bg: #020617;
    --color-footer-text: #f1f5f9;

    /* Adjust gray colors for dark mode */
    --color-gray-50: #1e293b;
    --color-gray-100: #334155;
    --color-gray-200: #475569;
    --color-gray-300: #64748b;
    --color-gray-400: #94a3b8;
    --color-gray-500: #cbd5e1;
    --color-gray-600: #e2e8f0;
    --color-gray-700: #f1f5f9;
    --color-gray-800: #f8fafc;
    --color-gray-900: #ffffff;
}

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-secondary);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce-soft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===== Animation Classes ===== */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

.animate-bounce-soft {
    animation: bounce-soft 2s ease-in-out infinite;
}

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* Initial state for scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== Component Styles ===== */

/* ===== Logo Responsive Styles ===== */
/* Desktop logos shown on md and above, mobile logos on smaller screens */
.header-logo-desktop {
    display: block;
}

.header-logo-mobile {
    display: none;
}

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

    .header-logo-mobile {
        display: block;
    }

    .header-logo-mobile.hidden {
        display: none;
    }

    .dark .header-logo-mobile.dark\:block {
        display: block !important;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
}

.gradient-hero {
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-secondary-600) 100%);
}

.gradient-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    background: var(--color-card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark .card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.dark .card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.card-highlight {
    position: relative;
    overflow: hidden;
}

.card-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-secondary-500));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--color-primary-700);
    border: 2px solid var(--color-primary-200);
}

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

.btn-white {
    background: white;
    color: var(--color-primary-700);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

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

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

.badge-success {
    background: #d1fae5;
    color: #047857;
}

.badge-popular {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
    color: white;
}

/* Pricing Card */
.pricing-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.popular {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: white;
    transform: scale(1.05);
    z-index: 10;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid var(--color-gray-200);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--color-primary-600);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 1.25rem;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Service Icon Container */
.service-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-secondary-100));
    color: var(--color-primary-600);
    transition: all 0.3s ease;
}

.card:hover .service-icon {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-500));
    color: white;
    transform: scale(1.1);
}

/* Process Step */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: calc(100% - 1rem);
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-300), var(--color-secondary-300));
}

.process-step:last-child::after {
    display: none;
}

/* Stats Counter */
.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, white, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

/* Gallery Grid */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    z-index: 50;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #fbbf24;
}

/* Input Styles */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    outline: none;
}

.input:focus {
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

/* Loading Spinner */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-primary-600);
    border-radius: 50%;
    animation: spin-slow 1s linear infinite;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .process-step::after {
        display: none;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* Selection Color */
::selection {
    background: var(--color-primary-200);
    color: var(--color-primary-900);
}

/* ===== Dark Mode Specific Styles ===== */

/* Section backgrounds */
.dark .bg-gray-50 {
    background-color: var(--color-bg-secondary) !important;
}

.dark .bg-white {
    background-color: var(--color-bg-primary) !important;
}

/* Text colors in dark mode */
.dark .text-gray-900 {
    color: var(--color-text-primary) !important;
}

.dark .text-gray-700 {
    color: var(--color-text-secondary) !important;
}

.dark .text-gray-600 {
    color: var(--color-text-tertiary) !important;
}

/* Section titles */
.dark .section-title {
    color: var(--color-text-primary);
}

.dark .section-subtitle {
    color: var(--color-text-tertiary);
}

/* Pricing card */
.dark .pricing-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

.dark .pricing-card.popular {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    border: none;
}

/* Pricing card text colors in dark mode (non-popular cards) */
.dark .pricing-card:not(.popular) h3.text-gray-900 {
    color: var(--color-text-primary) !important;
}

.dark .pricing-card:not(.popular) p.text-gray-600 {
    color: var(--color-text-tertiary) !important;
}

.dark .pricing-card:not(.popular) span.text-gray-900 {
    color: var(--color-text-primary) !important;
}

.dark .pricing-card:not(.popular) span.text-gray-600 {
    color: var(--color-text-tertiary) !important;
}

.dark .pricing-card:not(.popular) span.text-gray-700 {
    color: var(--color-text-secondary) !important;
}

/* Pricing card shadow adjustment for dark mode */
.dark .pricing-card.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
}

.dark .pricing-card.popular.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Testimonial card */
.dark .testimonial-card {
    background: var(--color-card-bg);
}

/* FAQ items */
.dark .faq-item {
    border-color: var(--color-border);
}

/* Input fields */
.dark .input {
    background-color: var(--color-bg-secondary);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.dark .input:focus {
    border-color: var(--color-primary-500);
}

/* Contact form card */
.dark .bg-white.rounded-2xl {
    background-color: var(--color-card-bg) !important;
}

/* Badge in dark mode */
.dark .badge-primary {
    background: var(--color-primary-900);
    color: var(--color-primary-300);
}

/* Border colors */
.dark .border-gray-200 {
    border-color: var(--color-border) !important;
}

.dark .border-gray-800 {
    border-color: var(--color-border) !important;
}

/* Transition for theme change */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease !important;
}

/* ===== Dark Mode Hero & CTA Sections ===== */

/* Hero section in dark mode */
.dark .gradient-hero {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
}

/* Wave decoration in dark mode */
.dark .gradient-hero svg path {
    fill: var(--color-bg-primary);
}

/* Floating elements in dark mode */
.dark .floating-element {
    background: var(--color-primary-500);
    opacity: 0.05;
}

/* Hero glass card in dark mode */
.dark .glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero stats in dark mode */
.dark .stat-item.glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* CTA section in dark mode */
.dark .py-20.gradient-hero {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
}

/* Ensure text is still visible in dark hero */
.dark .gradient-hero .text-white {
    color: var(--color-text-primary) !important;
}

.dark .gradient-hero .text-white\/90 {
    color: var(--color-text-secondary) !important;
}

/* Hero badge in dark mode */
.dark .gradient-hero .bg-white\/20 {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Hero subtitle color in dark mode */
.dark .gradient-hero .text-secondary-300 {
    color: var(--color-primary-400) !important;
}

/* Button adjustments in dark hero */
.dark .gradient-hero .btn-white {
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.dark .gradient-hero .btn-white:hover {
    background: var(--color-bg-tertiary);
}

.dark .gradient-hero .btn-outline-white {
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.dark .gradient-hero .btn-outline-white:hover {
    background: var(--color-card-bg);
    border-color: var(--color-primary-500);
}

/* CTA section buttons in dark mode */
.dark .py-20.gradient-hero .btn-white {
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.dark .py-20.gradient-hero .btn-outline-white {
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

/* Features strip background in dark mode */
.dark .py-12.bg-white {
    background-color: var(--color-bg-primary) !important;
}

/* Service icon in dark mode */
.dark .service-icon {
    background: linear-gradient(135deg, var(--color-primary-900), var(--color-secondary-900));
}

.dark .card:hover .service-icon {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-500));
}

/* Process step connector in dark mode */
.dark .process-step::after {
    background: linear-gradient(90deg, var(--color-primary-700), var(--color-secondary-700));
}

/* Social link buttons in dark mode */
.dark .bg-gray-200 {
    background-color: var(--color-bg-tertiary) !important;
}

.dark .bg-gray-800 {
    background-color: var(--color-bg-secondary) !important;
}

/* Contact info icon backgrounds in dark mode */
.dark .bg-primary-100 {
    background-color: var(--color-primary-900) !important;
}

/* Hover states for social icons in dark mode */
.dark .hover\:bg-primary-600:hover {
    background-color: var(--color-primary-600) !important;
}

/* Text colors adjustments for dark mode */
.dark .text-gray-400 {
    color: var(--color-text-tertiary) !important;
}

/* Ensure white text stays white in specific contexts */
.dark .text-white {
    color: #ffffff !important;
}

/* Fix for testimonial dots in dark mode */
.dark .testimonial-dot {
    background-color: var(--color-bg-tertiary);
}

.dark .testimonial-dot.active,
.dark .bg-primary-600 {
    background-color: var(--color-primary-600) !important;
}

/* ===== RTL (Right-to-Left) Support ===== */

/* Base RTL adjustments */
[dir="rtl"] {
    text-align: right;
}

/* Process step connector for RTL */
[dir="rtl"] .process-step::after {
    left: auto;
    right: calc(100% - 1rem);
    background: linear-gradient(270deg, var(--color-primary-300), var(--color-secondary-300));
}

/* Pricing card features - flip checkmark position */
[dir="rtl"] .pricing-card li {
    flex-direction: row-reverse;
}

[dir="rtl"] .pricing-card li svg {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* FAQ accordion icon position */
[dir="rtl"] .faq-question {
    flex-direction: row-reverse;
}

/* Service icon margin adjustment */
[dir="rtl"] .service-icon {
    margin-right: 0;
    margin-left: auto;
}

/* Testimonial slider for RTL */
[dir="rtl"] #testimonial-slider {
    flex-direction: row-reverse;
}

/* Scroll to top button position for RTL */
[dir="rtl"] .scroll-top {
    right: auto;
    left: 2rem;
}

/* Flex items spacing adjustments for RTL */
[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Margin utilities for RTL */
[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Padding utilities for RTL */
[dir="rtl"] .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

/* Text alignment for RTL */
[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

/* Animations for RTL - flip horizontal animations */
[dir="rtl"] .animate-fade-in-left {
    animation: fadeInRight 0.6s ease-out forwards;
}

[dir="rtl"] .animate-fade-in-right {
    animation: fadeInLeft 0.6s ease-out forwards;
}

/* Float animation stays the same */

/* Gradient text direction for RTL */
[dir="rtl"] .gradient-text {
    background: linear-gradient(225deg, var(--color-primary-600), var(--color-secondary-500));
}

/* Card highlight bar for RTL */
[dir="rtl"] .card-highlight::before {
    background: linear-gradient(270deg, var(--color-primary-500), var(--color-secondary-500));
}

/* Contact form label alignment */
[dir="rtl"] label {
    text-align: right;
}

/* Icon positioning in buttons for RTL */
[dir="rtl"] .btn svg {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Star rating direction for RTL */
[dir="rtl"] .star-rating {
    flex-direction: row-reverse;
}

/* Gallery overlay text alignment for RTL */
[dir="rtl"] .gallery-overlay {
    text-align: right;
}

/* Badge positioning adjustments for RTL */
[dir="rtl"] .badge {
    direction: rtl;
}

/* Testimonial card quote marks for RTL */
[dir="rtl"] .testimonial-card::before {
    left: auto;
    right: 1rem;
}

/* Ensure centered elements stay centered */
[dir="rtl"] .text-center {
    text-align: center;
}

[dir="rtl"] .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ===== CRITICAL: Header styles to prevent flash of unstyled content ===== */

/* Solid header - Light mode */
#header.header-solid {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.header-solid .nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
}
.header-solid .header-logo-text {
    color: #111827;
}
.header-solid .header-lang-btn,
.header-solid .header-mobile-btn {
    color: #4b5563;
}
.header-solid .theme-toggle {
    color: #6b7280;
}

/* Solid header - Dark mode */
body.dark #header.header-solid {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
body.dark .header-solid .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}
body.dark .header-solid .header-logo-text {
    color: #ffffff !important;
}
body.dark .header-solid .header-lang-btn,
body.dark .header-solid .header-mobile-btn {
    color: rgba(255, 255, 255, 0.7) !important;
}
body.dark .header-solid .theme-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Transparent header - Light text (default for dark backgrounds) */
.header-transparent .nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}
.header-transparent .header-logo-text {
    color: white;
}
.header-transparent .header-lang-btn,
.header-transparent .header-mobile-btn {
    color: white;
}
.header-transparent .theme-toggle {
    color: rgba(255, 255, 255, 0.9);
}

/* Transparent header when scrolled - Light mode */
.header-transparent.header-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.header-transparent.header-scrolled .nav-link {
    color: #374151 !important;
}
.header-transparent.header-scrolled .header-logo-text {
    color: #111827 !important;
}
.header-transparent.header-scrolled .header-lang-btn,
.header-transparent.header-scrolled .header-mobile-btn {
    color: #4b5563 !important;
}
.header-transparent.header-scrolled .theme-toggle {
    color: #6b7280 !important;
}

/* Transparent header when scrolled - Dark mode */
body.dark .header-transparent.header-scrolled {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
body.dark .header-transparent.header-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}
body.dark .header-transparent.header-scrolled .header-logo-text {
    color: #ffffff !important;
}
body.dark .header-transparent.header-scrolled .header-lang-btn,
body.dark .header-transparent.header-scrolled .header-mobile-btn {
    color: rgba(255, 255, 255, 0.7) !important;
}
body.dark .header-transparent.header-scrolled .theme-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Theme toggle icons */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
body.dark .theme-toggle .sun-icon { display: block; }
body.dark .theme-toggle .moon-icon { display: none; }

/* CTA Button */
.header-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--color-primary-600, #2563eb), var(--color-primary-700, #1d4ed8));
    color: white;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 300ms;
}
.header-cta-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-700, #1d4ed8), var(--color-primary-800, #1e40af));
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.active {
    transform: translateX(0);
}
body.dark .mobile-menu {
    background: #0f172a;
}

/* RTL Mobile menu */
[dir="rtl"] .mobile-menu {
    transform: translateX(-100%);
}
[dir="rtl"] .mobile-menu.active {
    transform: translateX(0);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--color-primary-500, #0ea5e9) 0%,
            var(--color-primary-400, #38bdf8) 50%,
            var(--color-primary-500, #0ea5e9) 100%);
    z-index: 99999;
    transition: width 0.3s ease;
    width: 0%;
    opacity: 0;
    box-shadow: 0 0 10px var(--color-primary-400, #38bdf8);
}
.progress-bar.active {
    opacity: 1;
}
.dark .progress-bar {
    background: linear-gradient(90deg,
            var(--color-primary-400, #38bdf8) 0%,
            var(--color-primary-300, #7dd3fc) 50%,
            var(--color-primary-400, #38bdf8) 100%);
    box-shadow: 0 0 10px var(--color-primary-300, #7dd3fc);
}

/* Iframe Preview Reset */
body.in-iframe section[class*="hero"],
body.in-iframe section.min-h-screen,
body.in-iframe section.gradient-hero,
body.in-iframe [class*="hero"][class*="container"] {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 10rem;
}
