/* Variables */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-purple: #8e44ad;
    --accent-red: #c0392b;
    --accent-yellow: #f39c12;
    --accent-blue: #3498db;
    --accent-green: #2ecc71;
    --accent-orange: #e67e22;
    --header-height: 80px; /* Header height variable */
    --header-height-mobile: 70px; /* Smaller header on mobile */
    
    width: 100%;
    overflow-x: hidden; /* Ensure root element prevents horizontal scroll */
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.29);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

/* Enhanced header on scroll (optional - can be added via JS) */
header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Ensure main content doesn't hide behind fixed header */
#main-container {
    padding-top: var(--header-height);
}

/* Global Styles */
html, body {
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-width: 100vw; /* Ensure content doesn't exceed viewport width */
    position: relative; /* Help with overflow control */
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    
    /* Hide scrollbar for all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Rubik', sans-serif;
    margin: 0;
    padding: 0;
    /* iOS Safari fixes */
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    /* Prevent zoom on input focus for iOS */
    -webkit-touch-callout: none;
    /* Prevent elastic bounce on scroll for iOS */
    overscroll-behavior-y: none;
}

/* iOS Safari specific body fixes */
@supports (-webkit-touch-callout: none) {
    body {
        /* Allow natural scroll behavior on iOS */
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        /* Fix iOS scroll issues */
        position: relative;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        /* Prevent iOS zoom on double tap */
        touch-action: manipulation;
    }
    
    /* Allow text selection where needed */
    p, h1, h2, h3, h4, h5, h6, span, div {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* iOS specific section fixes */
    .section {
        /* Ensure sections work properly on iOS */
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: calc(var(--vh, 1vh) * 100);
        /* Fix iOS Safari 100vh issues */
        position: relative;
        -webkit-overflow-scrolling: touch;
    }
    
    /* iOS Safari viewport height fix */
    #animation, #cases {
        height: 100vh;
        height: -webkit-fill-available;
        height: calc(var(--vh, 1vh) * 100);
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: calc(var(--vh, 1vh) * 100);
    }
}

/* Spline Canvas Fixes */
#animation, #cases {
    padding: 0 !important;
    overflow: hidden !important;
    /* iOS specific fixes */
    -webkit-overflow-scrolling: touch;
}

spline-viewer {
    width: 100% !important;
    height: 100vh !important;
    height: -webkit-fill-available !important; /* iOS Safari fix */
    height: calc(var(--vh, 1vh) * 100) !important; /* iOS Safari viewport fix */
    overflow: hidden !important; /* Hide scrollbars */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    /* iOS specific centering fixes */
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 auto !important;
    /* Ensure proper centering on all devices */
    transform: none !important;
    /* Fix aspect ratio and scaling */
    object-fit: contain !important;
    object-position: center !important;
}

/* Mobile-specific fixes for "zipped" animation */
@media (max-width: 768px) {
    spline-viewer {
        /* Ensure proper mobile scaling */
        width: 100vw !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        /* Fix mobile positioning */
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        /* Prevent compression */
        flex-shrink: 0 !important;
        flex-grow: 1 !important;
    }
}

/* iOS Safari specific Spline fixes */
@supports (-webkit-touch-callout: none) {
    spline-viewer {
        /* Fix iOS Safari viewport and centering issues */
        width: 100vw !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: -webkit-fill-available !important;
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Mobile specific - enable interaction but allow scroll when needed */
@media (max-width: 768px) {
    /* Show mobile Spline viewers */
    spline-viewer.block.md\:hidden {
        display: flex !important;
    }
    
    /* Hide desktop Spline viewers */
    spline-viewer.hidden.md\:block {
        display: none !important;
    }
    
    spline-viewer {
        pointer-events: auto !important;
        /* iOS specific touch handling */
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        /* Additional iOS fixes */
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }
    
    /* iOS Safari specific mobile fixes */
    @supports (-webkit-touch-callout: none) {
        spline-viewer {
            /* Force center positioning on iOS */
            left: 50% !important;
            top: 50% !important;
            transform: translate(-50%, -50%) !important;
            width: 100vw !important;
            height: 100vh !important;
            height: -webkit-fill-available !important;
            max-width: 100vw !important;
            max-height: 100vh !important;
            max-height: -webkit-fill-available !important;
            position: absolute !important;
        }
    }
    
    #animation {
        pointer-events: auto !important;
        /* iOS compatible touch actions */
        touch-action: manipulation !important;
        -webkit-overflow-scrolling: touch !important;
        /* Allow both scroll and interaction on iOS */
        overflow: visible !important;
        /* iOS viewport fixes */
        height: 100vh !important;
        height: -webkit-fill-available !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
    }
    
    #cases {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-overflow-scrolling: touch !important;
        /* iOS viewport fixes */
        height: 100vh !important;
        height: -webkit-fill-available !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
    }
}

/* Desktop specific - show desktop animations */
@media (min-width: 769px) {
    /* Show desktop Spline viewers */
    spline-viewer.hidden.md\:block {
        display: flex !important;
    }
    
    /* Hide mobile Spline viewers */
    spline-viewer.block.md\:hidden {
        display: none !important;
    }
    
    spline-viewer {
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    #animation, #cases {
        pointer-events: auto !important;
    }
}

/* Hide scrollbars in Spline viewer shadow DOM */
spline-viewer::part(canvas) {
    overflow: hidden !important;
}

/* Additional scrollbar hiding for cross-browser compatibility */
spline-viewer::-webkit-scrollbar {
    display: none !important;
}

spline-viewer {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

/* Apply these styles via JavaScript to the dynamically created canvas */
@media (max-width: 768px) {
    /* Mobile-specific fixes */
    #animation canvas,
    #cases canvas {
        width: 100vw !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: -webkit-fill-available !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        object-fit: contain !important;
        /* Prevent canvas compression */
        transform: none !important;
        flex-shrink: 0 !important;
    }
    
    /* Fix mobile section containers */
    #animation,
    #cases {
        width: 100vw !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        position: relative !important;
        overflow: hidden !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* iOS Safari specific canvas fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        #animation canvas,
        #cases canvas {
            /* Ensure canvas is perfectly centered on iOS */
            width: 100vw !important;
            height: 100vh !important;
            height: -webkit-fill-available !important;
            max-width: 100vw !important;
            max-height: 100vh !important;
            max-height: -webkit-fill-available !important;
            min-width: 100vw !important;
            min-height: 100vh !important;
            left: 0 !important;
            top: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            position: absolute !important;
            margin: 0 !important;
            padding: 0 !important;
            object-fit: contain !important;
            object-position: center !important;
            transform: none !important;
        }
        
        #animation,
        #cases {
            width: 100vw !important;
            height: 100vh !important;
            height: -webkit-fill-available !important;
            min-height: 100vh !important;
            min-height: -webkit-fill-available !important;
        }
    }
}

@media (max-width: 768px) {
  .spline-embed iframe {
    pointer-events: none;
  }
}

.spline-embed iframe {
  touch-action: pan-y;
}

.font-unbounded {
    font-family: 'Unbounded', cursive;
}

#main-container {
    width: 100%;
    max-width: 100vw; /* Ensure content doesn't exceed viewport width */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-sizing: border-box; /* Include padding in width calculation */
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative; /* For stars */
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease-out, scale 0.5s ease-out;
    will-change: transform, opacity, scale;
    scroll-snap-align: start;
}

/* Enhanced mobile section transitions */
@media (max-width: 768px) {
    .section {
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.7s ease-out, scale 0.6s ease-out;
        /* Add perspective for 3D effects */
        transform-style: preserve-3d;
        backface-visibility: hidden;
    }
    
    /* Add section transition states for mobile */
    .section.transitioning-out-down {
        transform: scale(0.9) translateY(-30px) rotateX(5deg);
        opacity: 0.6;
        filter: brightness(0.8) blur(1px);
    }
    
    .section.transitioning-out-up {
        transform: scale(1.1) translateY(30px) rotateX(-5deg);
        opacity: 0.7;
        filter: brightness(0.9) blur(0.5px);
    }
    
    .section.transitioning-in-down {
        transform: scale(1.1) translateY(40px) rotateX(-8deg);
        opacity: 0.4;
        filter: brightness(0.7) blur(2px);
    }
    
    .section.transitioning-in-up {
        transform: scale(0.85) translateY(-40px) rotateX(8deg);
        opacity: 0.4;
        filter: brightness(0.7) blur(2px);
    }
    
    .section.transitioning-active {
        transform: scale(1) translateY(0) rotateX(0deg);
        opacity: 1;
        filter: brightness(1) blur(0px);
        transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.8s ease-out, 
                    scale 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                    filter 0.6s ease-out;
    }
}

#team {
    height: auto !important;
    overflow-y: visible;
    padding: 0;
    background-color: white;
    color: black;
}

/* Stars Background */
.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Buttons */
.btn-primary {
    /* Auto layout from Figma */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    
    width: 315px;
    height: 60px;
    
    /* Complex background with multiple radial gradients */
    background: 
        radial-gradient(92.34% 92.34% at 100% 100%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(83.33% 83.33% at 31.53% 6.31%, rgba(255, 251, 251, 0.1) 0%, rgba(255, 251, 251, 0.0683749) 16.35%, rgba(255, 251, 251, 0) 64.43%);
    
    /* Inner light shadow effect */
    box-shadow: inset 0px 4px 20px rgba(255, 255, 255, 0.9);
    
    /* Rounded corners */
    border-radius: 10px;
    
    /* Text styling */
    color: #ffffff;
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 28.44px;
    
    /* Other styles */
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.glass-button {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.glass-button:hover {
    transform: translateY(-3px);
    box-shadow: inset 0px 4px 25px rgba(255, 255, 255, 1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.07) 100%);
}

.glass-button:active {
    transform: translateY(1px);
    box-shadow: inset 0px 2px 15px rgba(255, 255, 255, 0.8);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

/* Join Team Button */
.join-team-button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 44px;
    gap: 8px;
    
    width: 420px;
    height: 60px;
    
    background: 
        radial-gradient(92.34% 92.34% at 100% 100%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%),
        radial-gradient(151.97% 271.09% at -2.68% 22.73%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.0683749) 16.35%, rgba(0, 0, 0, 0) 64.43%);
    
    box-shadow: inset 0px 4px 20px rgba(0, 0, 0, 0.9);
    
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border-radius: 10px;
    
    color: #121212;
    font-family: 'Unbounded', cursive;
    font-size: 16px;
    font-weight: 600;
    
    cursor: pointer;
    transition: all 0.3s ease;
    
    border: none;
}

.join-team-button:hover {
    transform: translateY(-2px);
    box-shadow: inset 0px 4px 30px rgba(0, 0, 0, 0.9);
}

.join-team-button:active {
    transform: translateY(1px);
}

/* Service Buttons */
.service-button {
    box-sizing: border-box;
    width: 100%;
    min-width: 151px;
    height: 66px;
    
    background: #000000;
    border: 1px solid var(--color, #FEE300);
    border-radius: 10px;
    
    color: #FFFFFF;
    font-family: 'Rubik', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 32px;
    line-height: 42px;
    text-align: center;
    
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-button .button-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.service-button .running-text {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    white-space: nowrap;
    opacity: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    z-index: 1;
    color: #000000;
    transition: opacity 0.3s ease;
}

.service-button:hover {
    background: var(--color, #FEE300);
    border: 1px solid #000000;
    box-shadow: 0px 0px 4.6px rgba(255, 252, 230, 0.3);
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
}

.service-button:hover .button-text {
    opacity: 0;
}

.service-button:hover .running-text {
    opacity: 1;
    color: #000000;
    animation: runningText 3s linear infinite;
}

@keyframes runningText {
    0% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

.service-button::before,
.service-button::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #FFFCE6;
    border: 1px solid #FFFCE6;
    box-shadow: 1px 2px 3px rgba(255, 252, 230, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-button::before {
    left: 30%;
    top: 30%;
}

.service-button::after {
    right: 30%;
    bottom: 30%;
}

.service-button:hover::before,
.service-button:hover::after {
    opacity: 0.8;
}

/* Modern Folder/Tab Design */
.tabs-wrapper {
    width: 100%;
    position: relative;
    padding-top: 40px;
    margin-bottom: 60px;
}

.services-tabs-container {
    position: relative;
    /* width: calc(100% - 40px); */
    max-width: 1200px;
    height: 220px;
    margin: 0 auto;
    perspective: 1000px;
    pointer-events: none;
}

.service-tab {
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    transition: all 0.3s ease;
    border-radius: 20px 20px 0 0;
    transform-origin: bottom center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    z-index: 5;
    pointer-events: none !important;
    cursor: default;
}

.design-tab {
    z-index: 7;
    left: 0;
    transform: translateY(0) scale(1);
}

.design-tab .tab-clickable-area {
    bottom: 15px;
}

.it-tab {
    z-index: 6;
    left: 0;
    transform: translateY(15px) scale(0.97);
}

.it-tab .tab-clickable-area {
    top: 15px;
    bottom: 15px;
}

.smm-tab {
    z-index: 5;
    left: 0; 
    transform: translateY(30px) scale(0.94);
}

.smm-tab .tab-clickable-area {
    top: 30px;
}

.service-tab.active {
    z-index: 20 !important;
    transform: translateY(0) scale(1) !important;
    box-shadow: 0 -8px 25px rgba(0,0,0,0.4);
}

.tab-background-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    object-fit: cover;
    object-position: center top; /* Show the full height of SVG */
    pointer-events: none;
    border-radius: 20px 20px 0 0;
}

.tab-header {
    position: relative;
    padding: 30px 0 0 40px;
    pointer-events: none;
}

.tab-header h3 {
    color: white;
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    margin: 0;
    pointer-events: none;
}

.tab-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    padding: 80px 20px 20px 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

/* Tab-specific content positioning */
.design-tab .tab-content-overlay {
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding-left: 40px;
}

.it-tab .tab-content-overlay {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.smm-tab .tab-content-overlay {
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding-right: 40px;
}

/* Adjust grid layout for different alignments */
.design-tab .tab-features {
    justify-items: start;
}

.it-tab .tab-features {
    justify-items: center;
}

.smm-tab .tab-features {
    justify-items: end;
}

.tab-features {
    list-style-type: none;
    padding: 0;
    padding-top: 70px;
    margin: 0;
    color: white;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 50px;
    pointer-events: none;
}

.tab-features li {
    white-space: nowrap;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    pointer-events: none;
}

.service-tab:hover {
    filter: brightness(1.1);
}

.service-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--tab-bottom-color, transparent);
    z-index: 3;
}

#content-container {
    background: #5C0099;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 0 25px 25px;
    width: calc(100% - 40px);
    max-width: 1200px;
    position: relative;
    min-height: 300px;
    z-index: 4;
    overflow: hidden;
    margin: 220px auto 0;
    padding: 40px 60px;
    transition: background-color 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: block;
}

.tab-content {
    display: none;
    width: 100%;
    height: 100%;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: relative;
}

.tab-content.active {
    display: block;
    opacity: 1;
    animation: fadeInUp 0.6s ease-out;
    z-index: 5;
}

.tab-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Unbounded', sans-serif;
}

.tab-content p {
    font-size: 1.25rem;
    line-height: 1.7;
    font-family: 'Rubik', sans-serif;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Social Icons */
.social-icon {
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: black;
    border-radius: 50%;
}

.social-icon:hover {
    transform: scale(1.2);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Team Cards */
.team-card-new {
    position: relative;
    width: 100px;
    min-width: 100px;
    height: 500px;
    border-radius: 25px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

/* Simple hover effect - just scale up slightly */
.team-card-new:hover {
    transform: scale(1.08);
}

/* Add spacing to team cards container */
.flex.justify-center.flex-wrap.gap-6 {
    padding: 0 15px;
}

.team-card-new-mobile {
    position: relative;
    width: 100%;
    height: 170px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease-out;
    cursor: pointer;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.team-card-new-mobile::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(70px);
    transform: translateY(50%);
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.team-card-new-mobile:hover {
    transform: scale(1.03);
}

/* Smooth transition for team section layout */
.lg\\:col-span-8.relative {
    overflow: visible;
}

.team-card-new::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    transform: translateY(80%);
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.team-card-red::before {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, rgba(92, 0, 0, 0) 70%);
}

.team-card-brown::before {
    background: radial-gradient(circle, rgba(210, 125, 44, 0.5) 0%, rgba(77, 37, 0, 0) 70%);
}

.team-card-yellow::before {
    background: radial-gradient(circle, rgba(227, 223, 30, 0.5) 0%, rgba(79, 77, 0, 0) 70%);
}

.team-card-green::before {
    background: radial-gradient(circle, rgba(44, 187, 116, 0.5) 0%, rgba(0, 62, 28, 0) 70%);
}

.team-card-teal::before {
    background: radial-gradient(circle, rgba(27, 163, 170, 0.5) 0%, rgba(0, 61, 64, 0) 70%);
}

.team-card-blue::before {
    background: radial-gradient(circle, rgba(69, 69, 255, 0.5) 0%, rgba(0, 0, 61, 0) 70%);
}

.team-card-new:hover::before {
    opacity: 0.9;
}

.team-image-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.team-card-new:hover .team-image-new {
    filter: brightness(1.05);
}

.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.team-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
    transition: opacity 0.4s ease;
}

.team-info {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: start;
    padding-right: 15px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.team-info-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.team-card-new:hover .team-info {
    opacity: 1;
}

.team-card-new:hover .team-info-hover {
    opacity: 1;
}

.team-name-new {
    font-family: 'Unbounded', cursive;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.team-role-new {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
}

.team-name-hover {
    font-family: 'Unbounded', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.team-role-hover {
    font-size: 0.9rem;
    color: white;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.team-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* Rainbow Text */
.rainbow-text {
    transition: all 0.3s ease;
    background-clip: text;
    -webkit-background-clip: text;
    color: white;
}

.rainbow-text:hover {
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: rainbow 5s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hover Rainbow Text - Black by default, rainbow on hover */
.hover-rainbow {
    color: #000000 !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.hover-rainbow:hover {
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent !important;
    animation: rainbow 5s ease infinite;
}

/* Click detection layer */
.click-detection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: auto;
    height: 100px; /* Height for click areas */
    z-index: 100;
    display: flex;
}

.click-area {
    flex: 1;
    cursor: pointer;
    height: 100%;
    transition: background-color 0.3s;
    position: relative;
    z-index: 100;
}

.click-area:hover {
    cursor: pointer;
}

.design-click {
    border-radius: 20px 0 0 0;
}

.it-click {
    /* Center tab uses default styles */
    border-radius: 0;
}

.smm-click {
    border-radius: 0 20px 0 0;
}

/* Case page styles */
.case-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.case-header {
    margin-bottom: 40px;
}

.case-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
}

.case-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Media Queries */
@media (max-width: 768px) {
    .tabs-wrapper {
        padding-top: 20px;
    }
    
    .tab-features {
        grid-template-columns: 1fr;
        font-size: 0.85rem;
    }
    
    .tab-header h3 {
        font-size: 1.4rem;
    }
    
    .tab-header {
        padding: 20px 0 0 20px;
    }
    
    .tab-content-overlay {
        padding: 10px 10px 10px 20px;
    }
    
    #content-container {
        padding: 30px 25px;
    }
    
    .tab-content h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .tab-content p {
        font-size: 1rem;
    }
    
    .team-card-new-mobile .team-overlay {
        background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    }
    
    .team-card-new-mobile .team-info {
        writing-mode: horizontal-tb;
        transform: none;
        text-align: center;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        bottom: 5px;
    }
    
    .team-card-new-mobile .team-name-new {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    
    .team-card-new-mobile .team-role-new {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .services-tabs-container {
        height: 180px;  /* Reduce height on mobile */
    }
    
    .service-tab {
        border-radius: 15px 15px 0 0;  /* Smaller radius on mobile */
    }
    
    .tab-content-overlay {
        padding: 60px 10px 10px 20px; /* Adjust padding for mobile */
    }
    
    /* Mobile-specific tab positioning */
    .design-tab .tab-content-overlay {
        align-items: flex-start;
        text-align: left;
        padding: 60px 10px 10px 20px;
    }

    .it-tab .tab-content-overlay {
        align-items: center;
        text-align: center;
        padding: 60px 10px 10px 10px;
    }

    .smm-tab .tab-content-overlay {
        align-items: flex-end;
        text-align: right;
        padding: 60px 20px 10px 10px;
    }
    
    .tab-features {
        padding-top: 30px; /* Reduce top padding for features list */
        font-size: 0.75rem; /* Smaller font size on mobile */
    }
    
    /* Mobile grid alignment for different tabs */
    .design-tab .tab-features {
        justify-items: start;
    }

    .it-tab .tab-features {
        justify-items: center;
    }

    .smm-tab .tab-features {
        justify-items: end;
    }
    
    /* For the 2-column mobile layout */
    .tab-features.mobile-features {
        grid-template-columns: 1fr 1fr;
        gap: 5px 10px;
    }
}

/* Mobile Cases Section Content Styling */
@media (max-width: 768px) {
    /* Cases section mobile - full viewport height */
    #cases.section {
        height: 100vh !important;
        height: 100dvh !important; /* Use dvh for better mobile support */
        height: calc(var(--vh, 1vh) * 100) !important; /* Fallback with JS variable */
        min-height: 100vh !important;
        min-height: 100dvh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        max-height: calc(var(--vh, 1vh) * 100) !important;
        overflow: hidden !important;
        position: relative;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    #cases .block.md\:hidden {
        height: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden !important;
        position: relative;
    }
    
    /* Cases section mobile content adjustments */
    #cases .flex.flex-col.justify-center.items-center.h-full {
        width: 100%;
        height: 100% !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
    }
    
    #cases h2 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        margin: 0 0 2rem 0 !important;
        line-height: 1.2 !important;
        flex-shrink: 0;
        text-align: center;
        position: relative;
        z-index: 10 !important;
    }
    
    #cases .w-full.max-w-sm {
        /* width: 90% !important; */
        /* max-width: 350px !important; */
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    /* Case cards grid - 2x2 layout */
    #cases .grid.grid-cols-2 {
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr; /* Ensure 2 equal rows */
    }
    
    /* Individual case cards */
    #cases .case-card-mobile {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        /* padding: 0.75rem; */
        transition: all 0.3s ease;
        text-decoration: none;
        color: white;
        display: block;
        aspect-ratio: 1; /* Square cards */
        overflow: hidden;
        position: relative;
    }
    
    #cases .case-card-mobile:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    #cases .case-card-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 0.5rem;
        position: relative;
        z-index: 2;
    }
    
    #cases .case-card-image-container {
        width: 100%;
        height: 55%;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
        background: rgba(0, 0, 0, 0.3);
        position: relative;
    }
    
    #cases .case-card-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    #cases .case-card-mobile:hover .case-card-image {
        transform: scale(1.05);
    }
    
    #cases .case-card-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        /* gap: 0.25rem;
        min-height: 0; */
        justify-content: flex-start;
        /* padding-top: 0.25rem; */
    }
    
    #cases .case-card-title {
        font-size: clamp(0.8rem, 3vw, 1rem) !important;
        font-weight: 700;
        line-height: 1.3 !important;
        margin: 0 0 0.25rem 0;
        color: white;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
        font-family: 'Unbounded', cursive;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    #cases .case-card-category {
        font-size: clamp(0.7rem, 2.2vw, 0.85rem) !important;
        opacity: 0.9;
        margin: 0 0 0.25rem 0;
        line-height: 1.3 !important;
        color: rgba(255, 255, 255, 0.9);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
        font-family: 'Rubik', sans-serif;
    }
    
    #cases .case-card-description {
        font-size: clamp(0.65rem, 2vw, 0.8rem) !important;
        opacity: 0.8;
        margin: 0;
        line-height: 1.3 !important;
        color: rgba(255, 255, 255, 0.8);
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
        font-family: 'Rubik', sans-serif;
    }
    
    /* View All Button */
    #cases .case-view-all-btn {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
        padding: 1rem 1.25rem;
        transition: all 0.3s ease;
        text-decoration: none;
        color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
        font-size: 0.9rem !important;
        font-weight: 700;
        width: 100%;
        min-height: 65px;
        justify-content: center;
        flex-shrink: 0;
        font-family: 'Unbounded', cursive;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    #cases .case-view-all-btn:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.2));
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    #cases .case-view-all-btn span:first-child {
        font-size: 0.85rem !important;
        font-weight: 700;
        line-height: 1.2;
    }
    
    #cases .case-count {
        font-size: 0.75rem !important;
        opacity: 0.9;
        color: rgba(255, 255, 255, 0.9);
        font-family: 'Rubik', sans-serif;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
    }
}

/* Debug and visibility fixes for mobile cases */
@media (max-width: 768px) {
    #cases * {
        z-index: 1 !important;
    }
    
    #cases .block.md\:hidden * {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #cases h2 {
        z-index: 10 !important;
    }
    
    #cases .case-card-mobile {
        z-index: 5 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* iOS Safari specific fixes for cases section */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        /* Force exact viewport height on iOS Safari using -webkit-fill-available as fallback */
        #cases.section {
            height: -webkit-fill-available !important;
            min-height: -webkit-fill-available !important;
            max-height: -webkit-fill-available !important;
        }
    }
}

/* iOS Safari specific fixes for cases section */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        /* Force exact viewport height on iOS Safari using -webkit-fill-available as fallback */
        #cases.section {
            height: -webkit-fill-available !important;
            min-height: -webkit-fill-available !important;
            max-height: -webkit-fill-available !important;
        }
    }
}

/* Fallback for browsers that don't support dvh */
@media (max-width: 768px) {
    @supports not (height: 100dvh) {
        #cases.section {
            height: 100vh !important;
            min-height: 100vh !important;
            max-height: 100vh !important;
        }
    }
}

/* Enhanced scroll animation for all sections */
.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative; /* For stars */
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    will-change: transform, opacity;
}

/* Mobile-specific section fixes */
@media (max-width: 768px) {
    .section {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: calc(var(--vh, 1vh) * 100);
        height: 100vh;
        height: -webkit-fill-available;
        height: calc(var(--vh, 1vh) * 100);
        width: 100vw;
        padding: 1rem;
        /* Ensure smooth transitions on mobile */
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }
    
    /* Special handling for animation and cases sections */
    #animation,
    #cases {
        padding: 0 !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        width: 100vw !important;
        overflow: hidden !important;
    }
}

/* First section should account for fixed header */
.section:first-child, #animation {
    padding-top: calc(2rem + var(--header-height));
}

#animation, #cases {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    will-change: transform, opacity;
}

/* Smooth scroll behavior for better auto-scroll experience */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* Scroll snap for each section */
.section {
    scroll-snap-align: start;
}

/* Add subtle visual cue for scroll hint on mobile */
@media (max-width: 768px) {
    #animation::after {
        content: 'Scroll to navigate';
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255,255,255,0.8);
        font-size: 12px;
        font-family: 'Rubik', sans-serif;
        text-align: center;
        animation: scrollHint 3s ease-in-out infinite;
        pointer-events: none;
        z-index: 10;
        background: rgba(0,0,0,0.3);
        padding: 6px 12px;
        border-radius: 15px;
        backdrop-filter: blur(10px);
    }
}

/* Performance optimizations for animations */
spline-viewer {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

/* Ensure sections have proper z-index for scroll transitions */
.section {
    position: relative;
    z-index: 1;
}

#animation {
    z-index: 2;
}

#cases {
    z-index: 2;
}

/* Section navigation indicators */
.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Make visible by default */
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.section-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.section-nav-dot.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.section-nav-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Hide on mobile to save space */
@media (max-width: 768px) {
    .section-nav {
        display: none;
    }
}

/* Add transition effects for section changes */
.section-transitioning {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile header overlap fix */
@media (max-width: 768px) {
    header {
        height: var(--header-height-mobile);
    }
    
    .section {
        padding-top: calc(2rem + var(--header-height-mobile));
        min-height: calc(100vh - var(--header-height-mobile));
    }
    
    /* Specific adjustments for different sections on mobile */
    #about.section {
        padding-top: calc(3rem + var(--header-height-mobile));
        /* Dynamic scaling to fit viewport */
        min-height: calc(100vh - var(--header-height-mobile));
        /* max-height: calc(100vh - var(--header-height-mobile)); */
        overflow-y: auto;
        transform-origin: center top;
    }
    
    #team.section {
        padding-top: calc(2rem + var(--header-height-mobile));
        /* Dynamic scaling to fit viewport */
        min-height: calc(100vh - var(--header-height-mobile));
        max-height: calc(100vh - var(--header-height-mobile));
        overflow-y: auto;
        transform-origin: center top;
    }
    
    #services.section {
        padding-top: calc(1.5rem + var(--header-height-mobile));
    }
    
    #contact.section {
        /* padding-top: calc(2rem + var(--header-height-mobile)); */
    }
    
    /* Animation section should still be full height */
    #animation.section {
        padding-top: 0;
        min-height: 100vh;
    }
    
    /* Cases section should take full viewport height */
    #cases.section {
        padding: calc(1rem + var(--header-height-mobile)) 0 0 0;
        height: 100vh;
        height: -webkit-fill-available; /* iOS Safari fallback */
        min-height: 100vh;
        min-height: -webkit-fill-available; /* iOS Safari fallback */
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* Mobile cases section - ensure content container fills available space */
    #cases.section .block.md\\:hidden {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
}

/* About section scroll animation for mobile */
@media (max-width: 768px) {
    /* Dynamic content scaling for About section */
    #about .text-center.max-w-4xl {
        transform-origin: center top;
        max-width: 95vw;
        padding: 0 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        min-height: calc(100vh - var(--header-height-mobile) - 3rem);
    }
    
    #about h2 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 1.5rem !important;
    }
    
    #about .grid {
        margin-top: 1.5rem !important;
        gap: 1rem !important;
        flex: 1;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    #about .service-button {
        width: 280px !important;
        height: 50px !important;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Dynamic content scaling for Team section */
    #team .w-full.max-w-7xl {
        height: 100%;
        min-height: calc(100vh - var(--header-height-mobile) - 2rem);
        max-height: calc(100vh - var(--header-height-mobile) - 2rem);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0.5rem !important;
        overflow: hidden;
    }
    
    #team .grid.grid-cols-1.lg\\:grid-cols-12 {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0.75rem !important;
        height: 100%;
    }
    
    #team h2 {
        font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
        line-height: 1 !important;
        margin-bottom: 0.25rem !important;
    }
    
    #team p {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.2 !important;
    }
    
    #team .join-team-button {
        min-height: 45px !important;
        padding: 10px 20px !important;
        margin-bottom: 0.5rem !important;
        font-size: clamp(0.8rem, 3vw, 1rem) !important;
    }
    
    #team .grid.grid-cols-3 {
        gap: 0.4rem !important;
        max-height: 45vh;
        overflow-y: visible;
        margin-bottom: 1rem !important;
    }
    
    #team .team-card-new-mobile {
        height: 170px !important;
        min-height: 170px !important;
        max-height: 170px !important;
        aspect-ratio: 1 !important;
    }
    
    #team .team-image-new {
        object-fit: cover;
        border-radius: 10px;
    }
    
    #team .team-name-new {
        font-size: 0.65rem !important;
        line-height: 1 !important;
        margin-bottom: 1px !important;
    }
    
    #team .team-role-new {
        font-size: 0.6rem !important;
        line-height: 0.9 !important;
    }
    
    /* Show buttons by default, then add animation when class is present */
    #about .service-button {
        opacity: 1;
        transform: translateY(0);
        transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    }
    
    /* Only hide buttons when we want to animate them in */
    #about.prepare-animation .service-button {
        transform: translateY(30px);
        opacity: 0;
    }
    
    /* Set staggered delays based on the div container index */
    #about .grid > div:nth-child(1) .service-button { transition-delay: 0.1s; }
    #about .grid > div:nth-child(2) .service-button { transition-delay: 0.2s; }
    #about .grid > div:nth-child(3) .service-button { transition-delay: 0.3s; }
    #about .grid > div:nth-child(4) .service-button { transition-delay: 0.4s; }
    #about .grid > div:nth-child(5) .service-button { transition-delay: 0.5s; }
    #about .grid > div:nth-child(6) .service-button { transition-delay: 0.6s; }
    
    /* When animation is triggered, show the buttons */
    #about.animate-buttons .service-button {
        transform: translateY(0);
        opacity: 1;
    }
    
    #about .rainbow-text {
        transition: transform 0.8s ease-out;
    }
    
    #about.animate-buttons .rainbow-text {
        transform: scale(1.05);
    }
}

/* Prevent contact section from bleeding into cases section on mobile */
#contact.section {
    margin-top: 0 !important;
    /* padding-top: 2rem !important; */
}

/* Ensure cases section is isolated from other sections */
#cases.section {
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

/* Aggressive fix to prevent next section bleed-through */
@media (max-width: 768px) {
    /* Ensure cases section is completely isolated */
    #cases.section::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 20px;
        background: linear-gradient(to bottom, transparent, black);
        z-index: 1000;
        pointer-events: none;
    }
    
    /* Force cases section to be exactly viewport height */
    #cases.section {
        position: relative !important;
        z-index: 10 !important;
        isolation: isolate !important;
    }
    
    /* Ensure contact section starts exactly after cases */
    #contact.section {
        position: relative !important;
        z-index: 1 !important;
        transform: translateY(0) !important;
    }
    
    /* Force strict height control with JavaScript backup */
    #cases.section,
    #cases .block.md\:hidden {
        contain: layout style paint !important;
    }
}
