/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #0066ff;
    --accent-hover: #0052cc;
    --accent-light: #4dabf7;
    --text-color: #333333;
    --text-light: #666666;
    --background-light: #f8f9fa;
    --border-color: #eaeaea;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #121212;
    --accent-color: #4dabf7;
    --accent-hover: #339af0;
    --accent-light: #74c0fc;
    --text-color: #e9ecef;
    --text-light: #adb5bd;
    --background-light: #1e1e1e;
    --border-color: #2d2d2d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.8rem;
}

h3 {
    font-size: 1.6rem;
}

p {
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}


/* (1) BUTTONS CSS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* (2) HEADER SECTION CSS - FIXED VERSION */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--secondary-color);
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
}

/* Navigation Styles */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1001;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1001;
}

.nav-list a {
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    cursor: pointer;
}

.nav-list a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    transition: var(--transition);
}

.nav-list a:hover:after {
    width: 100%;
}

/* Navigation Actions - CRITICAL FIX */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1002 !important;
}

/* Dark Mode Toggle - FIXED */
.dark-mode-toggle {
    background: var(--border-color);
    border: none;
    width: 50px;
    height: 26px;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    z-index: 1003 !important;
    pointer-events: auto !important;
}

.dark-mode-toggle i {
    font-size: 0.8rem;
    transition: var(--transition);
    z-index: 2;
}

.dark-mode-toggle .fa-moon {
    color: #f59f00;
}

.dark-mode-toggle .fa-sun {
    color: #ffd43b;
}

.dark-mode-toggle::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--secondary-color);
    border-radius: 50%;
    left: 4px;
    transition: var(--transition);
    z-index: 1;
}

[data-theme="dark"] .dark-mode-toggle {
    background: var(--accent-color);
}

[data-theme="dark"] .dark-mode-toggle::before {
    left: calc(100% - 22px);
}

/* Hamburger Menu - FIXED */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 25px;
    height: 20px;
    position: relative;
    z-index: 1003 !important;
    pointer-events: auto !important;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--secondary-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-list.active {
        right: 0;
        z-index: 1000;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list a {
        display: block;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        cursor: pointer;
    }
}

/* Ensure hero elements don't interfere with header clicks */
.hero-background,
.hero-shape,
.floating-card,
.hero-graphic {
    pointer-events: none;
    z-index: 1;
}

.hero .container {
    z-index: 2;
}

/* (3) HERO SECTION CSS */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--secondary-color);
    padding: 100px 0 50px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: 10%;
    left: 10%;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-light);
    top: 60%;
    right: 10%;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    bottom: 10%;
    left: 20%;
    animation: float 6s ease-in-out infinite;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 3;
}

.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation: float 8s ease-in-out infinite 1s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation: float 7s ease-in-out infinite 0.5s;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-color), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.floating-card:hover .card-glow {
    opacity: 0.1;
}

.hero-graphic {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
}

/* (4) SERVICES SECTION CSS */
.services {
    padding: 100px 0;
    background: var(--background-light);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--secondary-color);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-hover-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(77, 171, 247, 0.1), transparent);
    transition: left 0.6s;
}

.service-card:hover .service-hover-effect {
    left: 100%;
}

/* (5) TEMPLATES SECTION CSS */
.templates {
    padding: 100px 0;
}

.template-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-color); /* Add this line */
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-color);
    color: var(--secondary-color); /* Ensure text is white in active/hover states */
    border-color: var(--accent-color);
}

/* Dark mode specific styles for filter buttons */
[data-theme="dark"] .filter-btn {
    color: var(--text-color); /* This will be white in dark mode due to CSS variables */
    background: var(--background-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-btn.active, 
[data-theme="dark"] .filter-btn:hover {
    background: var(--accent-color);
    color: var(--secondary-color); /* White text */
    border-color: var(--accent-color);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.template-card {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.template-image {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.template-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.template-badge.free {
    background: #22c55e;
}

.template-badge.premium {
    background: #f59e0b;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.template-image:hover .template-overlay {
    opacity: 1;
}

.template-info {
    padding: 1.5rem;
}

.template-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--text-color);
}

.template-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.template-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.template-actions {
    display: flex;
    gap: 1rem;
}

.template-actions .btn {
    flex: 1;
    justify-content: center;
}

.template-image {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--background-light); /* Fallback background */
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.template-card:hover .template-image img {
    transform: scale(1.05);
}

/* (6) LIVE DEMO SECTION CSS */
.demo-section {
    padding: 100px 0;
    background: var(--background-light);
}

.demo-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.demo-sidebar {
    background: var(--background-light);
    padding: 2rem;
    border-right: 1px solid var(--border-color);
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.demo-item.active, .demo-item:hover {
    background: var(--secondary-color);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.demo-thumbnail {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 6px;
}

.demo-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.demo-badge {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 50px;
    color: var(--secondary-color);
}

.demo-badge.free {
    background: #22c55e;
}

.demo-badge.premium {
    background: #f59e0b;
}

.demo-viewer {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.demo-frame {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.demo-header {
    background: var(--background-light);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.demo-controls {
    display: flex;
    gap: 6px;
}

.demo-controls span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-controls span:nth-child(1) { background: #ff5f57; }
.demo-controls span:nth-child(2) { background: #ffbd2e; }
.demo-controls span:nth-child(3) { background: #28ca42; }

.demo-url {
    background: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-light);
    flex: 1;
}

.demo-content {
    height: 400px;
    position: relative;
    background: var(--secondary-color);
}

.demo-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.demo-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.demo-actions {
    display: flex;
    gap: 1rem;
}

.demo-actions .btn {
    flex: 1;
    justify-content: center;
}

/* (7) PORTFOLIO SECTION CSS */
.portfolio {
    padding: 100px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 250px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    position: relative;
    overflow: hidden;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-image:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay span {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* (8) ABOUT SECTION CSS */
.about {
    padding: 100px 0;
    background: var(--background-light);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.7;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.mv-item {
    background: var(--secondary-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.mv-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mv-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.mv-item p {
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
}

/* Responsive Design for About Section */
@media (max-width: 768px) {
    .about {
        padding: 60px 0;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .mv-item {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-text h2 {
        font-size: 1.8rem;
    }
    
    .mv-item {
        padding: 1.5rem 1rem;
    }
    
    .mv-item h3 {
        font-size: 1.2rem;
    }
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* (9) CONTACT SECTION CSS */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-info {
    padding: 3rem;
    background: var(--background-light);
}

.contact-info h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.contact-item p {
    margin-bottom: 0;
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form {
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--secondary-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

/* (10) FOOTER SECTION CSS */
.footer {
    background: var(--background-light);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.footer-col p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    font-size: 1.8rem;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    
    .hero .container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        height: 400px;
        margin-top: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .demo-container {
        grid-template-columns: 1fr;
    }
    
    .demo-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .demo-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .demo-item {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.4rem; }
    
    .hero {
        padding: 120px 0 50px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .floating-card {
        padding: 1rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* (11) LOGO STYLES */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    flex-shrink: 0;
    position: relative;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

/* Light mode - show dark logo, hide light logo */
.light-logo {
    display: none;
}

.dark-logo {
    display: block;
}

/* Dark mode - show light logo, hide dark logo */
[data-theme="dark"] .light-logo {
    display: block;
}

[data-theme="dark"] .dark-logo {
    display: none;
}

.logo-text {
    font-family: 'Nulshock Bold', 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: var(--transition);
}

/* Light mode gradient */
.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark mode gradient - grey, white, black */
[data-theme="dark"] .logo-text {
    background: linear-gradient(135deg, #888888, #ffffff, #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .logo {
        gap: 0.4rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 0.3rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
}

/* (12) TEMPLATE MODAL STYLES */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-container {
  position: relative;
  width: 95%;
  height: 95%;
  max-width: 1200px;
  background: var(--secondary-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--background-light);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--accent-color);
  background: var(--border-color);
}

.modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-frame-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
}

.preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.device-controls {
  display: flex;
  gap: 0.5rem;
  background: var(--background-light);
  padding: 0.5rem;
  border-radius: var(--radius);
}

.device-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.device-btn.active,
.device-btn:hover {
  background: var(--accent-color);
  color: var(--secondary-color);
  border-color: var(--accent-color);
}

.preview-actions {
  display: flex;
  gap: 1rem;
}

.preview-frame-wrapper {
  flex: 1;
  background: var(--background-light);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-frame {
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.3s ease;
}

.preview-frame.desktop {
  width: 100%;
  height: 100%;
}

.preview-frame.tablet {
  width: 768px;
  height: 90%;
}

.preview-frame.mobile {
  width: 375px;
  height: 80%;
}

.preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--secondary-color);
}

.preview-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.preview-loading p {
  color: var(--text-light);
  margin: 0;
}

/* Responsive styles for modal */
@media (max-width: 992px) {
  .modal-container {
    width: 98%;
    height: 98%;
  }
  
  .preview-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .device-controls {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .preview-frame-container {
    padding: 1rem;
  }
  
  .preview-frame.tablet,
  .preview-frame.mobile {
    width: 100%;
    height: 100%;
  }
  
  .preview-actions {
    flex-direction: column;
  }
  
  .preview-actions .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modal-header h3 {
    font-size: 1.2rem;
  }
  
  .device-controls {
    padding: 0.25rem;
  }
  
  .device-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* (13) FORM VALIDATION STYLES */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

/* Remove initial valid/invalid states */
.form-group input,
.form-group select,
.form-group textarea {
  border-color: var(--border-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
  font-weight: 500;
}

/* Only show error styles when form-group has error class */
.form-group.error .form-error {
  display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Only show success styles when form-group has success class */
.form-group.success input,
.form-group.success select,
.form-group.success textarea {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Loading state for submit button */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
}

/* (14) DOWNLOAD/PURCHASE LOADING STATES */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Template file structure indicator */
.template-file-structure {
  background: var(--background-light);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.9rem;
}

.template-file-structure h5 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.template-file-structure ul {
  list-style: none;
  padding-left: 1rem;
}

.template-file-structure li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-light);
}

.template-file-structure li::before {
  content: '📄';
  position: absolute;
  left: 0;
}

/* Fix Header Clickability */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000; /* Ensure this is high enough */
    padding: 1rem 0;
    transition: var(--transition);
}

/* Ensure hero content doesn't overlap header */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--secondary-color);
    padding: 100px 0 50px; /* This should create space for fixed header */
    margin-top: 0; /* Ensure no negative margins */
}

/* Fix z-index stacking */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Lower than header */
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2; /* Lower than header */
}

/* Ensure floating cards don't interfere */
.floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 3; /* Still lower than header */
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .hero {
        padding: 120px 0 40px; /* More padding for mobile */
    }
    
    .header {
        z-index: 1001; /* Even higher for mobile */
    }
}

/* Debug helper - Add this temporarily to test */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.1); /* Red tint for debugging */
    pointer-events: none;
    z-index: -1;
    display: none; /* Set to 'block' temporarily to see header area */
}

@media (max-width: 768px) {
  .hamburger,
  .dark-mode-toggle {
    position: relative;
    z-index: 2001;
  }
}

/* === CLICK FIX FOR HAMBURGER & THEME TOGGLE === */
.header {
  position: relative;
  z-index: 9999; /* ensure header is above hero and nav layers */
}

/* ensure nav actions (hamburger + dark toggle) are always on top */
.nav-actions {
  position: relative;
  z-index: 10000;
  pointer-events: auto;
}

/* make both buttons clickable even when overlapping blurred or fixed elements */
#hamburger,
#darkModeToggle {
  position: relative;
  z-index: 10001;
  pointer-events: auto;
}

/* prevent any invisible overlays from blocking clicks */
.nav-list,
.nav-list.active,
.header::before,
.header::after {
  pointer-events: auto;
}

/* on mobile: ensure hamburger is above the menu panel */
@media (max-width: 768px) {
  #hamburger {
    z-index: 10002;
  }

  #darkModeToggle {
    z-index: 10002;
  }
}

/* === NUCLEAR OPTION - FORCE HEADER CLICKABILITY === */
.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 80px !important; /* Fixed height */
    z-index: 2147483647 !important; /* Maximum z-index */
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    pointer-events: auto !important;
}

.header::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    pointer-events: auto !important;
    z-index: 2147483646 !important;
}

.header .container {
    position: relative !important;
    z-index: 2147483647 !important;
    pointer-events: auto !important;
}

.header * {
    pointer-events: auto !important;
    z-index: 2147483647 !important;
}

/* Specifically target the problematic elements */
.dark-mode-toggle,
.hamburger {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
    position: relative !important;
}

/* Make sure hero content stays below */
.hero {
    margin-top: 80px !important; /* Compensate for header height */
    z-index: 1 !important;
    position: relative !important;
}

.hero * {
    pointer-events: none !important;
}

.hero .container {
    pointer-events: auto !important;
}