/* Small tweaks to improve cropping behavior on tight viewports */
@media (max-width: 768px) {
    .card {
        box-sizing: border-box;
        margin: 0 auto;
        max-width: 720px;
    }

    /* Favor the top of the image for services visuals (less likely to cut off key content) */
    .card-img img {
        object-position: center top !important;
    }
}
@media (min-width: 1024px) {
    .header-container-2099 {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 15px 40px 15px 20px;
    }
    .logo-2099 {
        margin-right: 40px;
    }
    .nav-2099 {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        background: none !important;
        backdrop-filter: none !important;
        border-left: none !important;
        transition: none !important;
        margin-left: 0 !important;
    }
}


/* Gallery items should be fully responsive - no fixed pixel widths */
.gallery-item img {
    /* Use responsive aspect ratio for gallery images */
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
    background: rgba(0, 245, 255, 0.05);
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .gallery-item img {
        aspect-ratio: auto;
        height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center;
        max-height: none;
        box-sizing: border-box;
    }
}
/* === Motiva Gallery Styles === */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #0ff;
    border: none;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 8px #00ffff55 ;
}

.filter-btn:hover {
    background-color: #00cccc;
    color: #fff;
}

.filter-btn.active {
    background-color: #00cccc;
    color: #fff;
    box-shadow: 0 0 15px #00ffff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    justify-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* === MAIN GALLERY CONTAINER === */
.gallery-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* === GALLERY SECTION WRAPPER === */
.gallery-section {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    box-sizing: border-box;
}

/* Ensure all sections use the same responsive grid */
#activities-section.gallery-section,
#branding-section.gallery-section,
#cars-section.gallery-section,
#food-section.gallery-section,
#logos-section.gallery-section,
#teachers-section.gallery-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

#all-section.gallery-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* === GALLERY SECTION TITLE === */
.gallery-section-title {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffff;
    margin: 0;
    padding: 20px 0 10px 0;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #00ffff88;
    box-sizing: border-box;
}

/* === GALLERY ITEM === */
.gallery-item {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    transform: scale(1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

/* === GALLERY ITEM IMAGE === */
.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-item:hover {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: scale(1.02);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* === FILTER BUTTONS === */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.filter-btn {
    background-color: #0ff;
    border: none;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 8px #00ffff55;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: #00cccc;
    color: #fff;
}

.filter-btn.active {
    background-color: #00cccc;
    color: #fff;
    box-shadow: 0 0 15px #00ffff;
}

/* === MOBILE RESPONSIVE - TABLETS (768px and below) === */
@media (max-width: 768px) {
    .gallery-grid {
        gap: 30px;
        padding: 15px;
    }

    .gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    #all-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 1 / 1;
        min-height: 160px;
    }

    .gallery-section-title {
        font-size: 1.2rem;
        padding: 15px 0 8px 0;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

/* === MOBILE RESPONSIVE - PHONES (600px and below) === */
@media (max-width: 600px) {
    .gallery-grid {
        gap: 20px;
        padding: 10px;
    }

    .gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    #all-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    .gallery-item {
        aspect-ratio: 1 / 1;
        min-height: 130px;
    }

    .gallery-section-title {
        font-size: 1rem;
        padding: 12px 0 6px 0;
        margin: 10px 0 0 0;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* === SMALL PHONES (400px and below) === */
@media (max-width: 400px) {
    .gallery-grid {
        gap: 15px;
        padding: 8px;
    }

    .gallery-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #all-section.gallery-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item {
        aspect-ratio: 1 / 1;
        min-height: 110px;
    }

    .gallery-section-title {
        font-size: 0.95rem;
        padding: 10px 0 5px 0;
    }

    .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* 3000 Quantum Theme - Ultra Premium Enhancement */
:root {
    /* 3000 Quantum Color Palette */
    --quantum-blue: #00f5ff;
    --quantum-purple: #8b5cf6;
    --quantum-pink: #ff006e;
    --quantum-cyan: #00d9ff;
    --quantum-gold: #ffd700;
    --quantum-silver: #c0c0c0;
    --quantum-black: #000011;
    --quantum-dark: #0a0a1a;
    --quantum-glass: rgba(255, 255, 255, 0.05);
    
    /* 3000 Advanced Gradients */
    --quantum-gradient-1: linear-gradient(135deg, 
        var(--quantum-blue), 
        var(--quantum-purple), 
        var(--quantum-pink));
    --quantum-gradient-2: conic-gradient(
        from 0deg,
        var(--quantum-blue),
        var(--quantum-cyan),
        var(--quantum-gold),
        var(--quantum-pink),
        var(--quantum-purple),
        var(--quantum-blue));
    --quantum-gradient-3: radial-gradient(
        circle at 30% 70%,
        var(--quantum-blue) 0%,
        transparent 50%);
    
    /* 3000 Advanced Shadows */
    --quantum-glow: 0 0 30px var(--quantum-blue),
                   0 0 60px var(--quantum-blue),
                   0 0 90px var(--quantum-blue);
    --quantum-shadow: 0 20px 40px rgba(0, 245, 255, 0.3);
    --quantum-inner: inset 0 0 20px rgba(0, 245, 255, 0.1);
    
    /* 3000 Typography */
    --font-primary: 'Orbitron', 'Tajawal', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-bold: 700;
    --font-weight-black: 900;
}

/* 3000 Enhanced Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent inline spacing issues */
}

/* Specific Image Handling */
.logo-2099 img,
.footer-widget .logo {
    object-fit: contain; /* Preserve logo proportions */
}

body {
    font-family: var(--font-primary);
    background: var(--quantum-black);
    color: var(--quantum-blue);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 100px; /* Account for fixed navbar height */
}

/* 3000 Quantum Background */
.bg-2099 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-2099::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Elegant modern gradient */
    background: linear-gradient(135deg, #071026 0%, #0a1a2e 35%, #091427 70%, #020617 100%);
    /* keep static to remain performant */
    animation: none !important;
}

.bg-2099::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.01) 0%, rgba(0,0,0,0.25) 100%);
    animation: none !important; /* disable scanlines to reduce CPU usage */
}

@keyframes quantum-shift {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.2); }
}

/* Hide neon elements and canvas for a professional look and better performance */
.neon-grid, .hologram-overlay, .ai-overlay, .ai-bg-canvas { display: none !important; }

/* Matrix Code Rain */
.matrix-code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.matrix-code-rain::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.1) 2px,
        rgba(0, 255, 0, 0.1) 4px
    );
    animation: matrix-fall 10s linear infinite;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Floating Orbs */
.floating-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-orbs::before,
.floating-orbs::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.5), transparent);
    border-radius: 50%;
    animation: float-orb 8s ease-in-out infinite;
}

.floating-orbs::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-orbs::after {
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float-orb {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-50px) scale(1.2); opacity: 1; }
}

/* Holographic Effects */
.holographic-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: hologram-flicker 5s ease-in-out infinite;
}

@keyframes hologram-flicker {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Ensure rotating box animations are off on very small screens to save CPU */
/* The rotating box animation is enabled on all screens; if performance concerns arise, reduce animation speed instead.
   If user prefers to disable, they can set `document.documentElement.dataset.effects = 'false'` or adjust via CSS. */

/* Make 'card-img' enforce a landscape aspect ratio for services */
.card-img { aspect-ratio: 16/9; height: auto; min-height: 160px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

@keyframes scanlines {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* 3000 Enhanced Container */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3000 Ultra Header - Fixed Navbar */
.header-2099 {
    background: rgba(0, 0, 17, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 245, 255, 0.2);
}

.header-2099::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--quantum-gradient-1);
    animation: quantum-pulse 3s ease-in-out infinite;
}

.header-container-2099 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-2099 {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.logo-2099 img {
    height: 60px;
    margin-left: 15px;
    filter: drop-shadow(0 0 15px var(--quantum-blue));
    transition: all 0.3s ease;
    animation: quantum-float 3s ease-in-out infinite;
}

.logo-glow {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: var(--font-weight-black);
    background: var(--quantum-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: quantum-text 4s ease-in-out infinite;
}

@keyframes quantum-float {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-5px) rotateY(180deg); }
}

@keyframes quantum-text {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(360deg); }
}

/* 3000 Navigation */
.nav-2099 ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--quantum-blue);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    font-size: 16px;
    position: relative;
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;

    transition: left 0.5s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    background-color: white;
    filter: drop-shadow(0 0 30px #00f5ff) drop-shadow(0 0 60px #8b5cf6);
    color: var(--quantum-black);
    transform: translateY(-2px);
    box-shadow: var(--quantum-glow);
}

/* 3000 Ultra Hero */
.hero-2099 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
    background: 
        radial-gradient(ellipse at center, rgba(0, 245, 255, 0.1) 0%, transparent 70%),
        linear-gradient(135deg, transparent 40%, rgba(139, 92, 246, 0.1) 100%);
}

.hero-content-2099 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

 /* 3000 Enhanced 3D Box - Fixed Display */

.rotating-box-container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--quantum-gradient-2);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: quantum-rotate 20s linear infinite;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes quantum-rotate {
    0% { transform: translateY(-50%) rotate(0deg) scale(1); }
    100% { transform: translateY(-50%) rotate(360deg) scale(1.2); }
}

.rotating-box {
    width: 400px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    animation: quantum-3d 15s infinite linear;
    margin: 0 auto;
}

.rotating-box:hover {
    animation-play-state: paused;
    transform: scale(1.05);
}

.box-face {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 2px solid transparent;
    background: var(--quantum-glass);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.box-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-1);
    opacity: 0.1;
    animation: quantum-shimmer 3s ease-in-out infinite;
}

@keyframes quantum-shimmer {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.box-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.3) contrast(1.2) saturate(1.5);
    transition: all 0.3s ease;
}

    .front {
        transform: translateZ(200px);
        border-image: var(--quantum-gradient-1) 1;
    }
    .back {
        transform: rotateY(180deg) translateZ(200px);
        border-image: var(--quantum-gradient-2) 1;
    }
    .right {
        transform: rotateY(90deg) translateZ(200px);
        border-image: linear-gradient(90deg, var(--quantum-cyan), var(--quantum-pink)) 1;
    }
    .left {
        transform: rotateY(-90deg) translateZ(200px);
        border-image: linear-gradient(90deg, var(--quantum-pink), var(--quantum-cyan)) 1;
    }
    .top {
        transform: rotateX(90deg) translateZ(200px);
        border-image: linear-gradient(180deg, var(--quantum-blue), var(--quantum-gold)) 1;
    }
    .bottom {
        transform: rotateX(-90deg) translateZ(200px);
        border-image: linear-gradient(180deg, var(--quantum-gold), var(--quantum-blue)) 1;
    }

@keyframes quantum-3d {
    0% { transform: rotateX(15deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(15deg) rotateY(360deg) rotateZ(0deg); }
}

/* 3000 Hero Text */
.hero-text-2099 {
    text-align: right;
    position: relative;
}

.hero1 {
    font-size: 3.5rem;
    font-weight: var(--font-weight-black);
    line-height: 1.2;
    margin-bottom: 40px;
    background: var(--quantum-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: quantum-typing 3s ease-in-out infinite alternate;
}

.A {
    display: inline-block;
    position: relative;
    background: var(--quantum-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: quantum-glow 2s ease-in-out infinite;
}

@keyframes quantum-typing {
    0% { text-shadow: 0 0 20px rgba(0, 245, 255, 0.5); }
    100% { text-shadow: 0 0 40px rgba(0, 245, 255, 1); }
}

@keyframes quantum-glow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 10px var(--quantum-blue)); }
    50% { filter: brightness(1.5) drop-shadow(0 0 20px var(--quantum-blue)); }
}

.btn-2099 {
    display: inline-block;
    padding: 20px 50px;
    background: var(--quantum-gradient-1);
    color: var(--quantum-black);
    text-decoration: none;
    font-weight: var(--font-weight-black);
    font-size: 1.3rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--quantum-glow);
    border: none;
    cursor: pointer;
}

.btn-2099::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-2099:hover::before {
    width: 300px;
    height: 300px;
}

.btn-2099:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 0 50px var(--quantum-blue), 0 0 100px var(--quantum-blue);
}

/* 3000 Enhanced Services */
.services {
    padding: 120px 0;
    background: 
        linear-gradient(135deg, rgba(0, 0, 17, 0.9) 0%, rgba(0, 0, 17, 0.7) 100%),
        radial-gradient(ellipse at top right, rgba(0, 245, 255, 0.1) 0%, transparent 50%);
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.services1 {
    width: 100%;
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: var(--font-weight-black);
    background: var(--quantum-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: quantum-pulse 3s ease-in-out infinite;
}

.services1::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 4px;
    background: var(--quantum-gradient-1);
    border-radius: 2px;
    animation: quantum-expand 2s ease-in-out infinite;
}

@keyframes quantum-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.3); }
}

@keyframes quantum-expand {
    0%, 100% { width: 200px; opacity: 1; }
    50% { width: 300px; opacity: 0.7; }
}

.cards {
   
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 60px;
    padding: 60px 40px;
}

.card {
    width: 100%;
    background: var(--quantum-glass);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.5s ease;
    transform: perspective(1000px) rotateX(0deg);
}

/* Service-specific card fine tuning */
.service-card {
    min-height: 360px;
    display:flex; flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.04));
    border: 1px solid rgba(255,255,255,0.04);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-1);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 0.1;
}

.card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-20px);
    box-shadow: var(--quantum-shadow), var(--quantum-glow);
    border-color: var(--quantum-blue);
}

.card-img {
    /* prefer aspect ratio for landscape look; min-height ensures visibility */
    aspect-ratio: 16 / 9;
    min-height: 220px;
    height: auto;
    overflow: hidden;
    position: relative;
}

.card-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.card-img-overlay::before {
    content: '';
    position: absolute; inset:0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
    opacity: 0.28;
}

.card-img .card-icon {
    position: relative; z-index: 2; pointer-events: none;
    width: 64px; height: 64px; border-radius: 12px;
    background: rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center;
    box-shadow: 0 3px 18px rgba(0,0,0,0.3);
}

.card-img .card-icon i { font-size: 1.4rem; color: #fff; }

.btn-2099.btn-small {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 12px;
    margin-top: 14px;
}

.card-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-3);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card:hover .card-img::after {
    opacity: 0.3;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(1.1) contrast(1.2);
}

.card:hover .card-img img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.3) contrast(1.4) saturate(1.3);
}

.card-body {
    padding: 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}



.card-body .card-icon {
    font-size: 4rem;
    color: var(--quantum-blue);
    margin-bottom: 30px;
    text-shadow: var(--quantum-glow);
    animation: quantum-icon 3s ease-in-out infinite;
}

@keyframes quantum-icon {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* 3000 Enhanced Video Section */
.video-container {
    padding: 120px 0;
    background: 
        linear-gradient(135deg, rgba(0, 0, 17, 0.9) 0%, rgba(0, 0, 17, 0.7) 100%),
        radial-gradient(ellipse at bottom left, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.video-wrapper {
    background: var(--quantum-glass);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-1);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.video-wrapper:hover::before {
    opacity: 0.1;
}

.video-wrapper:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--quantum-shadow), var(--quantum-glow);
}

video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: contain;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 17, 0.7);
}
@media (max-width: 600px) {
    video {
        aspect-ratio: auto;
        width: 100%;
        height: auto;
        max-height: 350px;
    }
}



/* 3000 Enhanced Form */
.container2-2099 {
    max-width: 800px;
    margin: 120px auto;
    background: var(--quantum-glass);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50px;
    padding: 80px;
    backdrop-filter: blur(30px);
    box-shadow: var(--quantum-shadow);
    position: relative;
    overflow: hidden;
}

.container2-2099::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--quantum-gradient-2);
    opacity: 0.05;
    animation: quantum-rotate 30s linear infinite;
}

.heading-2099 {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: var(--font-weight-black);
    text-align: center;
    margin-bottom: 60px;
    background: var(--quantum-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

#survey-form-2099 label {
    display: block;
    margin: 30px 0 15px;
    font-weight: var(--font-weight-bold);
    color: var(--quantum-blue);
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--quantum-blue);
    position: relative;
    z-index: 2;
}

#survey-form-2099 input,
#survey-form-2099 select,
#survey-form-2099 textarea {
    width: 100%;
    padding: 20px;
    margin-bottom: 30px;
    background: rgba(0, 245, 255, 0.05);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    color: var(--quantum-blue);
    font-size: 1.1rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

#survey-form-2099 input:focus,
#survey-form-2099 select:focus,
#survey-form-2099 textarea:focus {
    outline: none;
    border-color: var(--quantum-blue);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    background: rgba(0, 245, 255, 0.1);
}

#survey-form-2099 button {
    width: 100%;
    padding: 25px;
    background: var(--quantum-gradient-1);
    color: var(--quantum-black);
    border: none;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: var(--font-weight-black);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

#survey-form-2099 button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

#survey-form-2099 button:hover::before {
    left: 100%;
}

#survey-form-2099 button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--quantum-glow);
}

/* 3000 Enhanced Sections */
.custom-section-2099 {
    padding: 120px 0;
    margin: 80px 0;
    background: var(--quantum-glass);
    border-radius: 50px;
    border: 1px solid rgba(0, 245, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.custom-section-2099::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-3);
    opacity: 0.1;
    animation: quantum-shift 15s ease-in-out infinite;
}

.section-title-2099,
.section-title1-2099 {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: var(--font-weight-black);
    text-align: center;
    margin-bottom: 60px;
    background: var(--quantum-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.section-description-2099 {
    font-size: 1.5rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--quantum-blue);
    position: relative;
    z-index: 2;
}

.faq-item-2099 {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 30px;
    padding: 50px;
    margin: 30px 0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.faq-item-2099:hover {
    transform: translateX(20px);
    box-shadow: var(--quantum-glow);
    background: rgba(0, 245, 255, 0.1);
}

.faq-question-2099 {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--quantum-blue);
    margin-bottom: 25px;
    text-shadow: 0 0 15px var(--quantum-blue);
}

.faq-answer-2099 {
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(0, 245, 255, 0.9);
}

/* 3000 Ultra Footer */
.footer-2099 {
    background: rgba(0, 0, 17, 0.95);
    border-top: 1px solid rgba(0, 245, 255, 0.3);
    padding: 100px 0 50px;
    margin-top: 120px;
    position: relative;
    overflow: hidden;
}

.footer-2099::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--quantum-gradient-1);
    animation: quantum-pulse 3s ease-in-out infinite;
}

.container1-2099 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.wrapper-2099 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 80px;
}

.footer-widget-2099 {
    text-align: center;
    position: relative;
}

.footer-widget-2099 .logo {
    height: 100px;
    filter: drop-shadow(0 0 20px var(--quantum-blue));
    transition: all 0.4s ease;
}

.footer-widget-2099 .logo:hover {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 30px var(--quantum-blue));
}

.pfooter-2099 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: var(--font-weight-black);
    color: var(--quantum-blue);
    margin: 30px 0;
    text-shadow: 0 0 20px var(--quantum-blue);
}

.socials-2099 {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.socials-2099 li {
    list-style: none;
}

.socials-2099 a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 50%;
    color: var(--quantum-blue);
    font-size: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.socials-2099 a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--quantum-gradient-1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.socials-2099 a:hover::before {
    width: 100px;
    height: 100px;
}

.socials-2099 a:hover {
    color: var(--quantum-black);
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--quantum-glow);
}

/* 3000 Enhanced 3D Box - Ultra 3D Effects */
.rotating-box-container {
    perspective: 1500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.rotating-box-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: var(--quantum-gradient-2);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: quantum-rotate 20s linear infinite;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.enhanced-3d-box {
    width: 400px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    animation: quantum-3d 20s infinite linear;
    margin: 0 auto;
    filter: drop-shadow(0 0 50px rgba(0, 245, 255, 0.5));
}

.enhanced-3d-box:hover {
    animation-play-state: paused;
    transform: scale(1.1);
    filter: drop-shadow(0 0 80px rgba(0, 245, 255, 0.8));
}

.box-face {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 3px solid transparent;
    background: var(--quantum-glass);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 
        0 0 20px rgba(0, 245, 255, 0.3),
        inset 0 0 20px rgba(0, 245, 255, 0.1);
}

.box-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-1);
    opacity: 0.2;
    animation: quantum-shimmer 2s ease-in-out infinite;
}

.box-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.4) contrast(1.3) saturate(1.6);
    transition: all 0.5s ease;
}

.box-face:hover img {
    transform: scale(1.1);
    filter: brightness(1.6) contrast(1.5) saturate(1.8);
}

/* Enhanced 3D Box with Overlays */
.box-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 245, 255, 0.1), rgba(139, 92, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.box-face:hover .box-overlay {
    opacity: 1;
}

.box-text {
    color: var(--quantum-blue);
    font-size: 2rem;
    font-weight: var(--font-weight-black);
    text-shadow: 0 0 20px var(--quantum-blue);
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.box-face:hover .box-text {
    transform: translateY(0);
}

/* Box Particles Effect */
.box-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.box-particles::before,
.box-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--quantum-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--quantum-blue);
    animation: float-particles 3s ease-in-out infinite;
}

.box-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.box-particles::after {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

@keyframes float-particles {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1.5);
        opacity: 0.5;
    }
}

    .front { 
        transform: translateZ(200px); 
        border-image: var(--quantum-gradient-1) 1;
    }
    .back { 
        transform: rotateY(180deg) translateZ(200px); 
        border-image: var(--quantum-gradient-2) 1;
    }
    .right { 
        transform: rotateY(90deg) translateZ(200px); 
        border-image: linear-gradient(90deg, var(--quantum-cyan), var(--quantum-pink)) 1;
    }
    .left { 
        transform: rotateY(-90deg) translateZ(200px); 
        border-image: linear-gradient(90deg, var(--quantum-pink), var(--quantum-cyan)) 1;
    }
    .top { 
        transform: rotateX(90deg) translateZ(200px); 
        border-image: linear-gradient(180deg, var(--quantum-blue), var(--quantum-gold)) 1;
    }
    .bottom { 
        transform: rotateX(-90deg) translateZ(200px); 
        border-image: linear-gradient(180deg, var(--quantum-gold), var(--quantum-blue)) 1;
    }

@keyframes quantum-3d {
    0% { transform: rotateX(20deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(20deg) rotateY(360deg) rotateZ(0deg); }
}

/* Typewriter Animation Container */
.typewriter-container {
    display: inline-block;
    position: relative;
}

.typewriter-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--quantum-blue);
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--quantum-blue); }
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--quantum-blue);
    animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* 3000 Responsive Fixes - Small Screens */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        min-height: 100vh;
    }
    
    .hero-2099 {
        min-height: 100vh;
        padding: 80px 0 40px;
        overflow-y: auto;
    }
    
    .hero-content-2099 {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
        padding: 0 20px;
    }
    
    .rotating-box-container {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .rotating-box {
        width: 280px;
        height: 280px;
    }
    
    .box-face {
        width: 280px;
        height: 280px;
    }
    
    .front, .back { transform: translateZ(140px); }
    .right, .left { transform: rotateY(90deg) translateZ(140px); }
    .top, .bottom { transform: rotateX(90deg) translateZ(140px); }
    
    .hero1 {
        font-size: 1.8rem;
        white-space: normal;
        animation: none;
        border-right: none;
    }
    
    .btn-2099 {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    /* Gallery fixes for small screens */
    .slider-2099 {
        height: 300px;
        border-radius: 15px;
    }
    
    .item-2099 {
        width: 100%;
        height: 300px;
    }
    
    .item-2099 img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Mobile Navigation Fixes */
    .nav-2099 {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 17, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(0, 245, 255, 0.3);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        padding-top: 80px;
    }
    
    .nav-2099.mobile-active {
        right: 0;
        transform: none;
    }
    
    .nav-2099 ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 0;
        width: 100%;
    }
    
    .nav-2099 li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    }
    
    .nav-link {
        display: block;
        padding: 20px;
        font-size: 18px;
        width: 100%;
        text-align: right;
        border-radius: 0;
    }
    
    .nav-link:hover {
        background: rgba(0, 245, 255, 0.1);
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-content-2099 {
        padding: 0 15px;
    }
    
    .rotating-box {
        width: 220px;
        height: 220px;
    }
    
    .box-face {
        width: 220px;
        height: 220px;
    }
    
    .front, .back { transform: translateZ(110px); }
    .right, .left { transform: rotateY(90deg) translateZ(110px); }
    .top, .bottom { transform: rotateX(90deg) translateZ(110px); }
    
    .hero1 {
        font-size: 1.5rem;
    }
}

/* Reduce rotating animation speed on tiny screens to lower CPU while keeping motion */
@media (max-width: 480px) {
    .rotating-box { animation-duration: 60s !important; }
}

/* 3000 Quantum Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--quantum-black);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--quantum-gradient-1);
    border-radius: 6px;
    border: 2px solid var(--quantum-black);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--quantum-blue);
    box-shadow: 0 0 20px var(--quantum-blue);
}

/* ===== CLIENTS SECTION STYLING ===== */
.clients-section {
    padding: 60px 0;
}

.clients-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
}

.client-card {
    background: var(--quantum-glass);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.client-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
    border-color: var(--quantum-blue);
}

.client-avatar {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid rgba(0, 245, 255, 0.5);
    display: block;
    transition: transform 0.3s ease;
}

.client-card:hover .client-avatar {
    transform: scale(1.1);
    border-color: var(--quantum-blue);
}

.client-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--quantum-blue);
    margin: 15px 0;
    text-shadow: 0 0 10px var(--quantum-blue);
}

.client-opinion {
    font-size: 1rem;
    color: rgba(0, 245, 255, 0.9);
    line-height: 1.6;
    margin: 15px 0;
}

.clients-description {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
}

.clients-description p {
    font-size: 1.1rem;
    color: var(--quantum-blue);
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .clients-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .client-card {
        padding: 30px 20px;
    }
    
    .client-avatar {
        width: 80px !important;
        height: 80px !important;
        border-width: 2px;
    }
    
    .client-name {
        font-size: 1.1rem;
    }
    
    .client-opinion {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .clients-cards {
        grid-template-columns: 1fr;
    }
    
    .client-card {
        padding: 25px 15px;
    }
    
    .client-avatar {
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 15px;
    }
    
    .client-name {
        font-size: 1rem;
    }
    
    .client-opinion {
        font-size: 0.9rem;
    }
}
@media (max-width: 1440px) {
    .hero-content-2099 {
        gap: 60px;
        padding: 0 30px;
    }
    
    .rotating-box {
        width: 300px;
        height: 300px;
    }
    
    .box-face {
        width: 300px;
        height: 300px;
    }
    
    .front, .back { transform: translateZ(150px); }
    .right, .left { transform: rotateY(90deg) translateZ(150px); }
    .top, .bottom { transform: rotateX(90deg) translateZ(150px); }
}

@media (max-width: 1024px) {
    .hero-content-2099 {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero1 {
        font-size: 2.8rem;
    }
    
    .services1 {
        font-size: 3rem;
    }
    
    .cards {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 40px;
        padding: 40px 20px;
    }
    
    .slider-2099 {
        height: 500px;
        border-radius: 30px;
    }
    
    .item-2099 {
        width: 100%;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header-container-2099 {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }

    .nav-2099 {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 17, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(0, 245, 255, 0.3);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        padding-top: 80px;
    }

    .nav-2099.mobile-active {
        right: 0;
        transform: none;
    }

    .nav-2099 ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 0;
        width: 100%;
    }

    .nav-2099 li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    }

    .nav-link {
        display: block;
        padding: 20px;
        font-size: 18px;
        width: 100%;
        text-align: right;
        border-radius: 0;
    }

    .nav-link:hover {
        background: rgba(0, 245, 255, 0.1);
        transform: none;
    }

    .hero1 {
        font-size: 2.2rem;
    }

    .rotating-box {
        width: 250px;
        height: 250px;
    }

    .box-face {
        width: 250px;
        height: 250px;
    }

    .front, .back { transform: translateZ(125px); }
    .right, .left { transform: rotateY(90deg) translateZ(125px); }
    .top, .bottom { transform: rotateX(90deg) translateZ(125px); }

    .cards {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    /* Mobile Card Image Fixes - ensure full image visibility on mobiles */
    .card-img {
        height: auto; min-height: 140px; display:flex; align-items:center; justify-content:center;
    }

    .card-img img {
        width: 100% !important; height: auto !important; object-fit: contain !important; max-height: 220px !important; object-position: center !important;
    }
    .card-img-overlay::before { opacity: 0.18; }
    .card-img .card-icon { width: 56px; height: 56px; }

    .container2-2099 {
        margin: 80px 20px;
        padding: 50px 30px;
        border-radius: 30px;
        backdrop-filter: none; /* reduce blur to improve performance */
        box-shadow: none;
    }

    .slider-2099 {
        height: 400px;
        border-radius: 20px;
    }

    .buttons-2099 button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Footer responsive adjustments */
    .footer-2099 {
        padding: 40px 0 30px;
        margin-top: 80px;
    }

    .container1-2099 {
        padding: 0 15px;
    }

    .wrapper-2099 {
        display: flex;
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .footer-widget-2099 {
        text-align: center;
        width: 100%;
        max-width: 300px;
    }

    .footer-widget-2099 .logo {
        height: 80px;
        margin-bottom: 15px;
    }

    .pfooter-2099 {
        font-size: 1.5rem;
        margin: 15px 0;
        line-height: 1.4;
    }

    .socials-2099 {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
        flex-wrap: wrap;
    }

    .socials-2099 a {
        width: 50px;
        height: 50px;
        font-size: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .footer-widget-2099 h6 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        color: var(--quantum-blue);
    }

    .links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .links a {
        color: var(--quantum-blue);
        text-decoration: none;
        font-size: 1rem;
        padding: 8px 0;
        transition: color 0.3s ease;
    }

    .links a:hover {
        color: var(--quantum-cyan);
    }

    .contact-info {
        text-align: center;
    }

    .contact-info p {
        margin: 8px 0;
        font-size: 0.9rem;
        color: rgba(0, 245, 255, 0.9);
    }

    .contact-info i {
        margin-left: 8px;
        color: var(--quantum-blue);
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 245, 255, 0.2);
        text-align: center;
    }

    .footer-bottom p {
        font-size: 0.8rem;
        color: rgba(0, 245, 255, 0.7);
        line-height: 1.4;
    }
}

/* ===== CLIENT AVATARS STYLING ===== */
.client-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 2px solid rgba(0, 245, 255, 0.3);
    display: block;
}

@media (max-width: 768px) {
    .client-avatar {
        width: 70px !important;
        height: 70px !important;
    }
}

@media (max-width: 480px) {
    .hero1 {
        font-size: 1.8rem;
    }
    
    .rotating-box {
        width: 200px;
        height: 200px;
    }
    
    .box-face {
        width: 200px;
        height: 200px;
    }
    
    .front, .back { transform: translateZ(100px); }
    .right, .left { transform: rotateY(90deg) translateZ(100px); }
    .top, .bottom { transform: rotateX(90deg) translateZ(100px); }
    
    .services1 {
        font-size: 2.5rem;
    }
    
    .container2-2099 {
        margin: 60px 15px;
        padding: 40px 20px;
        border-radius: 25px;
    }
    
    .slider-2099 {
        height: 300px;
        border-radius: 15px;
    }
    
    .buttons-2099 button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .dots-2099 li {
        width: 15px;
        height: 15px;
    }
    
    .dots-2099 li.active {
        width: 40px;
    }

    .client-avatar {
        width: 60px !important;
        height: 60px !important;
    }
    
    /* Ultra Mobile Fixes */
    .card-img {
        height: auto; min-height: 120px; display:flex; align-items:center; justify-content:center; aspect-ratio: auto;
    }
    .card-img img {
        width: 100% !important; height: auto !important; max-height: 180px !important; object-fit: contain !important; object-position: center !important;
    }
    .card-img-overlay::before { opacity: 0.12; }
    .card-img .card-icon { width: 48px; height: 48px; }
    
    .card {
        margin: 0 10px;
    }
    
    .nav-link {
        padding: 12px 25px;
        font-size: 16px;
    }
    /* Simplify sharp visual effects for low-end devices */
    .card, .video-wrapper, .container2-2099, .footer-2099 {
        box-shadow: none !important;
        backdrop-filter: none !important;
        filter: none !important;
    }
    .logo-2099 img, .logo-glow, .card-icon { animation: none !important; }
}

/* 3000 Mobile Menu Button - Fixed Position */
.mobile-menu-btn {
    display: none;
    background: rgba(0, 0, 17, 0.9);
    border: 2px solid var(--quantum-blue);
    color: var(--quantum-blue);
    font-size: 24px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1002;
    backdrop-filter: blur(10px);
    min-width: 50px;
    text-align: center;
}

.mobile-menu-btn:hover {
    background: var(--quantum-blue);
    color: var(--quantum-black);
    box-shadow: var(--quantum-glow);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-2099 {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 17, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(0, 245, 255, 0.3);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        padding-top: 80px;
    }
    
    .nav-2099.mobile-active {
        display: block;
        right: 0;
    }
    
    .nav-2099 ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 0;
        width: 100%;
    }
    
    .nav-2099 li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    }
    
    .nav-link {
        display: block;
        padding: 20px;
        font-size: 18px;
        width: 100%;
        text-align: right;
        border-radius: 0;
    }
    
    .nav-link:hover {
        background: rgba(0, 245, 255, 0.1);
        transform: none;
    }
}

/* 3000 Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .video-wrapper:hover,
    .btn-2099:hover {
        transform: none;
    }
    
    .card:active,
    .video-wrapper:active,
    .btn-2099:active {
        transform: scale(0.98);
    }
}

/* 3000 Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 3000 Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --quantum-black: #000005;
        --quantum-dark: #050510;
    }
}

/* 3000 Print Styles */
@media print {
    .bg-2099,
    .header-2099,
    .footer-2099 {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* Fix gallery images visibility on small screens */
@media (max-width: 600px) {
    .accordion-content.show {
        max-height: 10000px; /* Increase to ensure all gallery images are visible */
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* === ENHANCED VIDEO & GALLERY RESPONSIVE FIX === */
#video.accordion-content {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    max-height: none !important;
    width: 100%;
    box-sizing: border-box;
}

.video-wrapper {
    width: 100%;
    background: var(--quantum-glass);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--quantum-gradient-1);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.video-wrapper:hover::before {
    opacity: 0.1;
}

.video-wrapper:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--quantum-shadow), var(--quantum-glow);
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 17, 0.7);
    display: block;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #video.accordion-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .video-wrapper {
        aspect-ratio: 16 / 9;
        min-height: 200px;
    }

    video {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 600px) {
    #video.accordion-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .video-wrapper {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }

    video {
        aspect-ratio: 16 / 9;
        max-height: 300px;
    }
}

@media (max-width: 400px) {
    #video.accordion-content {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px;
    }

    .video-wrapper {
        aspect-ratio: 16 / 9;
        min-height: 150px;
    }

    video {
        aspect-ratio: 16 / 9;
        max-height: 250px;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVENESS FIX
   Ensures galleries and videos are 100% visible
   on all screen sizes with no cut-offs or overlaps
   ============================================ */

/* EXTRA SMALL SCREENS - Ultra Mobile Optimization */
@media (max-width: 360px) {
    .gallery-grid {
        gap: 12px;
        padding: 6px;
    }

    .gallery-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section,
    #all-section.gallery-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-item {
        min-height: 100px;
        aspect-ratio: 1 / 1;
    }

    .gallery-section-title {
        font-size: 0.9rem;
        padding: 8px 0 4px 0;
    }
}

/* Accordion visibility is controlled by the accordion script and inline CSS in index.html.
   Do not force .accordion-content to be visible here — that breaks the accordion behavior. */

/* Prevent horizontal overflow on all screen sizes */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
}

.gallery-grid,
.gallery-section,
#video.accordion-content,
.video-wrapper {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure images never exceed container width */
.gallery-item img,
video {
    max-width: 100%;
    height: auto;
}

/* Fix any potential flex/grid item overflow */
.gallery-item,
.video-wrapper {
    min-width: 0;
    overflow: hidden;
}

/* Ensure gallery items maintain square aspect ratio on mobile */
@media (max-width: 768px) {
    .gallery-item {
        aspect-ratio: 1 / 1 !important;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Force proper wrapping on small screens */
@media (max-width: 600px) {
    .gallery-filters {
        flex-wrap: wrap;
        justify-content: center;
    }

    .gallery-section {
        width: 100%;
        display: grid !important;
    }

    .gallery-item {
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    #video.accordion-content {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    }

    .video-wrapper {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    video {
        width: 100%;
        height: 100%;
        aspect-ratio: 16 / 9;
        object-fit: contain;
    }
}

/* Tablet adjustments (600px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .gallery-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section,
    #all-section.gallery-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 1 / 1;
    }

    #video.accordion-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop adjustments (769px+) */
@media (min-width: 769px) {
    .gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section,
    #all-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    #video.accordion-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    .gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    #activities-section.gallery-section,
    #branding-section.gallery-section,
    #cars-section.gallery-section,
    #food-section.gallery-section,
    #logos-section.gallery-section,
    #teachers-section.gallery-section,
    #all-section.gallery-section {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    #video.accordion-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}


