/* Variables */
:root {
    --primary-color: #e67e22; /* Burnt Orange */
    --primary-dark: #d35400;
    --secondary-color: #2c3e50; /* Deep Charcoal */
    --secondary-light: #34495e;
    --text-color: #333;
    --light-text: #f4f4f4;
    --bg-light: #f9f9f9;
    --bg-dark: #1a1a1a;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

.skip-link{
    display: none!important;
}

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

html {
    scroll-behavior: smooth;
    color-scheme: light dark;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 6px;
    border: 3px solid var(--bg-light);
}

/* Dark Mode Scrollbar Overrides */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-color: var(--bg-dark);
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Placeholder in Dark Mode */
[data-theme="dark"] ::placeholder {
    color: #94a3b8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

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

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

.section {
    padding: 80px 0;
}

.highlight {
    color: var(--primary-color);
}

.gradient-text {
    background: linear-gradient(to right, var(--primary-color), #f1c40f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.scroll-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-heading);
}

header.scrolled .logo {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative; /* For active underline */
}

.nav-link i {
    display: none; /* Hide icons on desktop */
}

header.scrolled .nav-link {
    color: var(--secondary-color);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Exclude active underline for button-style link */
.nav-link.btn-primary.active::after {
    display: none;
}

.nav-link.btn-primary {
    padding: 10px 25px;
    color: var(--white) !important;
}

.nav-link.btn-primary i {
    color: var(--white) !important;
}

/* Header Menu Open State */
header.menu-open {
    background-color: var(--white);
    box-shadow: var(--shadow);
}

header.menu-open .logo {
    color: var(--secondary-color);
}

header.menu-open .bar {
    background-color: var(--secondary-color);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px auto;
    transition: var(--transition);
}

header.scrolled .bar {
    background-color: var(--secondary-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    background-color: var(--secondary-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* Hero Image */
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    z-index: 0;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.6));
    z-index: 1;
    transition: background 0.5s ease;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1.1s;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Services Section */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.bg-dark .section-title {
    color: var(--white);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #777;
    margin-top: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    margin-bottom: 25px;
}

.learn-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.learn-more:hover {
    gap: 10px;
}

/* Why Choose Us */
.bg-dark {
    background-color: var(--secondary-color);
    color: var(--white);
}

.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.text-light {
    color: var(--white);
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.benefit-icon {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background: rgba(230, 126, 34, 0.15); /* Slightly clearer background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.benefit-item:hover .benefit-icon {
    background: var(--primary-color);
}

.benefit-item:hover .benefit-icon i {
    color: var(--white);
}

.benefit-icon i {
    color: var(--primary-color);
    font-size: 1.3rem;
    transition: var(--transition);
}

.benefit-text h4 {
    margin-bottom: 5px;
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 600;
}

.benefit-text p {
    color: #ddd;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.stat-item:last-child {
    grid-column: span 2;
}

.stat-number {
    display: inline-block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* 3D Gallery */
.gallery-3d-container {
    height: 400px;
    margin: 50px auto;
    position: relative;
    perspective: 1000px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.carousel-3d {
    width: 250px;
    height: 200px;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
    top: 50px; /* Push down to center vertically */
}

.carousel-3d:hover {
    animation-play-state: paused;
}

.carousel-item-3d {
    position: absolute;
    width: 250px;
    height: 200px;
    left: 0;
    top: 0;
    border: 3px solid var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    /* Transform will be set via JS or nth-child */
    backface-visibility: hidden;
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, #0005);
}

.carousel-item-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    position: absolute;
    bottom: -50px;
    text-align: center;
    width: 100%;
    color: #777;
    font-weight: 600;
}

@keyframes rotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Adjust gallery grid when hidden */
.gallery-grid[style*="display: none"] {
    display: none !important;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid var(--white);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-content h3 {
    color: var(--white);
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 400;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    transition: 0.3s;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    border: none;
    z-index: 3001;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
    color: var(--primary-color);
}

/* Responsive 3D Gallery */
@media (max-width: 768px) {
    .gallery-3d-container {
        height: 300px;
        perspective: 800px;
    }

    .carousel-3d {
        width: 180px;
        height: 140px;
        top: 30px;
    }

    .carousel-item-3d {
        width: 180px;
        height: 140px;
    }
    
    .carousel-controls {
        bottom: -80px;
    }
}

@media (max-width: 480px) {
    .gallery-3d-container {
        height: 250px;
        perspective: 600px;
    }

    .carousel-3d {
        width: 140px;
        height: 110px;
    }

    .carousel-item-3d {
        width: 140px;
        height: 110px;
    }
}

/* Testimonials Section */
.testimonials-scroller {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.testimonials-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 15px)); } /* Adjust for gap */
}

.testimonial-card {
    width: 400px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stars {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.review-text {
    color: #ddd;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

.reviewer-info h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.reviewer-info span {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Contact Section */
.bg-light {
    background-color: var(--bg-light);
}

/* Generic Page Content */
.page-content {
    padding: 120px 0 80px;
    min-height: 80vh;
}

.page-content h1 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.page-content h2 {
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.page-content p {
    margin-bottom: 15px;
    color: #555;
}

.page-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #555;
}

.page-content li {
    margin-bottom: 10px;
}

/* Privacy Policy Contact Card */
.privacy-contact-card {
    background-color: #f8fafc;
    border-left: 5px solid var(--primary-color);
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.privacy-contact-card strong {
    font-size: 1.3rem;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 10px;
}

.privacy-contact-card p {
    margin-bottom: 8px;
    color: #555;
    font-size: 1.05rem;
}

.privacy-contact-card a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.privacy-contact-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Dark Theme Variables & Overrides */
[data-theme="dark"] {
    --bg-light: #101218;
    --bg-dark: #0a0c10;
    --text-color: #e2e8f0;
    --heading-color: #f1f5f9;
    --card-bg: #1e222b;
    --border-color: #334155;
    --input-bg: #1e222b;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    --secondary-color: #cbd5e1; /* Lighter secondary for text in dark mode */
}

/* Apply Dark Theme Backgrounds & Colors */
[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] header.scrolled,
[data-theme="dark"] header.header-solid,
[data-theme="dark"] header.menu-open {
    background-color: rgba(26, 30, 40, 0.95);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .privacy-contact-card {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .contact-wrapper {
    background-color: var(--card-bg);
}

/* Headings & Text Overrides */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] .section-title,
[data-theme="dark"] .logo,
[data-theme="dark"] header.scrolled .logo,
[data-theme="dark"] header.header-solid .logo,
[data-theme="dark"] .service-card h3,
[data-theme="dark"] .stat-number,
[data-theme="dark"] .privacy-contact-card strong {
    color: var(--heading-color);
}

[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .service-card p,
[data-theme="dark"] .privacy-contact-card p,
[data-theme="dark"] .page-content p,
[data-theme="dark"] .page-content ul {
    color: var(--text-color);
}

/* Navigation Links in Dark Mode */
[data-theme="dark"] header.scrolled .nav-link,
[data-theme="dark"] header.header-solid .nav-link,
[data-theme="dark"] header.menu-open .nav-link {
    color: var(--heading-color);
}

[data-theme="dark"] header.scrolled .nav-link:hover,
[data-theme="dark"] header.header-solid .nav-link:hover,
[data-theme="dark"] header.menu-open .nav-link:hover {
    color: var(--primary-color);
}

[data-theme="dark"] header.scrolled .bar,
[data-theme="dark"] header.header-solid .bar {
    background-color: var(--heading-color);
}

/* Inputs & Forms */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: var(--input-bg);
}

/* Specific Component Fixes */
[data-theme="dark"] .contact-form-container {
    background-color: var(--card-bg);
}

/* Fix for floating labels in Dark Mode */
[data-theme="dark"] .form-group input:focus ~ label,
[data-theme="dark"] .form-group textarea:focus ~ label,
[data-theme="dark"] .form-group select:focus ~ label,
[data-theme="dark"] .form-group input:not(:placeholder-shown) ~ label,
[data-theme="dark"] .form-group textarea:not(:placeholder-shown) ~ label,
[data-theme="dark"] .form-group select:not([value=""]):valid ~ label {
    background: var(--input-bg);
    color: var(--primary-color);
}

[data-theme="dark"] .form-group label {
    color: var(--secondary-color);
}

/* Dark Mode Form Overrides - Strict */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary-color);
}

/* Floating label mask background in dark mode */
[data-theme="dark"] .form-group input:focus ~ label,
[data-theme="dark"] .form-group textarea:focus ~ label,
[data-theme="dark"] .form-group select:focus ~ label,
[data-theme="dark"] .form-group input:not(:placeholder-shown) ~ label,
[data-theme="dark"] .form-group textarea:not(:placeholder-shown) ~ label,
[data-theme="dark"] .form-group select:not([value=""]):valid ~ label {
    background-color: var(--input-bg);
    color: var(--primary-color);
}

[data-theme="dark"] option {
    background-color: var(--input-bg);
    color: var(--text-color);
}

/* Autofill Fix for Dark Mode */
[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover, 
[data-theme="dark"] input:-webkit-autofill:focus, 
[data-theme="dark"] textarea:-webkit-autofill,
[data-theme="dark"] textarea:-webkit-autofill:hover,
[data-theme="dark"] textarea:-webkit-autofill:focus,
[data-theme="dark"] select:-webkit-autofill,
[data-theme="dark"] select:-webkit-autofill:hover,
[data-theme="dark"] select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-color);
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

[data-theme="dark"] .contact-info {
    background: #151920;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .contact-info h4,
[data-theme="dark"] .contact-info .section-title {
    color: var(--white); /* Keep white for contrast on dark panel */
}

/* 1. About Us Cards - Dark Mode */
[data-theme="dark"] .value-item {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .value-item h4 {
    color: var(--heading-color);
}

[data-theme="dark"] .value-item p {
    color: var(--text-color);
}

/* 2. Services Dialog & Contact Dialog - Dark Mode */
[data-theme="dark"] .modal {
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .modal-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-header h2 {
    color: var(--primary-color);
}

[data-theme="dark"] .close-modal {
    color: var(--text-color);
}

[data-theme="dark"] .close-modal:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
}

[data-theme="dark"] .modal-body {
    color: var(--text-color);
}

[data-theme="dark"] .modal-body p,
[data-theme="dark"] .modal-body ul li {
    color: var(--text-color);
}

/* Force Modal Dark Mode */
[data-theme="dark"] dialog.modal,
[data-theme="dark"] .modal {
    background-color: var(--card-bg) !important;
    color: var(--text-color);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-body h4 {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .modal-body p#phoneModalTitle {
    color: var(--heading-color);
}

/* 3. Why Choose Us - Dark Mode */
[data-theme="dark"] .stat-number {
    color: var(--primary-color); /* Orange in dark mode */
}

[data-theme="dark"] .stat-label {
    color: var(--heading-color);
}

/* 4. Project Section Filters - Dark Mode */
[data-theme="dark"] .filter-btn {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
    background: var(--secondary-color);
    color: var(--bg-dark); /* Dark text on light button */
    border-color: var(--secondary-color);
}

/* 5. Contact Dialog Buttons - Dark Mode */
[data-theme="dark"] #phone-modal .btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
}

[data-theme="dark"] #phone-modal .btn-primary:hover {
    background-color: var(--primary-dark);
}

/* WhatsApp button keeps its own color, but ensures text is readable */
[data-theme="dark"] #phone-modal a[href*="wa.me"] {
    color: white; 
}

/* Why Us Section - Dark Mode Adjustment */
[data-theme="dark"] .bg-dark {
    background-color: #151920; /* Slightly different to distinguish sections */
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    margin-left: 10px;
}

.theme-toggle-btn i {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s ease, filter 0.3s ease;
}

/* Icon Colors & Effects */
.theme-toggle-btn .fa-moon {
    color: #2a66c5; /* Light Blue */
    filter: drop-shadow(0 0 2px rgba(160, 196, 255, 0.5));
}

.theme-toggle-btn .fa-sun {
    color: #f1c40f; /* Bright Yellow */
    filter: drop-shadow(0 0 5px rgba(241, 196, 15, 0.6));
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Moon Icon Hover Animation (Light Mode) */
.theme-toggle-btn:hover .fa-moon {
    transform: rotate(-20deg) scale(1.2);
    filter: drop-shadow(0 0 8px rgba(160, 196, 255, 0.8));
    color: #2a66c5; /* Sky Blue on Hover */
}

/* Sun Icon Hover Animation (Dark Mode) */
.theme-toggle-btn:hover .fa-sun {
    transform: rotate(90deg) scale(1.2);
    filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.8));
    color: #f39c12; /* Deep Yellow/Orange on Hover */
}

/* Toggle Button in Scrolled/Solid Header */
header.scrolled .theme-toggle-btn,
header.header-solid .theme-toggle-btn,
header.menu-open .theme-toggle-btn {
    /* No default color override here to keep specific icon colors */
}

header.scrolled .theme-toggle-btn:hover,
header.header-solid .theme-toggle-btn:hover,
header.menu-open .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Dark Mode Toggle Button State */
[data-theme="dark"] .theme-toggle-btn {
    /* No default color override to preserve sun color */
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(253, 184, 19, 0.2);
}

/* Theme Text (Hidden on Desktop) */
.theme-text {
    display: none;
}

/* Mobile Menu Adjustment for Toggle */
@media (max-width: 768px) {
    .theme-toggle-btn {
        margin-left: 0;
        margin-top: 0;
    }

    .theme-selector {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 10px;
    }

    .theme-text {
        display: inline-block;
        margin-left: 15px;
        color: var(--secondary-color);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 1.3rem;
    }

    [data-theme="dark"] .theme-text {
        color: var(--heading-color);
    }
}

/* Mobile Menu Dark Mode Background */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-menu {
        background-color: var(--bg-dark);
        border-left: 1px solid var(--border-color);
    }
}

header.header-solid {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 10px 0;
}

header.header-solid .logo {
    color: var(--secondary-color);
}

header.header-solid .nav-link {
    color: var(--secondary-color);
}

header.header-solid .nav-link:hover,
header.header-solid .nav-link.active {
    color: var(--primary-color);
}

header.header-solid .bar {
    background-color: var(--secondary-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* The "nice border" effect */
    border-radius: 20px;
    overflow: hidden;
}

.contact-info {
    background: var(--secondary-color);
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info .section-title {
    color: #fff;
    text-align: left;
    margin-bottom: 15px;
}

.contact-info .section-title::after {
    left: 0;
    transform: none;
    background: var(--primary-color);
}

.contact-info > p {
    margin-bottom: 30px;
    color: #e2e8f0;
    font-size: 1.05rem;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.contact-info li:hover {
    transform: translateX(10px);
}

.contact-info i {
    color: var(--primary-color); /* Pop color against dark bg */
    font-size: 1.4rem;
    margin-right: 20px;
    width: 30px;
    text-align: center;
}

.contact-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.contact-info p, .contact-info a {
    margin: 0;
    color: #cbd5e0;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--primary-color);
}

.contact-form-container {
    background: #fff;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    justify-content: center;
}

.form-group {
    position: relative;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff; /* White bg to match container and avoid label clipping issues */
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 13px;
    color: #94a3b8;
    transition: 0.3s ease all;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
}

/* Floating Label Logic */
.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group select:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label,
.form-group select:not([value=""]):valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: #fff; /* Mask line behind label */
    font-weight: 500;
    border-radius: 4px;
}

/* Fix for Select placeholder */
.form-group select:required:invalid + label {
    display: block;
}
.form-group select option[value=""][disabled] {
    display: none;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding: 30px;
    }
    
    .contact-form-container {
        padding: 30px;
    }
}

/* Footer */
footer {
    background-color: #111;
    color: #ccc;
    padding-top: 70px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

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

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

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

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

.footer-bottom {
    background: #000;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 10px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    overflow: hidden; /* Ensure rounded corners work */
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Modal Animation */
dialog[open] {
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

dialog[open]::backdrop {
    animation: fadeIn 0.3s ease-out;
}

dialog.modal-closing {
    animation: zoomOut 0.3s ease-in forwards;
}

dialog.modal-closing::backdrop {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal Content */
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    background: var(--white);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
    line-height: 1;
    transition: var(--transition);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.modal-body h2 {
    display: none; /* Hide duplicate title if injected in body */
}

.modal-body p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.7;
}

.modal-body ul {
    margin-bottom: 20px;
    margin-left: 20px;
    list-style: disc;
}

.modal-body ul li {
    margin-bottom: 10px;
    color: #555;
}

/* Modal Typography - Make subtitles and bold text pop */
.modal-body h4,
.modal-body strong {
    color: var(--primary-color);
}

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

.pulse-effect {
    animation: pulse 2s infinite;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 126, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .why-us-content {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--secondary-color);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--secondary-color);
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 100%;
        height: calc(100vh - 100%); /* Fill remaining height */
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start; /* Align to top */
        align-items: flex-start; /* Align to left */
        padding-top: 50px;
        padding-left: 40px;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        color: var(--secondary-color);
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px;
        border-radius: 5px;
        width: 100%;
    }

    .nav-link i {
        display: inline-block;
        width: 25px;
        text-align: center;
        color: var(--primary-color);
    }

    .nav-link.active {
        background-color: rgba(230, 126, 34, 0.1);
        color: var(--primary-color);
    }

    .nav-link.active::after {
        display: none;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: -20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 150px;
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 600;
}

.about-bio {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-content .section-title::after {
    left: 0;
    transform: none;
}

.values-grid {
    display: grid;
    gap: 20px;
}

.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 15px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

.value-icon {
    width: 50px;
    height: 50px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-icon i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.value-item h4 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.value-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

@media (max-width: 992px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: -1;
    }
    
    .experience-badge {
        right: 20px;
    }
}

/* Hero Section - Dark Mode */
[data-theme="dark"] #hero {
    background-color: #0b0d10;
}

[data-theme="dark"] #hero::after {
    opacity: 0.3;
}

[data-theme="dark"] #hero::before {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
}



/* Shiny Text Animation - Gradient Clip Method */
@keyframes textShine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Base Shine Effect (White Text) */
.logo, 
footer .logo {
    position: relative;
    /* Define the gradient: Base color -> White Shine -> Base color */
    background: linear-gradient(
        to right,
        var(--white) 0%,
        var(--white) 40%,
        #ffffff 50%,
        var(--white) 60%,
        var(--white) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 4s infinite linear;
    /* Ensure fallback color if clip fails */
    color: var(--white); 
}

.hero-title {
    position: relative;
    /* Define the gradient: Base color -> White Shine -> Base color */
    background: linear-gradient(
        to right,
        var(--white) 0%,
        var(--white) 40%,
        #ffffff 50%,
        var(--white) 60%,
        var(--white) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Combine fade in animation with shine animation */
    animation: fadeInUp 1s forwards 0.5s, textShine 4s infinite linear;
    /* Ensure fallback color if clip fails */
    color: var(--white); 
}

/* Highlight/Orange Text Shine */
.logo .highlight,
.hero-title .gradient-text {
    background: linear-gradient(
        to right,
        var(--primary-color) 0%,
        var(--primary-color) 40%,
        #ffeaa7 50%,
        var(--primary-color) 60%,
        var(--primary-color) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 4s infinite linear;
}

/* Scrolled Header / Menu Open / Solid Header - Logo becomes dark */
header.scrolled .logo,
header.menu-open .logo,
header.header-solid .logo {
    background: linear-gradient(
        to right,
        var(--secondary-color) 0%,
        var(--secondary-color) 40%,
        #5e6d7e 50%,
        var(--secondary-color) 60%,
        var(--secondary-color) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Maintain Orange highlight in scrolled/open header */
header.scrolled .logo .highlight,
header.menu-open .logo .highlight,
header.header-solid .logo .highlight {
    /* Same as default highlight but ensuring specificity */
    background: linear-gradient(
        to right,
        var(--primary-color) 0%,
        var(--primary-color) 40%,
        #ffeaa7 50%,
        var(--primary-color) 60%,
        var(--primary-color) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer Logo specific styling */
footer .logo {
    display: inline-block;
    margin-bottom: 20px;
}

/* Full Screen Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-container.active {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.loader-content p {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: #2ecc71;
    display: none;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Dark Mode Modal Fixes - Explicit Overrides */
[data-theme="dark"] .modal,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-header {
    background-color: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-body h4 {
    color: var(--primary-color); /* Make subtitles pop */
}

[data-theme="dark"] .modal-body strong {
    color: var(--primary-color);
}

[data-theme="dark"] .modal-body ul li {
    color: var(--text-color);
}

