/* ===== GLOBAL STYLES ===== */
:root {
    /* Color Variables */
    --primary-color: #4527a0;
    --primary-light: #7953d2;
    --primary-dark: #311b92;
    --secondary-color: #ff7d00; /* Changed from #00bcd4 to orange */
    --secondary-light: #ffa040; /* Changed from #62efff to light orange */
    --secondary-dark: #c75000; /* Changed from #008ba3 to dark orange */
    --highlight-color: #ffd700; /* Gold yellow color for Nascence */
    --synonymous-color: #00A86B; /* Updated emerald green for Synonymous */
    --dark-bg: #121212;
    --dark-surface: #1e1e1e;
    --light-text: #f5f5f5;
    --gray-text: #b0b0b0;
    --dark-text: #212121;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    
    /* Spacing Variables */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Font Variables */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Other Variables */
    --border-radius: 8px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--light-text);
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 100%);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    margin-top: 19px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.highlight {
    color: var(--highlight-color); /* Gold color for Nascence */
}

.synonymous {
    color: var(--synonymous-color); /* Emerald green for Synonymous */
}

.extra-bold {
    font-weight: 900;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--gray-text);
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-heading);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(69, 39, 160, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(69, 39, 160, 0.6);
    color: var(--light-text);
}

.btn-primary .loading-spinner {
    display: none !important;
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-text);
    transform: translateY(-3px);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(18, 18, 18, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0px;
}

.logo img {
    height: 110px;
    width: auto;
}

.logo img:nth-child(2) {
    margin-left: -78px;
}

.company-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: var(--spacing-md);
}

.nav-links a {
    position: relative;
    font-weight: 500;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--secondary-color);
}

.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light-text);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    padding-top: 100px;
    isolation: isolate; /* Create stacking context */
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Fix height to viewport height */
    z-index: 1;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3; /* Increase z-index to be above animations */
    width: 100%;
    height: 100%;
}

.hero-content {
    flex: none;
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 3; /* Ensure content is above animations */
    background: linear-gradient(
        rgba(18, 18, 18, 0.5),
        rgba(18, 18, 18, 0.5)
    ); /* Make background more transparent */
    -webkit-backdrop-filter: none; /* Add webkit prefix */
    backdrop-filter: none;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
}

.hero-visual {
    flex: none;
    width: 100%;
    height: 300px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Place visual behind content */
    margin-top: var(--spacing-md);
}

.floating-elements {
    position: absolute; /* Change from fixed to absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-icon {
    opacity: 0;
    animation: float 3s ease-in-out infinite;
}

.delay-0 { animation-delay: 0s; }
.delay-2 { animation-delay: 2s; }
.delay-4 { animation-delay: 4s; }
.delay-6 { animation-delay: 6s; }

.glass-effect {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.card-glass {
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
}

/* Replace min-height: auto with min-height: 0 for Firefox compatibility */
.flex-container {
    min-height: 0;
}

/* Remove outdated webkit overflow scrolling */
.scrollable-container {
    overflow-y: auto;
}

/* Fix CSS syntax errors by adding missing brackets and semicolons */
.hero-section {
    position: relative;
    overflow: hidden;
}

.tech-stack {
    display: grid;
    gap: 2rem;
}

/* ===== STATS SECTION ===== */
.stats {
    background-color: var(--dark-surface);
    padding: var(--spacing-md) 0;
}

.stats .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: var(--spacing-sm);
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary-color);
    display: inline-block;
}

.stat-item span {
    font-size: 2rem;
    color: var(--secondary-color);
}

.stat-item p {
    color: var(--gray-text);
    font-size: 1.1rem;
}

/* ===== SERVICES SECTION ===== */
.services {
    background-color: rgba(30, 30, 46, 0.6);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: linear-gradient(145deg, #1e1e2e, #2a2a3a);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--gray-text);
}

/* ===== ABOUT SECTION ===== */
.about .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.about-content {
    flex: 1;
}

.about-visual {
    flex: 1;
}

/* ===== FOUNDER SECTION ===== */
.founder .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.founder-content {
    flex: 1;
}

.founder-image {
    flex: 1;
}

.founder-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.founder-bio h3 {
    margin-bottom: var(--spacing-sm);
}

.founder-bio p {
    margin-bottom: var(--spacing-sm);
    color: var(--gray-text);
}

.value-props {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.value-prop {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.value-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    background-color: rgba(0, 188, 212, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-text h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.value-text p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

.code-snippet {
    background-color: var(--dark-surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow-x: auto;
    overscroll-behavior: contain; /* Modern replacement for -webkit-overflow-scrolling */
}

.code-snippet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.code-snippet pre {
    width: fit-content;
    min-width: 100%;
    margin: 0;
    padding-right: var(--spacing-md);
}

.code-snippet code {
    font-family: 'Courier New', monospace;
    color: var(--light-text);
    white-space: pre;
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== CURRENT PROJECTS SECTION ===== */
.current-projects {
    background-color: var(--dark-surface);
}

.current-projects-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}


.current-project {
    position: relative;
}

.current-project-content {
    background: linear-gradient(145deg, #1e1e2e, #2a2a3a);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--card-shadow);
    min-height: 300px; /* Add a min-height to ensure consistent height */
}

.project-logo {
    width: 80px;
    height: auto;
    display: block;
    margin: var(--spacing-sm) auto;
}

.inline-logo {
    width: 70px;
    height: auto;
    margin-left: var(--spacing-sm);
    vertical-align: middle;
}

.industry-tag {
    display: inline-block;
    background-color: rgba(0, 188, 212, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
}

.results {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.result-item {
    text-align: center;
}

.result-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.result-label {
    font-size: 0.9rem;
    color: var(--gray-text);
}


/* ===== TECHNOLOGIES SECTION ===== */
.technologies {
    background: linear-gradient(135deg, #1a1a2e 0%, var(--dark-bg) 100%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
    justify-items: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--gray-text);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 100%);
}

.contact-wrapper {
    display: flex;
    gap: var(--spacing-lg);
}

.contact-form {
    flex: 2;
}

.contact-info {
    flex: 1;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--light-text);
    font-family: var(--font-body);
    transition: var(--transition);
}

/* Separate styling for select to fix Chrome contrast issues */
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--light-text);
    font-family: var(--font-body);
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    padding-right: 1.5em;
}

/* Use color-scheme property to ensure dark mode for select elements */
.form-group select {
    color-scheme: dark;
}

.form-group select option {
    background-color: #1e1e2e;
    color: var(--light-text);
}

/* Browser-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .form-group select {
        background-color: #1e1e2e !important;
        color: var(--light-text) !important;
    }
    
    .form-group select option {
        background-color: #1e1e2e !important;
        color: var(--light-text) !important;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.info-item i {
    color: var(--secondary-color);
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
    margin-top: 4px;
    flex-shrink: 0;
}

.info-item p {
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .info-item {
        gap: var(--spacing-sm);
    }
    
    .info-item i {
        font-size: 1.3rem;
        margin-top: 3px;
    }
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
}

.social-link i {
    color: var(--light-text);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    font-size: 0.8em;
    color: #888;
    margin-top: 20px;
    padding: 10px;
}

.footer {
    background-color: var(--dark-surface);
    padding-top: var(--spacing-lg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 0px;
    margin-bottom: var(--spacing-xs);
}

.footer-logo img {
    height: 110px;
    width: auto;
}

.footer-logo-container img:nth-child(2) {
    margin-left: -55px;
}

.footer-logo .company-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.footer-logo p {
    color: var(--gray-text);
    margin-top: var(--spacing-xs);
}

.footer-links {
    flex: 2;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-column h4 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
}

.footer-column ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-column ul li a {
    color: var(--gray-text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-column:first-child {
    margin-left: 30px;
}

.footer-column:nth-child(2) {
    margin-left: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-bottom p {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-bottom-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-bottom-links a {
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.counter {
    display: inline-block;
}

/* ===== GALLERY SECTION ===== */
.gallery {
    background-color: rgba(30, 30, 46, 0.6);
    position: relative;
}

.gallery-container {
    position: relative;
    padding: var(--spacing-md) 0;
}

.gallery-nav {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.gallery-nav-btn {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--light-text);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: var(--transition);
}

.gallery-nav-btn.active,
.gallery-nav-btn:hover {
    background-color: var(--secondary-color);
    color: var(--dark-text);
}

.gallery-slider {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-slides-container {
    width: 100%;
    position: relative;
}

.gallery-category {
    display: none;
    position: relative;
}

.gallery-category.active {
    display: block;
}

.gallery-slide {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    width: 100%;
}

.gallery-slide.active {
    opacity: 1;
    position: relative;
}

.gallery-item {
    width: 100%;
    max-width: 400px;
    height: 300px;
    perspective: 1000px;
    margin-bottom: var(--spacing-md);
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: var(--border-radius);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.gallery-prev,
.gallery-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 188, 212, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--light-text);
}

.gallery-prev:hover,
.gallery-next:hover {
    background-color: var(--secondary-color);
    color: var(--dark-text);
}

.gallery-dots {
    display: flex;
    gap: 8px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot.active {
    background-color: var(--secondary-color);
}

.no-items-message {
    text-align: center;
    color: var(--gray-text);
    padding: var(--spacing-md);
    font-style: italic;
    display: none;
    margin: var(--spacing-md) 0;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

/* Modal Image Viewer */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: var(--light-text);
    text-align: center;
    margin-top: var(--spacing-sm);
    font-size: 1.1rem;
    max-width: 80%;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    font-size: 2.5rem;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
}

.modal-prev,
.modal-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--light-text);
    margin: 0 var(--spacing-md);
}

.modal-prev:hover,
.modal-next:hover {
    background-color: var(--secondary-color);
    color: var(--dark-text);
}

@media (max-width: 992px) {
    .gallery-item {
        max-width: 350px;
        height: 260px;
    }
    
    .modal-close {
        top: -30px;
        right: -10px;
    }
}

@media (max-width: 768px) {
    .gallery-slider {
        max-width: 100%;
    }
    
    .gallery-item {
        max-width: 320px;
        height: 240px;
    }
    
    .modal-nav {
        position: static;
        transform: none;
        margin-top: var(--spacing-sm);
    }
    
    .modal-image {
        max-height: 70vh;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        max-width: 280px;
        height: 210px;
    }
    
    .gallery-nav-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .modal-container {
        max-width: 95%;
    }
    
    .modal-caption {
        font-size: 0.9rem;
    }
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about .container {
        flex-direction: column;
    }

    .about-content {
        margin-bottom: var(--spacing-lg);
    }

    .founder .container {
        flex-direction: column;
    }

    .founder-content {
        margin-bottom: var(--spacing-lg);
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--dark-surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-md) 0;
        /* Remove min-height: auto and use max-height instead */
        max-height: calc(100vh - 70px); /* Viewport height minus top position */
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: var(--spacing-sm) 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .stats .container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        min-width: 100%;
    }

    .particle-container,
    .floating-elements {
        height: 100%; /* Use container height on mobile */
        position: absolute; /* Change back to absolute on mobile */
    }

    .hero {
        min-height: 0; /* changed from 'auto' for Firefox compatibility */
        height: auto;
        padding-bottom: var(--spacing-lg);
    }

    .code-snippet {
        margin: 0 calc(-1 * var(--spacing-sm));
        border-radius: 0;
    }
    
    .code-snippet pre {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .code-snippet code {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-content .lead {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: var(--spacing-md) auto 0;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .hero {
        height: auto;
        padding: 120px 0 var(--spacing-lg);
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .value-props {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
