/* css/features.css */

/* ========================================== */
/* ===== FEATURED PROJECTS SECTION STYLES ===== */
/* ========================================== */
.recent-visuals-section {
    background-image: url('../images/banner_3.webp');
    background-attachment: scroll;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: var(--black);
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

/* Overlay for text readability */
.recent-visuals-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.75);
    z-index: 1;
    pointer-events: none;
}

/* Ensure content is above the overlay */
.recent-visuals-section .container {
    position: relative;
    z-index: 2;
}

/* Section Header Specifics for Featured In */
#recent-visuals .section-header {
    margin-bottom: var(--space-lg);
    position: relative; /* Keep relative positioning */
    z-index: 3;
    text-align: left; /* Ensure parent is left aligned */
}
/* Explicit styles for the heading itself (#recent-visuals h2) are handled in layout.css */
/* Explicit styles for the underline ::after (#recent-visuals h2::after) are handled in layout.css */

/* --- Featured Showcase Grid & Cards --- */
.featured-showcase {
    display: grid;
    grid-template-columns: 1fr; /* Single column mobile */
    gap: 20px; /* Reduced from 25px */
    position: relative;
    z-index: 3;
    justify-content: center; /* Center the grid content */
    max-width: 1200px; /* Add max width for desktop centering */
    margin: 0 auto; /* Center the entire grid */
    padding: 0 20px; /* Add some padding for better centering */
}

.feature-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    width: 280px;
    height: 440px;
    margin: 0 auto;
    border: 1px solid var(--glass-border);
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: var(--card-bg-hover);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 60px var(--accent-glow);
    border-color: rgba(255, 184, 0, 0.15);
}

.feature-media {
    position: relative;
    overflow: hidden;
    height: 280px; /* Same as desktop */
    flex-shrink: 0; /* Don't allow shrinking */
}
.feature-media.poster-ratio { /* Remove aspect ratio - use fixed height */
    aspect-ratio: unset; /* Remove aspect ratio */
}
.feature-media img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    background-color: var(--black);
    filter: saturate(70%) brightness(0.95);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover .feature-media img {
    transform: scale(1.08);
    filter: saturate(100%) brightness(1);
}

.feature-overlay { /* Gradient over image */
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient( to bottom, transparent 40%, rgba(0, 0, 0, 0.9) 100% );
    z-index: 1;
}

.feature-content {
    position: relative;
    padding: 18px;
    z-index: 2;
    background: var(--dark-gray);
    display: flex;
    flex-direction: column;
    height: 160px;
    flex-shrink: 0;
}

.feature-tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 5px 10px;
    background: var(--accent);
    color: var(--black);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
    height: 22px;
    line-height: 1;
    align-items: center;
    box-shadow: 0 2px 10px rgba(255, 184, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover .feature-tag {
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.4);
    transform: translateY(-1px);
}

.feature-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
    line-height: 1.2;
    margin: 0 0 8px 0; /* Consistent margin */
    height: 26px; /* Fixed height for title */
    display: flex;
    align-items: flex-start;
    overflow: hidden; /* Hide overflow if title is too long */
}

.feature-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin: 0 0 12px 0; /* Consistent margin */
    min-height: 40px; /* Minimum height for details */
}

.feature-details p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--light-gray);
    opacity: 0.8;
}

.feature-year {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: auto; /* Push to bottom of details area */
}

.feature-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
    flex-shrink: 0;
    margin-top: auto;
    height: 20px;
    line-height: 1;
    position: relative;
}
.feature-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--white);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-link svg {
    margin-left: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.feature-link:hover { color: var(--white); }
.feature-link:hover::after { width: calc(100% - 22px); }
.feature-link:hover svg { transform: translate(5px, -5px); }


/* ================================================ */
/* ===== WORK TIMELINE/SLIDER/VIDEO SECTION ===== */
/* ================================================ */
.work-section {
    background-color: var(--black);
    padding: var(--space-lg) 0;
}

/* --- Slider --- */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto var(--space-md) auto;
    padding: 8px;
}
.slider-track {
    display: flex;
    width: 100%;
    height: 90px;
    position: relative;
}
.slider-item {
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: pointer;
    background: var(--gray);
    margin: 0 3px;
    border-radius: 12px;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--glass-border);
}
.slider-item:first-child { margin-left: 0; }
.slider-item:last-child { margin-right: 0; }
.slider-item.active {
    flex: 2.5;
    background: var(--accent);
    box-shadow: 0 6px 25px rgba(255, 184, 0, 0.4);
    border-color: var(--accent);
}

/* Video player transition animations */
.video-player-container {
    position: relative;
}

.video-player-container .player-transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.video-player-container.transitioning .player-transition-overlay {
    opacity: 0.8;
}

.video-player-container.transitioning #main-player {
    animation: playerFadeSwitch 0.3s ease;
}

@keyframes playerFadeSwitch {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
.slider-item:hover:not(.active) {
    background: var(--mid-gray);
    border-color: rgba(255, 184, 0, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.slider-item:active:not(.active) {
    transform: scale(0.98);
    background: rgba(255, 184, 0, 0.3);
}
.slider-item:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.item-year {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1;
    margin-bottom: 3px;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}
.item-label {
    font-size: 0.75rem;
    color: var(--light-gray);
    transition: color 0.3s ease;
    padding: 0 4px;
    letter-spacing: 0.3px;
    font-weight: 400;
    opacity: 0.9;
}
.slider-item.active .item-year,
.slider-item.active .item-label {
    color: var(--black);
}

/* --- Video Player --- */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--dark-gray);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-player-container:hover {
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6), 0 0 80px var(--accent-glow);
    border-color: rgba(255, 184, 0, 0.15);
}
#main-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: var(--black);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
#main-player iframe,
#main-player #youtube-player-wrapper,
#main-player .custom-player-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.video-info {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--dark-gray);
    border-top: 1px solid var(--gray);
    border-radius: 0 0 12px 12px;
}
.video-info h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.4rem;
    color: var(--white);
}
.video-info p {
    margin: 0;
    color: var(--light-gray);
    font-size: 0.95rem;
    max-width: 800px;
}

/* --- Custom Video Controls (Vimeo) --- */
.custom-video-controls {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    box-sizing: border-box;
}
:fullscreen .custom-video-controls,
:-webkit-full-screen .custom-video-controls,
:-moz-full-screen .custom-video-controls {
  opacity: 1 !important;
  z-index: 9999 !important;
}
.play-pause-btn {
    background: none; border: none; color: white;
    font-size: 1.2rem; cursor: pointer; padding: 5px;
    margin-right: 15px; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; transition: transform 0.2s ease, color 0.2s ease;
}
.play-pause-btn:hover { transform: scale(1.1); color: var(--accent); }
.progress-container {
    flex-grow: 1; height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px; cursor: pointer; position: relative;
}
.progress-bar {
    width: 0%; height: 100%;
    background-color: var(--accent);
    border-radius: 4px; transition: width 0.1s linear;
}
.volume-controls {
    display: flex;
    align-items: center;
    margin: 0 15px;
}
.volume-btn {
    background: none; border: none; cursor: pointer;
    margin-right: 8px; font-size: 16px; color: white;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.volume-slider {
    width: 60px; height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px; cursor: pointer;
    position: relative; overflow: hidden;
}
.volume-level {
    height: 100%; width: 100%;
    background-color: var(--white);
    border-radius: 2px; transition: width 0.2s ease;
}
.fullscreen-btn {
    background: none; border: none; cursor: pointer; color: white;
    font-size: 1.2rem;
    margin-left: 10px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; padding: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}
.fullscreen-btn:hover { transform: scale(1.1); color: var(--accent); }
.fullscreen-btn.minimize-mode { color: var(--accent); }
.time-display {
    color: white; font-size: 0.9rem; min-width: 45px;
    text-align: right; font-variant-numeric: tabular-nums;
}


/* ================================================= */
/* ===== START: REDESIGNED WEB DESIGN SECTION ===== */
/* ================================================= */
.web-design-section.redesigned {
  background-color: var(--black);
  padding: var(--space-lg) 0;
  position: relative;
  overflow: hidden;
}
.web-design-section.redesigned::before,
.web-design-section.redesigned::after {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,184,0,0.2) 50%, rgba(255,255,255,0) 100%);
}
.web-design-section.redesigned::before { top: 0; }
.web-design-section.redesigned::after { bottom: 0; }

/* Section Header Alignment */
.web-design-section.redesigned .section-header {
  text-align: left; /* Align parent left */
  margin-bottom: var(--space-md);
}
/* --- Ensure Web Design H2 has necessary styles for underline --- */
.web-design-section.redesigned .section-header h2 {
  text-align: left;
  display: block; /* Make it block for alignment */
  position: relative; /* Required for ::after positioning */
  padding-bottom: 15px; /* Space for underline */
  margin-bottom: 0; /* Adjust margin */
}
/* --- Define Web Design underline ::after completely --- */
.web-design-section.redesigned .section-header h2::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0; /* Align left */
    transform: translateX(0); /* Override centering */
    width: 0; /* Initial state */
    height: 3px;
    background-color: var(--accent);
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
/* --- Define Web Design underline .in-view animation --- */
.web-design-section.redesigned .section-header h2.in-view::after {
    width: 60px; /* Animate width */
}

/* Web Content Layout */
.web-design-section.redesigned .web-content {
  display: flex;
  flex-direction: column;
}
.web-design-section.redesigned .web-intro {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  margin-bottom: var(--space-lg);
  max-width: 800px;
  opacity: 0.9;
}

/* Subsection Styles */
.web-design-section.redesigned .web-subsection {
    margin-top: var(--space-lg);
}
.web-design-section.redesigned .web-subsection:first-of-type {
    margin-top: 0;
}
.web-design-section.redesigned .web-subsection-title {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: var(--accent);
    margin-bottom: var(--space-xs);
    text-align: left;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}
.web-design-section.redesigned .web-subsection-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--light-gray);
}
.web-design-section.redesigned .web-subsection-intro {
    font-size: clamp(0.9rem, 1.4vw, 1.0rem);
    color: var(--light-gray);
    margin-bottom: var(--space-md);
    max-width: 70ch;
    text-align: left;
}

/* --- Services Grid --- */
.web-design-section.redesigned .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}
.web-design-section.redesigned .service-card {
    background-color: var(--dark-gray);
    border-radius: 8px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 1px solid var(--gray);
}
.web-design-section.redesigned .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
.web-design-section.redesigned .service-icon-wrapper {
    background-color: var(--accent);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}
.web-design-section.redesigned .service-icon {
    font-size: 32px;
    color: var(--black);
}
.web-design-section.redesigned .service-card .service-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-xs);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: 100%;
    padding: 0;
    transition: none;
}
.web-design-section.redesigned .service-card .service-details-text {
    font-size: 0.9rem;
    color: var(--light-gray);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

/* --- Redesigned Team Grid --- */
.web-design-section.redesigned .redesigned-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  padding-top: 8px;
}
.web-design-section.redesigned .redesigned-team-card {
  background-color: var(--dark-gray);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid var(--gray);
}
.web-design-section.redesigned .redesigned-team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
.web-design-section.redesigned .redesigned-team-card .card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  margin: 0 0 var(--space-sm) 0;
  border-radius: 0;
  flex-shrink: 0;
}
.web-design-section.redesigned .redesigned-team-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}
.web-design-section.redesigned .redesigned-team-card:hover .card-image img {
  transform: scale(1.05);
}
.web-design-section.redesigned .redesigned-team-card .card-content {
  padding: 0 var(--space-sm) var(--space-md) var(--space-sm);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.web-design-section.redesigned .redesigned-team-card .team-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}
.web-design-section.redesigned .redesigned-team-card .team-role {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}
.web-design-section.redesigned .redesigned-team-card .team-bio {
  font-size: 0.85rem;
  color: var(--light-gray);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

/* ================================================= */
/* ===== END: REDESIGNED WEB DESIGN SECTION ===== */
/* ================================================= */

/* ========================================== */
/* ===== STANDALONE TEAM SECTION ===== */
/* ========================================== */

.team-section.standalone-team {
    background: linear-gradient(180deg, var(--dark-gray) 0%, var(--black) 100%);
    padding: var(--space-lg) 0;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
}

.team-section.standalone-team::before,
.team-section.standalone-team::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 184, 0, 0.2) 50%, transparent 100%);
}

.team-section.standalone-team::before {
    top: 0;
}

.team-section.standalone-team::after {
    bottom: 0;
}

.team-section.standalone-team .section-header {
    text-align: left;
}

.team-section.standalone-team .section-header h2 {
    text-align: left;
    display: block;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.team-section.standalone-team .section-header h2::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0;
    transform: translateX(0);
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.team-section.standalone-team .section-header h2.in-view::after {
    width: 60px;
}

.team-section.standalone-team .team-content {
    padding: 0;
    position: relative;
}

.team-section.standalone-team .team-intro {
    margin-bottom: var(--space-md);
}

.team-section.standalone-team .standalone-team-grid {
    display: flex;
    grid-template-columns: none;
    gap: 15px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 25px 10px 0;
    position: relative;
    width: 100%;
}

.team-section.standalone-team .standalone-team-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    position: relative;
}

.team-section.standalone-team .standalone-team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.team-section.standalone-team .standalone-team-card:hover::before {
    opacity: 1;
}

.team-section.standalone-team .standalone-team-card:hover {
    transform: translateY(-8px);
    background: var(--card-bg-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 184, 0, 0.2);
}

.team-section.standalone-team .standalone-team-card .card-image {
    width: 100%;
    height: 280px; /* Consistent height for all headshots */
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    flex-shrink: 0;
    position: relative;
}

.team-section.standalone-team .standalone-team-card .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        transparent 70%,
        rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-section.standalone-team .standalone-team-card:hover .card-image::after {
    opacity: 1;
}

.team-section.standalone-team .standalone-team-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(0.9);
}

.team-section.standalone-team .standalone-team-card:hover .card-image img {
    transform: scale(1.08);
    filter: saturate(1);
}

.team-section.standalone-team .standalone-team-card .card-content {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--dark-gray);
    position: relative;
    z-index: 1;
}

.team-section.standalone-team .standalone-team-card .team-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.team-section.standalone-team .standalone-team-card .team-role {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    font-weight: 500;
    transition: color 0.3s ease;
}

.team-section.standalone-team .standalone-team-card .team-bio {
    font-size: 0.85rem;
    color: var(--light-gray);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.team-section.standalone-team .standalone-team-card:hover .team-name {
    color: var(--accent);
}

/* Mobile adjustments for team cards */
@media (max-width: 767px) {
    .team-section.standalone-team .standalone-team-card {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
    }

    .team-section.standalone-team .standalone-team-card .card-image {
        height: 260px; /* Slightly smaller on mobile */
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .team-section.standalone-team .standalone-team-card .card-image {
        height: 240px;
    }
}

/* Medium desktop adjustments */
@media (max-width: 1199px) and (min-width: 992px) {
    .team-section.standalone-team .standalone-team-card .card-image {
        height: 260px;
    }
}

.team-section.standalone-team .container {
    position: relative;
    overflow: hidden;
}

/* ============================================ */
/* ===== END: STANDALONE TEAM SECTION ===== */
/* ============================================ */

/* ===== FEATURES MEDIA QUERIES ===== */

/* --- Mobile (up to 767px) --- */
@media (max-width: 767px) {
    /* Convert to horizontal scrolling layout for mobile */
    .featured-showcase { 
        display: flex;
        grid-template-columns: none; /* Override grid */
        gap: 15px;
        overflow-x: auto;
        scroll-behavior: smooth; /* Ensure smooth scrolling */
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        scrollbar-width: none; /* Firefox - hide scrollbar */
        -ms-overflow-style: none; /* IE/Edge - hide scrollbar */
        padding-bottom: 10px; /* Space for scroll indicators on some browsers */
        padding-right: 25px; /* Extra padding to account for fade effect */
        justify-items: unset; /* Remove centering for horizontal scroll */
        max-width: unset; /* Remove max width for mobile */
        margin: 0; /* Remove auto margin for mobile */
    }
    
    /* Hide scrollbar in webkit browsers */
    .featured-showcase::-webkit-scrollbar {
        display: none;
    }
    
    /* Make each movie card fixed width for horizontal scroll */
    .feature-card {
        flex: 0 0 280px; /* Fixed width, no grow/shrink - same as desktop */
        min-width: 280px; /* Ensure minimum width */
        max-width: 280px; /* Prevent overflow */
        width: 280px; /* Consistent with desktop */
        height: 440px; /* Increased to match desktop */
    }
    
    /* Maintain consistent media height on mobile */
    .feature-media {
        height: 280px; /* Same as desktop */
    }
    
    /* Maintain consistent content height on mobile */
    .feature-content {
        height: 160px; /* Increased to match desktop */
    }
    
    /* Reduce section padding on mobile */
    .recent-visuals-section {
        padding: var(--space-md) 0;
    }
    
    /* Container for horizontal scroll with fade indicator */
    .recent-visuals-section .container {
        position: relative;
    }
    
    /* Add a subtle fade effect on the right to indicate more content */
    .recent-visuals-section .container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 100%;
        background: linear-gradient(to left, rgba(10, 10, 10, 0.8), transparent);
        pointer-events: none;
        z-index: 4;
    }

    /* Timeline/Slider */
    .slider-track { height: 70px; }
    .item-year { font-size: 1.2rem; }
    .item-label { display: none; }
    .slider-item .item-year { margin-bottom: 0; }

    .video-info h3 { font-size: 1.2rem; }
    .video-info p { font-size: 0.9rem; }

    /* Custom Controls Adjustments */
    .custom-video-controls { padding: 8px 10px; }
    .play-pause-btn { font-size: 1rem; margin-right: 10px; }
    .volume-slider { display: none; }
    .volume-controls { margin: 0 8px; }
    .fullscreen-btn { font-size: 1rem; margin: 0 5px; }
    .time-display { font-size: 0.85rem; min-width: 40px; }

    /* === START: Web Design Section Mobile === */
    .web-design-section.redesigned .web-content { padding: 0; }
    .web-design-section.redesigned .web-intro { margin-bottom: var(--space-md); }
    .web-design-section.redesigned .web-subsection { margin-top: var(--space-md); }
    .web-design-section.redesigned .web-subsection:first-of-type { margin-top: 0; }
    .web-design-section.redesigned .web-subsection-intro { margin-bottom: var(--space-sm); }
    
    /* Services Grid Mobile - Convert to horizontal scroll */
    .web-design-section.redesigned .services-grid {
        display: flex;
        grid-template-columns: none; /* Override grid */
        gap: 15px;
        overflow-x: auto;
        scroll-behavior: smooth; /* Ensure smooth scrolling */
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        scrollbar-width: none; /* Firefox - hide scrollbar */
        -ms-overflow-style: none; /* IE/Edge - hide scrollbar */
        padding-bottom: 10px; /* Space for scroll indicators */
        padding-right: 25px; /* Extra padding for fade effect */
    }
    
    /* Hide scrollbar in webkit browsers for services grid */
    .web-design-section.redesigned .services-grid::-webkit-scrollbar {
        display: none;
    }
    
    /* Fixed width service cards for horizontal scroll */
    .web-design-section.redesigned .service-card {
        flex: 0 0 260px; /* Fixed width, no grow/shrink */
        min-width: 260px; /* Ensure minimum width */
        max-width: 260px; /* Prevent overflow */
        padding: var(--space-sm);
    }
    /* === END: Web Design Section Mobile === */

    /* === START: Standalone Team Section Mobile === */
    .team-section.standalone-team .team-content { padding: 0; }
    .team-section.standalone-team .team-intro { margin-bottom: var(--space-md); }
    
    /* Team Grid Mobile - Convert to horizontal scroll */
    .team-section.standalone-team .standalone-team-grid {
        display: flex;
        grid-template-columns: none; /* Override grid */
        gap: 15px;
        overflow-x: auto;
        scroll-behavior: smooth; /* Ensure smooth scrolling */
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        scrollbar-width: none; /* Firefox - hide scrollbar */
        -ms-overflow-style: none; /* IE/Edge - hide scrollbar */
        padding-bottom: 10px; /* Space for scroll indicators */
        padding-right: 25px; /* Extra padding for fade effect */
    }
    
    /* Hide scrollbar in webkit browsers for team grid */
    .team-section.standalone-team .standalone-team-grid::-webkit-scrollbar {
        display: none;
    }
    
    /* Fixed width team cards for horizontal scroll */
    .team-section.standalone-team .standalone-team-card {
        flex: 0 0 260px; /* Fixed width, no grow/shrink */
        min-width: 260px; /* Ensure minimum width */
        max-width: 260px; /* Prevent overflow */
    }
    
    .team-section.standalone-team .standalone-team-card .card-image {
        height: 260px; /* Slightly smaller on mobile */
    }
    .team-section.standalone-team .standalone-team-card .card-image img {
        object-position: center 25%; /* Adjust this percentage as needed */
    }
    /* === END: Standalone Team Section Mobile === */
}

/* --- Tablet (600px - 991px) --- */
@media (min-width: 600px) {
    /* Featured Showcase */
    .featured-showcase { 
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
        gap: 30px;
    }
}

/* --- Medium Mobile (480px - 576px) --- */
@media (max-width: 480px) {
    /* Adjust section padding for medium mobile */
    .recent-visuals-section {
        padding: calc(var(--space-sm) + var(--space-xs)) 0;
    }
    
    /* Optimize horizontal scroll for medium mobile */
    .featured-showcase { 
        gap: 12px; 
    }
    
    /* Smaller card width for medium mobile screens */
    .feature-card {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
    }
    
    /* Intermediate poster ratio */
    .feature-media.poster-ratio {
        aspect-ratio: 4 / 4.65;
    }
    
    /* Intermediate content padding */
    .feature-content {
        padding: 13px;
    }
    
    /* Intermediate text sizes */
    .feature-content h3 {
        font-size: 1.05rem;
    }
    
    .feature-tag {
        font-size: 0.62rem;
        padding: 3px 7px;
    }
    
    .feature-details p {
        font-size: 0.77rem;
    }
    
    /* Team Grid Medium Mobile */
    .web-design-section.redesigned .redesigned-team-grid {
        gap: 12px;
    }
    
    .web-design-section.redesigned .redesigned-team-card {
        flex: 0 0 240px;
        min-width: 240px;
        max-width: 240px;
    }
    
    .web-design-section.redesigned .redesigned-team-card .card-image {
        height: 200px;
    }
    
    /* Services Grid Medium Mobile */
    .web-design-section.redesigned .services-grid {
        gap: 12px;
    }
    
    .web-design-section.redesigned .service-card {
        flex: 0 0 240px;
        min-width: 240px;
        max-width: 240px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* Timeline/Slider */
    .slider-track { height: 80px; }
    .item-year { font-size: 1.3rem; }
    .item-label { font-size: 0.7rem; }

    /* === START: Web Design Section Tablet === */
    .web-design-section.redesigned .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .web-design-section.redesigned .redesigned-team-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-top: 8px;
    }
    /* === END: Web Design Section Tablet === */
    
    /* === START: Standalone Team Section Tablet === */
    .team-section.standalone-team .standalone-team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
        padding-top: 10px;
    }
    
    .team-section.standalone-team .standalone-team-card .card-image {
        height: 200px;
    }
    
    .team-section.standalone-team .standalone-team-card .team-name {
        font-size: 1.1rem;
    }
    
    .team-section.standalone-team .standalone-team-card .team-role {
        font-size: 0.85rem;
    }
    
    .team-section.standalone-team .standalone-team-card .team-bio {
        font-size: 0.8rem;
    }
    /* === END: Standalone Team Section Tablet === */
}


/* --- Desktop (>= 992px) --- */
@media (min-width: 992px) {
    /* Featured Showcase */
    .recent-visuals-section { background-attachment: fixed; }
    .featured-showcase { 
        grid-template-columns: repeat(3, 1fr); /* Changed back to 3 columns for better spacing */
        gap: 30px; /* Increased gap for desktop */
        justify-content: center;
        max-width: 1000px; /* Reduced max width for better centering */
    }

    /* === START: Web Design Section Desktop === */
     .web-design-section.redesigned .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
     .web-design-section.redesigned .redesigned-team-grid {
        grid-template-columns: repeat(4, 1fr);
        padding-top: 8px;
    }
    /* === END: Web Design Section Desktop === */
}

/* --- Large Desktop (>= 1200px) --- */
@media (min-width: 1200px) {
    /* === START: Standalone Team Section Large Desktop === */
    .team-section.standalone-team .standalone-team-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--space-md);
        padding-top: 10px;
    }
    /* === END: Standalone Team Section Large Desktop === */
}

@media (max-width: 1199px) and (min-width: 992px) {
    /* === START: Standalone Team Section Medium Desktop === */
    .team-section.standalone-team .standalone-team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
        padding-top: 10px;
    }
    
    .team-section.standalone-team .standalone-team-card .card-image {
        height: 200px;
    }
    
    .team-section.standalone-team .standalone-team-card .team-name {
        font-size: 1.1rem;
    }
    
    .team-section.standalone-team .standalone-team-card .team-role {
        font-size: 0.85rem;
    }
    
    .team-section.standalone-team .standalone-team-card .team-bio {
        font-size: 0.8rem;
    }
    /* === END: Standalone Team Section Medium Desktop === */
}

/* --- Small Mobile (< 576px) --- */
@media (max-width: 576px) {
    /* Further reduce section padding on very small screens */
    .recent-visuals-section {
        padding: var(--space-sm) 0;
    }
    
    /* Optimize horizontal scroll for small mobile */
    .featured-showcase { 
        gap: 10px; 
    }
    
    /* Even smaller card width for small mobile screens */
    .feature-card {
        flex: 0 0 240px;
        min-width: 240px;
        max-width: 240px;
    }
    
    /* Make posters even more compact on very small screens */
    .feature-media.poster-ratio {
        aspect-ratio: 4 / 4.5; /* Even more compact ratio for small mobile */
    }
    
    /* Further reduce content padding */
    .feature-content {
        padding: 12px;
    }
    
    /* Smaller text on very small screens */
    .feature-content h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .feature-tag {
        font-size: 0.6rem;
        padding: 3px 6px;
        margin-bottom: 8px;
    }
    
    .feature-details {
        margin-bottom: 12px;
    }
    
    .feature-details p {
        font-size: 0.75rem;
    }

    /* Team Grid Small Mobile */
    .web-design-section.redesigned .redesigned-team-grid {
        gap: 10px;
        padding-top: 8px;
    }
    
    .web-design-section.redesigned .redesigned-team-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }
    
    .web-design-section.redesigned .redesigned-team-card .card-image {
        height: 180px;
    }
    
    /* Services Grid Small Mobile */
    .web-design-section.redesigned .services-grid {
        gap: 10px;
    }
    
    .web-design-section.redesigned .service-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }
}

/* Navigation arrows for horizontal scroll sections on desktop at mobile resolutions */
.scroll-nav-container {
    position: relative;
    overflow: hidden; /* Ensure gradient overlays don't leak outside */
}

.scroll-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 184, 0, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--black);
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-nav-arrow:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.scroll-nav-arrow.left {
    left: 10px;
    transform: translateY(-50%) translateX(-10px);
}

.scroll-nav-arrow.right {
    right: 10px;
    transform: translateY(-50%) translateX(10px);
}

/* Show arrows ONLY at mobile resolutions on desktop devices (non-touch) AND when hovering over the section */
@media (max-width: 767px) and (pointer: fine) {
    /* Hide arrows by default - completely invisible */
    .scroll-nav-arrow {
        opacity: 0 !important;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-50%) scale(0.9);
    }
    
    .scroll-nav-arrow.left {
        transform: translateY(-50%) translateX(-15px) scale(0.9);
    }
    
    .scroll-nav-arrow.right {
        transform: translateY(-50%) translateX(15px) scale(0.9);
    }
    
    /* Show arrows when hovering over the sections - completely visible */
    .recent-visuals-section:hover .scroll-nav-arrow,
    .web-design-section.redesigned:hover .scroll-nav-arrow,
    .team-section.standalone-team:hover .scroll-nav-arrow {
        opacity: 1 !important;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }
    
    .recent-visuals-section:hover .scroll-nav-arrow.left,
    .web-design-section.redesigned:hover .scroll-nav-arrow.left,
    .team-section.standalone-team:hover .scroll-nav-arrow.left {
        transform: translateY(-50%) translateX(0) scale(1);
    }
    
    .recent-visuals-section:hover .scroll-nav-arrow.right,
    .web-design-section.redesigned:hover .scroll-nav-arrow.right,
    .team-section.standalone-team:hover .scroll-nav-arrow.right {
        transform: translateY(-50%) translateX(0) scale(1);
    }
    
    /* Add a subtle delay for smoother appearance */
    .scroll-nav-arrow.left {
        transition-delay: 0ms;
    }
    
    .scroll-nav-arrow.right {
        transition-delay: 50ms;
    }
}

/* Hide arrows completely on actual mobile devices (touch capability detection) */
@media (pointer: coarse) {
    .scroll-nav-arrow {
        display: none !important;
    }
}

/* Make movie posters less tall on mobile but more compact for horizontal layout */
.featured-marquee .feature-media.poster-ratio,
.feature-media.poster-ratio {
    aspect-ratio: 4 / 4.8; /* Slightly shorter aspect ratio for mobile */
}

/* Reduce feature content padding on mobile */
.featured-marquee .feature-content,
.feature-content {
    padding: 15px;
}

/* Optimize feature text sizes for mobile */
.featured-marquee .feature-content h3,
.feature-content h3 {
    font-size: 1.1rem;
}

.featured-marquee .feature-tag,
.feature-tag {
    font-size: 0.65rem;
    padding: 4px 8px;
}

.featured-marquee .feature-details p,
.feature-details p {
    font-size: 0.8rem;
}

.featured-marquee .feature-link,
.feature-link {
    font-size: 0.8rem;
}

/* Reduce section padding on mobile */
.recent-visuals-section {
    padding: var(--space-md) 0;
}

/* Container for horizontal scroll with fade indicator */
.recent-visuals-section .container {
    position: relative;
}

/* Add a subtle fade effect on the right to indicate more content (fallback only) */
.recent-visuals-section .container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to left, rgba(10, 10, 10, 0.8), transparent);
    pointer-events: none;
    z-index: 4;
}

/* Hide the fallback fade effect when marquee is enabled */
.featured-showcase.marquee-enabled + .recent-visuals-section .container::after {
    display: none;
}

/* ========================================== */
/* ===== AUTO-SCROLL MARQUEE STYLES (Mobile Only) ===== */
/* ========================================== */

/* Explicitly remove fade overlays on desktop */
@media (min-width: 768px) {
    .featured-showcase[data-auto-scroll-initialized]::before,
    .web-design-section.redesigned .services-grid[data-auto-scroll-initialized]::before,
    .team-section.standalone-team .standalone-team-grid[data-auto-scroll-initialized]::before {
        display: none !important;
        content: none !important;
    }
}

/* Mobile styles for auto-scrolling sections */
@media (max-width: 767px) {
    /* Ensure proper container positioning for all scrollable sections */
    .featured-showcase,
    .web-design-section.redesigned .services-grid,
    .team-section.standalone-team .standalone-team-grid {
        position: relative;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px;
    }

    /* Hide scrollbars */
    .featured-showcase::-webkit-scrollbar,
    .web-design-section.redesigned .services-grid::-webkit-scrollbar,
    .team-section.standalone-team .standalone-team-grid::-webkit-scrollbar {
        display: none;
    }

    /* Ensure parent containers have proper positioning context */
    .recent-visuals-section .container,
    .web-design-section.redesigned .container,
    .team-section.standalone-team .container {
        position: relative;
        overflow: hidden;
    }
}

/* ========================================== */
/* ===== FADE OVERLAYS FOR CAROUSELS (Mobile Only) ===== */
/* ========================================== */

/* Add fade overlays for carousel sections on mobile */
@media (max-width: 767px) {
    /* Ensure carousel containers have proper positioning context and overflow */
    .featured-showcase,
    .web-design-section.redesigned .services-grid,
    .team-section.standalone-team .standalone-team-grid,
    .scroll-nav-container .featured-showcase,
    .scroll-nav-container .services-grid,
    .scroll-nav-container .standalone-team-grid {
        position: relative;
        overflow-x: auto; /* Allow horizontal scrolling */
        overflow-y: hidden; /* Hide vertical overflow for fade effect */
    }

    /* Featured In section - fade overlay on the carousel only */
    .featured-showcase::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            rgba(10, 10, 10, 1) 0%, 
            rgba(10, 10, 10, 1) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            rgba(10, 10, 10, 1) 99%,
            rgba(10, 10, 10, 1) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* When navigation arrows are present, move overlay to navigation container */
    .scroll-nav-container.has-featured-showcase::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            rgba(10, 10, 10, 1) 0%, 
            rgba(10, 10, 10, 1) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            rgba(10, 10, 10, 1) 99%,
            rgba(10, 10, 10, 1) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* Hide the child overlay when parent has the navigation wrapper */
    .scroll-nav-container.has-featured-showcase .featured-showcase::before {
        display: none;
    }

    /* Web Design Services section - fade overlay on the services grid only */
    .web-design-section.redesigned .services-grid::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            var(--black) 0%, 
            var(--black) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            var(--black) 99%,
            var(--black) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* When navigation arrows are present, move overlay to navigation container */
    .scroll-nav-container.has-services-grid::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            var(--black) 0%, 
            var(--black) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            var(--black) 99%,
            var(--black) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* Hide the child overlay when parent has the navigation wrapper */
    .scroll-nav-container.has-services-grid .services-grid::before {
        display: none;
    }

    /* Team section - fade overlay on the team grid only */
    .team-section.standalone-team .standalone-team-grid::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            var(--black) 0%, 
            var(--black) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            var(--black) 99%,
            var(--black) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* When navigation arrows are present, move overlay to navigation container */
    .scroll-nav-container.has-team-grid::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, 
            var(--black) 0%, 
            var(--black) 1%,
            rgba(10, 10, 10, 0.9) 3%,
            rgba(10, 10, 10, 0.5) 5%,
            rgba(10, 10, 10, 0) 7%, 
            rgba(10, 10, 10, 0) 93%, 
            rgba(10, 10, 10, 0.5) 95%,
            rgba(10, 10, 10, 0.9) 97%,
            var(--black) 99%,
            var(--black) 100%);
        pointer-events: none;
        z-index: 10;
    }
    
    /* Hide the child overlay when parent has the navigation wrapper */
    .scroll-nav-container.has-team-grid .standalone-team-grid::before {
        display: none;
    }

    /* Ensure parent containers still have proper positioning for layout */
    .recent-visuals-section .container,
    .web-design-section.redesigned .container,
    .team-section.standalone-team .container {
        position: relative;
    }

    /* Remove the old fallback fade effect */
    .recent-visuals-section .container::after {
        display: none;
    }
}

/* Hide fade overlays on desktop */
@media (min-width: 768px) {
    .featured-showcase::before,
    .web-design-section.redesigned .services-grid::before,
    .team-section.standalone-team .standalone-team-grid::before {
        display: none !important;
        content: none !important;
    }
}

/* ================================================ */
/* ===== VISUAL MEDIA SECTION STYLES ===== */
/* ================================================ */

/* ================================================ */
/* ===== COMBINED SERVICES SECTION STYLES ===== */
/* ================================================ */

.services-section.redesigned {
    background: linear-gradient(180deg, var(--black) 0%, var(--dark-gray) 50%, var(--black) 100%);
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

.services-section.redesigned::before,
.services-section.redesigned::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 184, 0, 0.2) 50%, transparent 100%);
}

.services-section.redesigned::before { top: 0; }
.services-section.redesigned::after { bottom: 0; }

/* Section Header - Now handled in layout.css for consistency */

/* Content Layout */
.services-section.redesigned .services-content {
    padding: 0;
}

.services-section.redesigned .services-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--light-gray);
    margin-bottom: var(--space-md);
    text-align: left;
}

/* Service Category Tabs */
.services-tabs-container {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto var(--space-lg) auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 6px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.services-tabs-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.services-tabs-track {
    display: flex;
    width: 100%;
    height: 50px;
    position: relative;
    gap: 4px;
}

/* Sliding highlight indicator */
.tab-slider-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(50% - 2px);
    height: 100%;
    background: var(--accent);
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 25px rgba(255, 184, 0, 0.45);
    z-index: 0;
}

.tab-slider-indicator.slide-right {
    transform: translateX(calc(100% + 4px));
}

.tab-slider-indicator::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.service-tab {
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
}

.service-tab.active {
    background: transparent;
}

.service-tab.active .tab-category,
.service-tab.active .tab-subtitle {
    color: var(--black);
}

.service-tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08);
}

.service-tab:focus {
    outline: none;
}

.service-tab:active:not(.active) {
    transform: scale(0.98);
}

.tab-category {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1px;
    transition: color 0.3s ease;
}

.tab-subtitle {
    font-size: 0.7rem;
    color: var(--light-gray);
    transition: color 0.3s ease;
    font-weight: 400;
}

.service-tab.active .tab-category,
.service-tab.active .tab-subtitle {
    color: var(--black);
    font-weight: 600;
}

/* Services Display Container */
.services-display-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
}



/* Services Grid */
.services-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
    background-color: var(--dark-gray);
    overflow: visible;
}

.services-grid.active {
    display: grid;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.services-section.redesigned .service-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: visible;
}

.services-section.redesigned .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 20;
}

.services-section.redesigned .service-card:hover {
    transform: translateY(-8px);
    background: var(--card-bg-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 184, 0, 0.2);
}

.services-section.redesigned .service-card:hover::before {
    opacity: 1;
}

/* Services Grid Transitions */
.services-grid {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.services-grid.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
}

/* Staggered card entrance animation - Visual Media (default) */
.services-grid[data-category="media"].active .service-card {
    opacity: 0;
    animation: cardSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.services-grid[data-category="media"].active .service-card:nth-child(1) { animation-delay: 0.02s; }
.services-grid[data-category="media"].active .service-card:nth-child(2) { animation-delay: 0.06s; }
.services-grid[data-category="media"].active .service-card:nth-child(3) { animation-delay: 0.10s; }
.services-grid[data-category="media"].active .service-card:nth-child(4) { animation-delay: 0.14s; }
.services-grid[data-category="media"].active .service-card:nth-child(5) { animation-delay: 0.18s; }
.services-grid[data-category="media"].active .service-card:nth-child(6) { animation-delay: 0.22s; }

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== WEB DEVELOPMENT CODE VIEW - PERSISTENT UNTIL HOVER ===== */
.services-grid[data-category="web"] {
    overflow: visible !important;
}

.services-grid[data-category="web"] .service-card {
    position: relative;
    overflow: visible !important;
}

/* Code editor overlay - visible by default */
.services-grid[data-category="web"] .service-card .code-view {
    position: absolute;
    inset: 0;
    background: #1a1b26;
    border-radius: 16px;
    z-index: 15;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #2a2b3d;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
                background 0.6s ease-out,
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filename bar */
.services-grid[data-category="web"] .service-card .code-view .code-filename-bar {
    height: 28px;
    background: #13141c;
    border-bottom: 1px solid #2a2b3d;
    padding: 6px 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    color: #565869;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.services-grid[data-category="web"] .service-card .code-view .code-filename-bar::before {
    content: '📄';
    margin-right: 6px;
    font-size: 10px;
}

/* Code view content wrapper */
.services-grid[data-category="web"] .service-card .code-view .code-content-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

/* Compiling overlay - appears on hover */
.services-grid[data-category="web"] .service-card .code-view::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(255,184,0,0.1) 0%, 
        rgba(255,184,0,0.05) 50%, 
        transparent 100%);
    opacity: 0;
    z-index: 25;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.services-grid[data-category="web"] .service-card .code-view.animating::after {
    opacity: 1;
    animation: compilePulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes compilePulse {
    0% { opacity: 0; }
    20% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Compiling status bar */
.services-grid[data-category="web"] .service-card .code-view .compile-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 30;
    opacity: 0;
    transition: none;
}

.services-grid[data-category="web"] .service-card .code-view.animating .compile-status {
    opacity: 1;
    animation: compileProgress 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes compileProgress {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* Code content container - no animation, let individual lines animate */
.services-grid[data-category="web"] .service-card:hover .code-content {
    /* No block-level animation - each line animates individually */
}

/* Unique morphing animations based on data-morph-to attribute */

/* EVERY LINE GETS A UNIQUE ANIMATION - Line 1 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(1) {
    animation: line1Anim 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards;
}
@keyframes line1Anim {
    0% { opacity: 1; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(-15px) translateY(-5px); }
}

/* Line 2 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(2) {
    animation: line2Anim 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.025s forwards;
}
@keyframes line2Anim {
    0% { opacity: 1; font-weight: normal; transform: translateX(0); filter: none; }
    30% { font-weight: bold; font-size: 1.1em; transform: translateX(3px); filter: brightness(1.3) hue-rotate(10deg); }
    60% { font-size: 1.2em; transform: translateX(-2px); filter: brightness(1.6) hue-rotate(-10deg); }
    100% { opacity: 0; transform: translateY(-20px); filter: brightness(2); }
}

/* Line 3 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(3) {
    animation: line3Anim 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards;
}
@keyframes line3Anim {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(25px) translateY(3px); }
}

/* Line 4 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(4) {
    animation: line4Anim 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.075s forwards;
}
@keyframes line4Anim {
    0% { opacity: 1; transform: translateX(0) translateY(0); }
    40% { opacity: 0.8; transform: translateX(8px) translateY(-3px); }
    100% { opacity: 0; transform: translateX(30px) translateY(-8px); }
}

/* Line 5 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(5) {
    animation: line5Anim 0.425s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}
@keyframes line5Anim {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(-12px); }
    100% { opacity: 0; transform: translateY(-28px); }
}

/* Line 6 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(6) {
    animation: line6Anim 0.375s cubic-bezier(0.4, 0, 0.2, 1) 0.125s forwards;
}
@keyframes line6Anim {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-20px) translateY(5px); }
}

/* Line 7 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(7) {
    animation: line7Anim 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
}
@keyframes line7Anim {
    0% { opacity: 1; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(18px) translateY(-6px); }
}

/* Line 8 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(8) {
    animation: line8Anim 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.175s forwards;
}
@keyframes line8Anim {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-22px) translateX(-8px); }
}

/* Line 9 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(9) {
    animation: line9Anim 0.475s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}
@keyframes line9Anim {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(22px) translateY(4px); }
}

/* Line 10 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(10) {
    animation: line10Anim 0.425s cubic-bezier(0.4, 0, 0.2, 1) 0.225s forwards;
}
@keyframes line10Anim {
    0% { opacity: 1; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(-18px) translateY(-7px); }
}

/* Line 11 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(11) {
    animation: line11Anim 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}
@keyframes line11Anim {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-25px) translateX(5px); }
}

/* Line 12 */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line:nth-of-type(12) {
    animation: line12Anim 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.275s forwards;
}
@keyframes line12Anim {
    0% { opacity: 1; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(20px) translateY(-10px); }
}

/* Override for icon morph lines - bold, glitch effect */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line[data-morph-to="icon"] {
    animation: iconMorphAnim 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards !important;
}
@keyframes iconMorphAnim {
    0% { opacity: 1; font-weight: normal; font-size: inherit; transform: translateX(0); filter: none; }
    20% { font-weight: bold; font-size: 1.1em; transform: translateX(2px); filter: brightness(1.2); }
    40% { font-size: 1.2em; transform: translateX(2px); filter: brightness(1.4) hue-rotate(10deg); }
    50% { transform: translateX(-2px); filter: brightness(1.6) hue-rotate(-10deg); }
    60% { transform: translateX(3px); filter: brightness(1.8) hue-rotate(15deg); }
    70% { opacity: 0.8; transform: translateX(0); filter: brightness(2) hue-rotate(-15deg); }
    100% { opacity: 0; transform: translateY(-20px); filter: brightness(2.5); }
}

/* Override for title morph lines - character deletion */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line[data-morph-to="title"] {
    animation: titleMorphAnim 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards !important;
}
.services-grid[data-category="web"] .service-card .code-view.animating .code-line[data-morph-to="title"] .code-char-wrapper {
    animation: charDeleteLeftToRight 0.4s steps(20) 0.1s forwards;
}
@keyframes titleMorphAnim {
    0% { opacity: 1; transform: translateX(0); }
    30% { opacity: 0.9; transform: translateX(5px); }
    60% { opacity: 0.5; transform: translateX(15px); }
    100% { opacity: 0; transform: translateX(30px); }
}
@keyframes charDeleteLeftToRight {
    0% { clip-path: inset(0 0 0 0%); }
    100% { clip-path: inset(0 0 0 100%); }
}

/* Override for description morph lines */
.services-grid[data-category="web"] .service-card .code-view.animating .code-line[data-morph-to="description"] {
    animation: descMorphAnim 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards !important;
}
@keyframes descMorphAnim {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(-10px); }
    100% { opacity: 0; transform: translateY(-25px); }
}

/* Gutter morphs and fades */
.services-grid[data-category="web"] .service-card .code-view.animating .code-gutter {
    animation: gutterMorph 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes gutterMorph {
    0% { 
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-10px);
    }
    100% { 
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Code view - visible by default, fades out when animating */
.services-grid[data-category="web"] .service-card .code-view {
    opacity: 1;
    pointer-events: auto;
}

.services-grid[data-category="web"] .service-card .code-view.animating {
    opacity: 0;
    pointer-events: none;
    background: var(--card-bg);
    transition: opacity 0.15s ease-out 0.4s,
                background 0.3s ease-out 0.1s;
}

/* Line numbers gutter */
.services-grid[data-category="web"] .service-card .code-gutter {
    width: 36px;
    background: #13141c;
    border-right: 1px solid #2a2b3d;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.services-grid[data-category="web"] .service-card .code-gutter span {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #565869;
    text-align: right;
    padding-right: 10px;
    line-height: 1.7;
    user-select: none;
}

/* Code content area */
.services-grid[data-category="web"] .service-card .code-content {
    flex: 1;
    padding: 12px 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    overflow: hidden;
}

.services-grid[data-category="web"] .service-card .code-content .code-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Typing animation for code lines on load */
@keyframes codeTypeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Syntax highlighting */
.code-keyword { color: #bb9af7; }
.code-function { color: #7aa2f7; }
.code-string { color: #9ece6a; }
.code-property { color: #73daca; }
.code-value { color: #ff9e64; }
.code-comment { color: #565869; font-style: italic; }
.code-bracket { color: #a9b1d6; }
.code-tag { color: #f7768e; }

/* Blinking cursor */
.services-grid[data-category="web"] .service-card .code-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #c0caf5;
    margin-left: 2px;
    animation: cursorBlink 1s steps(2) infinite;
    vertical-align: middle;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* No entrance animation - just use the default state */

/* Hint text for hover */
.services-grid[data-category="web"] .service-card .code-view .code-hint {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 10px;
    color: #565869;
    font-style: italic;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.services-grid[data-category="web"] .service-card .code-view.animating .code-hint {
    opacity: 0;
}

/* Compiling message - appears on hover */
.services-grid[data-category="web"] .service-card .code-view .compile-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    color: var(--accent);
    opacity: 0;
    z-index: 26;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 0 10px var(--accent);
}

.services-grid[data-category="web"] .service-card .code-view.animating .compile-message {
    animation: compileMessage 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes compileMessage {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    20% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* UI elements - start as code, morph into UI on hover */
.services-grid[data-category="web"] .service-card .service-icon-wrapper,
.services-grid[data-category="web"] .service-card .service-title,
.services-grid[data-category="web"] .service-card .service-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Icon builds from code - glitch effect then pops in */
.services-grid[data-category="web"] .service-card:has(.code-view.animating) .service-icon-wrapper {
    opacity: 1;
    transform: translateY(0);
    animation: iconBuildFromCode 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes iconBuildFromCode {
    0% {
        opacity: 0;
        transform: translateY(25px) translateX(-15px) rotate(-10deg);
        filter: brightness(0.2) hue-rotate(90deg);
    }
    20% {
        opacity: 0.3;
        transform: translateY(20px) translateX(-10px) rotate(-5deg);
        filter: brightness(0.5) hue-rotate(-90deg);
    }
    40% {
        opacity: 0.6;
        transform: translateY(15px) translateX(-5px) rotate(5deg);
        filter: brightness(1) hue-rotate(45deg);
    }
    60% {
        opacity: 0.8;
        transform: translateY(8px) translateX(2px) rotate(-2deg);
        filter: brightness(1.3);
    }
    80% {
        opacity: 0.9;
        transform: translateY(3px) translateX(-1px) rotate(1deg);
        filter: brightness(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg);
        filter: brightness(1);
    }
}

/* Title builds from code - character by character replacement */
.services-grid[data-category="web"] .service-card:has(.code-view.animating) .service-title {
    opacity: 1;
    transform: translateY(0);
    animation: titleBuildFromCode 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes titleBuildFromCode {
    0% {
        opacity: 0;
        transform: translateY(30px) translateX(15px);
        filter: brightness(0.1);
        letter-spacing: 0.3em;
        clip-path: inset(0 100% 0 0);
    }
    30% {
        opacity: 0.4;
        transform: translateY(20px) translateX(8px);
        filter: brightness(0.4);
        letter-spacing: 0.2em;
        clip-path: inset(0 70% 0 0);
    }
    60% {
        opacity: 0.7;
        transform: translateY(10px) translateX(3px);
        filter: brightness(0.8);
        letter-spacing: 0.1em;
        clip-path: inset(0 30% 0 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0);
        filter: brightness(1);
        letter-spacing: normal;
        clip-path: inset(0 0 0 0);
    }
}

/* Description builds from code - fade in from bottom */
.services-grid[data-category="web"] .service-card:has(.code-view.animating) .service-description {
    opacity: 1;
    transform: translateY(0);
    animation: descBuildFromCode 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}

@keyframes descBuildFromCode {
    0% {
        opacity: 0;
        transform: translateY(40px) translateX(-8px);
        filter: brightness(0.1);
        line-height: 0.3;
        clip-path: inset(100% 0 0 0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(20px) translateX(-4px);
        filter: brightness(0.6);
        line-height: 0.8;
        clip-path: inset(50% 0 0 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0);
        filter: brightness(1);
        line-height: normal;
        clip-path: inset(0 0 0 0);
    }
}

.services-section.redesigned .service-icon-wrapper {
    background: var(--accent);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
}

.services-section.redesigned .service-card:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(255, 184, 0, 0.4);
}

.services-section.redesigned .service-icon {
    font-size: 32px;
    color: var(--black);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-section.redesigned .service-card:hover .service-icon {
    transform: scale(1.15);
}

.services-section.redesigned .service-card .service-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-xs);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: 100%;
    padding: 0;
    transition: none;
}

.services-section.redesigned .service-card .service-description {
    font-size: 0.9rem;
    color: var(--light-gray);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

/* Responsive Design */
@media (max-width: 767px) {
    .services-section.redesigned .container {
        padding: 0 8px;
    }
    
    .services-section.redesigned .services-content { 
        padding: 0; 
    }
    
    .services-section.redesigned .services-intro { 
        margin-bottom: var(--space-md);
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Clean Mobile Layout - No Sticky */
    .services-tabs-container {
        max-width: 100% !important;
        margin: 0 auto var(--space-sm) auto !important;
        padding: 4px !important;
        background-color: var(--dark-gray) !important;
        border-radius: 8px !important;
        border: 1px solid var(--gray) !important;
        display: block !important;
        overflow: visible !important;
        position: relative !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    .services-tabs-track { 
        height: 50px !important;
        gap: 4px !important;
        display: flex !important;
        width: 100% !important;
        position: relative !important;
    }
    
    .tab-slider-indicator {
        width: calc(50% - 2px) !important;
        border-radius: 8px !important;
    }
    
    .tab-slider-indicator.slide-right {
        transform: translateX(calc(100% + 4px)) !important;
    }
    
    .service-tab {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        cursor: pointer !important;
        background-color: transparent !important;
        border-radius: 6px !important;
        transition: all 0.3s ease !important;
        border: none !important;
        min-height: 46px !important;
        position: relative !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .service-tab.active {
        background-color: transparent !important;
    }
    
    .service-tab:hover:not(.active) {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }
    
    .tab-category { 
        font-size: clamp(0.75rem, 2.5vw, 0.85rem) !important;
        font-weight: 600 !important;
        color: var(--white) !important;
        line-height: 1.1 !important;
        margin-bottom: 2px !important;
        transition: color 0.3s ease !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        padding: 0 2px !important;
    }
    
    .tab-subtitle { 
        font-size: clamp(0.6rem, 2vw, 0.65rem) !important;
        color: var(--light-gray) !important;
        transition: color 0.3s ease !important;
        font-weight: 400 !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        padding: 0 2px !important;
    }
    
    .service-tab.active .tab-category,
    .service-tab.active .tab-subtitle {
        color: var(--black) !important;
        font-weight: 600 !important;
    }



    /* Services Display Container on Mobile */
    .services-display-container {
        margin: 0;
        border-radius: 12px;
        background-color: var(--dark-gray);
    }

    /* Services Grid on Mobile - Responsive 2-Column Layout */
    .services-grid {
        display: none;
        padding: var(--space-sm);
    }
    
    .services-grid.active {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 0;
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
    }

    .services-section.redesigned .service-card {
        width: 100%;
        padding: 8px;
        background-color: var(--dark-gray);
        border-radius: 8px;
        border: 1px solid var(--gray);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: 150px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        box-sizing: border-box;
        position: relative;
        overflow: visible;
    }

    .services-section.redesigned .service-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .services-section.redesigned .service-icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
        background-color: var(--accent);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .services-section.redesigned .service-icon {
        font-size: 24px;
        color: var(--black);
    }

    .services-section.redesigned .service-card .service-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 8px;
        line-height: 1.2;
        color: var(--white);
    }

    .services-section.redesigned .service-card .service-description {
        font-size: 0.85rem;
        line-height: 1.4;
        margin: 0;
        color: var(--light-gray);
        text-align: center;
    }
    
    /* Mobile code view adjustments */
    .services-grid[data-category="web"] .service-card .code-view {
        border-radius: 8px;
    }
    
    .services-grid[data-category="web"] .service-card .code-gutter {
        width: 24px;
        padding: 6px 0;
    }
    
    .services-grid[data-category="web"] .service-card .code-gutter span {
        font-size: 8px;
        padding-right: 5px;
        line-height: 1.5;
    }
    
    .services-grid[data-category="web"] .service-card .code-content {
        padding: 6px 8px;
        font-size: 9px;
        line-height: 1.4;
    }
    
    .services-grid[data-category="web"] .service-card .code-view::after {
        content: '// tap';
        font-size: 8px;
        bottom: 4px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .services-section.redesigned .container {
        padding: 0 4px;
    }
    
    .services-grid.active {
        gap: 4px;
        padding: 0;
    }

    .services-section.redesigned .service-card {
        padding: 6px;
        min-height: 140px;
    }

    .services-section.redesigned .service-icon-wrapper {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }

    .services-section.redesigned .service-icon {
        font-size: 18px;
    }

    .services-section.redesigned .service-card .service-title {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .services-section.redesigned .service-card .service-description {
        font-size: 0.7rem;
        line-height: 1.3;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .services-grid.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
     .services-grid.active {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        gap: 12px;
        padding-right: 15px;
    }

    .services-section.redesigned .service-card {
        min-width: 200px;
        padding: 14px;
    }
}
