/* ====== CSS CUSTOM PROPERTIES ====== */
:root {
    /* Brand: SDC logo red (#FE0000) and black */
    --brand-red: #fe0000;
    --primary: #161616;
    --primary-light: #e00000;
    --primary-dark: #0a0a0a;
    --accent: #e00000;
    --accent-hover: #c40000;
    --text: #161616;
    --text-secondary: #4b4b4b;
    --text-light: #767676;
    --bg: #ffffff;
    --bg-alt: #f6f6f6;
    --bg-dark: #111111;
    --bg-card: #ffffff;
    --border: #e6e6e6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

/* ====== RESET & BASE ====== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== NAVBAR ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

/* The logo PNGs have transparent padding, so the negative margin keeps the navbar height compact */
.logo-img {
    height: 76px;
    width: auto;
    margin: -10px 0;
    transition: var(--transition);
}

.logo-img-dark { display: none; }

.navbar.scrolled .logo-img { height: 62px; }
.navbar.scrolled .logo-img-light { display: none; }
.navbar.scrolled .logo-img-dark { display: block; }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: var(--bg);
    transition: var(--transition);
}

.logo-sub {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.navbar.scrolled .logo-name { color: var(--primary-dark); }
.navbar.scrolled .logo-sub { color: var(--text-secondary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.navbar.scrolled .nav-link {
    color: var(--text-secondary);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--accent);
    background: rgba(224, 0, 0, 0.06);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-phone:hover { background: rgba(255,255,255,0.15); }

.navbar.scrolled .nav-phone {
    color: var(--text);
}

.navbar.scrolled .nav-phone:hover {
    background: rgba(0,0,0,0.05);
}

.nav-cta {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(224, 0, 0, 0.35);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--text);
}

/* ====== HERO ====== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 8, 8, 0.88) 0%,
        rgba(20, 20, 20, 0.6) 50%,
        rgba(8, 8, 8, 0.78) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.08;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.text-gradient {
    background: linear-gradient(135deg, #ff4040, var(--brand-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 0, 0, 0.35);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat {
    text-align: left;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-plus {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-red);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.2);
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    right: 60px;
    z-index: 2;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

/* ====== SECTION COMMON STYLES ====== */
.section-header {
    text-align: center;
    margin-bottom: 52px;
}

.section-header-left {
    text-align: left;
    margin-bottom: 0;
}

.section-header-left .section-tag {
    padding-left: 0;
}

.section-header-left .section-tag::before {
    display: none;
}

.section-header-left .section-desc {
    margin: 0;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 16px;
    position: relative;
    padding: 0 20px;
}

.section-tag::before,
.section-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--primary-light);
}

.section-tag::before { right: 100%; }
.section-tag::after { left: 100%; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ====== SERVICES SECTION ====== */
.services {
    padding: 96px 0;
    background: var(--bg);
}

.service-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 80px;
}

.service-showcase.reverse {
    direction: rtl;
}

.service-showcase.reverse > * {
    direction: ltr;
}

.service-number {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(224, 0, 0, 0.08);
    line-height: 1;
    margin-bottom: -16px;
}

.service-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.25;
}

.service-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.service-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.feature svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.service-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.05);
    pointer-events: none;
}

.image-frame img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-frame:hover img {
    transform: scale(1.05);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.service-card {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 0, 0, 0.12);
    background: var(--bg);
}

.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--primary-light);
    transition: var(--transition);
}

.service-card:hover .card-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.service-card h4 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====== MASTERCREAM ====== */
.mastercream-section {
    padding: 88px 0;
    background: linear-gradient(135deg, var(--primary-dark), #1f1f1f);
    position: relative;
    overflow: hidden;
}

.mastercream-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(254, 0, 0, 0.14) 0%, transparent 70%);
    border-radius: 50%;
}

.mc-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.mc-content .section-tag {
    color: rgba(255,255,255,0.7);
}

.mc-content .section-tag::before,
.mc-content .section-tag::after {
    background: rgba(255,255,255,0.3);
}

.mc-content .section-title {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.mc-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    max-width: 640px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.mc-sizes {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.mc-sizes span {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
}

/* Column ratio matches the two images' aspect ratios (16:9 and ~0.84) so they share one height */
.mc-gallery {
    display: grid;
    grid-template-columns: 1.778fr 0.84fr;
    gap: 20px;
    margin-bottom: 48px;
}

.mc-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* ====== PROJECTS (IMPROVED) ====== */
.projects {
    padding: 96px 0;
    background: var(--bg-alt);
}

/* Left-aligned header with filters on the right, to vary the centered rhythm */
.projects-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 40px;
}

.projects-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-btn {
    padding: 10px 20px;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Slider: a horizontal track that snaps card by card (swipe on phones, arrows on desktop) */
.projects-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    padding: 12px 4px 24px;
    margin: -12px -4px 0;
    scrollbar-width: none;
}

.projects-track::-webkit-scrollbar {
    display: none;
}

.projects-track.switching .project-card {
    animation: fadeInUp 0.5s ease-out;
}

.project-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.project-card[hidden] {
    display: none;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-card:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 4px;
}

/* Horizontal videos */
.project-card.wide {
    flex-basis: 624px;
}

/* Most project videos are vertical (phone), so cards are tall */
.project-image {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--bg-dark);
}

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.carousel-progress {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
}

.carousel-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.carousel-count {
    min-width: 56px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.project-image video,
.project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image video,
.project-card:hover .project-image img {
    transform: scale(1.04);
}

.project-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    pointer-events: none;
    transition: var(--transition);
}

.project-card:hover .project-play {
    opacity: 0;
    transform: scale(0.8);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(10, 10, 10, 0.95) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 32px;
    opacity: 0;
    transition: var(--transition-slow);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    transform: translateY(20px);
    transition: var(--transition-slow);
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.project-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 8px;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

/* Video lightbox */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 16px 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.video-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.video-lightbox video,
.video-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    background: #000;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.video-lightbox.single .lightbox-nav {
    display: none;
}

.lightbox-caption {
    position: absolute;
    top: 24px;
    left: 72px;
    right: 72px;
    text-align: center;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* ====== CLIENTS (IMPROVED) ====== */
.clients {
    padding: 96px 0;
    background: var(--bg);
}

.clients-showcase {
    margin-bottom: 64px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients-track {
    display: flex;
    gap: 24px;
    animation: scroll 60s linear infinite;
    width: max-content;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo {
    flex-shrink: 0;
    width: 220px;
    height: 120px;
    background: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.client-logo:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Logos with their own solid background fill the whole card */
.client-logo-fill {
    padding: 0;
}

.client-logo-fill img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

/* Trust Indicators */
.trust-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.trust-card {
    text-align: center;
    padding: 40px 32px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.trust-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(224, 0, 0, 0.15);
}

.trust-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(224, 0, 0, 0.07);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: var(--transition);
}

.trust-card:hover .trust-icon {
    background: var(--accent);
    color: #fff;
}

.trust-card h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.trust-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====== CONTACT ====== */
.contact {
    padding: 96px 0;
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info .section-tag {
    padding-left: 0;
}

.contact-info .section-tag::before {
    display: none;
}

.contact-info .section-title {
    text-align: left;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 36px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(224, 0, 0, 0.07);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-item a {
    color: var(--primary-light);
}

.contact-item a:hover {
    color: var(--primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-light);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(224, 0, 0, 0.1);
}

.form-group label {
    position: absolute;
    left: 18px;
    top: 14px;
    font-size: 15px;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    background: var(--bg);
    padding: 0 6px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23767676' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-note {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: center;
}

/* ====== OFFICE MAP (Contacto) ====== */
.office-map {
    margin-top: 64px;
    height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    background: var(--bg);
}

gmpx-store-locator {
    display: block;
    width: 100%;
    height: 100%;
    /* Locator Plus look: https://github.com/googlemaps/extended-component-library/blob/main/src/store_locator/README.md */
    --gmpx-color-surface: #fff;
    --gmpx-color-on-surface: var(--text);
    --gmpx-color-on-surface-variant: var(--text-light);
    --gmpx-color-primary: var(--accent);
    --gmpx-color-outline: var(--border);
    --gmpx-fixed-panel-width-row-layout: 24em;
    --gmpx-fixed-panel-height-column-layout: 45%;
    --gmpx-font-family-base: var(--font-main);
    --gmpx-font-family-headings: var(--font-display);
    --gmpx-font-size-base: 0.875rem;
    --gmpx-hours-color-open: #188038;
    --gmpx-hours-color-closed: #d50000;
    --gmpx-rating-color: #ffb300;
    --gmpx-rating-color-empty: #e0e0e0;
}

@media (max-width: 768px) {
    .office-map {
        margin-top: 48px;
        height: 620px;
    }
}

/* ====== SURVEY (LEVANTAMIENTO) SECTION ====== */
.survey {
    padding: 96px 0;
    background: var(--bg-dark);
    color: #fff;
}

.survey-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.survey-grid > * {
    min-width: 0;          /* the day strip scrolls inside the card instead of widening it */
}

.survey-info .section-tag {
    padding-left: 0;
}

.survey-info .section-tag::before {
    display: none;
}

.survey-info .section-title {
    color: #fff;
}

.survey-desc {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.survey-hours {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
}

.survey-hours h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.survey-hours-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.survey-hours-row span {
    color: rgba(255, 255, 255, 0.72);
}

.survey-hours-row strong {
    white-space: nowrap;
}

.survey-hours-row.closed strong {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.survey-steps {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.survey-steps li {
    counter-increment: step;
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.72);
}

.survey-steps li::before {
    content: counter(step);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.survey-steps strong {
    color: #fff;
}

.survey .contact-form-wrapper {
    color: var(--text);
}

.survey-form h3 {
    margin-bottom: 24px;
}

.survey-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.survey-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.survey-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.survey-chip {
    font-family: var(--font-main);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.survey-chip:hover {
    border-color: var(--primary-light);
}

.survey-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.survey-chip:focus-visible {
    outline: 3px solid rgba(224, 0, 0, 0.35);
    outline-offset: 2px;
}

.survey-day {
    flex: 0 0 64px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    text-transform: capitalize;
}

.survey-day strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.1;
}

.survey-day span {
    color: var(--text-light);
}

.survey-day.selected span {
    color: rgba(255, 255, 255, 0.75);
}

.survey-time {
    padding: 11px 6px;
    font-size: 14px;
    font-weight: 600;
}

.survey-hint {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    color: var(--text-light);
}

.survey-error {
    background: rgba(224, 0, 0, 0.07);
    color: var(--accent-hover);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: -8px 0 20px;
}

.survey-done {
    text-align: center;
    padding: 24px 0 8px;
}

.survey-done-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #2ecc71;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.survey-done h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.survey-done p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.survey-again {
    margin-top: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .survey-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

/* levantamiento.html: the section is the page, under the fixed menu */
.survey.survey-page {
    padding-top: 150px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .survey {
        padding: 72px 0;
    }

    .survey.survey-page {
        padding-top: 112px;
    }
}

/* ====== FOOTER ====== */
.footer {
    background: var(--bg-dark);
    padding: 80px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer .nav-logo {
    margin-bottom: 20px;
}

.footer .logo-name { color: #fff; }
.footer .logo-sub { color: rgba(255,255,255,0.5); }

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    max-width: 320px;
}

.footer-links-group h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links-group li {
    margin-bottom: 10px;
}

.footer-links-group a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.footer-links-group a:hover {
    color: rgba(255,255,255,0.9);
    padding-left: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
}

.back-to-top {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.back-to-top:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* ====== WHATSAPP FLOAT ====== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ====== SCROLL ANIMATIONS ====== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== RESPONSIVE ====== */
/* Medium screens: the menu has 6 items, so the phone shows as an icon and the links are tighter */
/* Seven menu links: tighter links so the phone number stays on one line */
@media (max-width: 1440px) {
    .nav-link {
        padding: 8px 11px;
    }
}

.nav-link,
.nav-phone {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .nav-phone span {
        display: none;
    }

    .nav-link {
        padding: 8px 10px;
    }
}

/* Tablets before the phone menu: only the SDC logo, without its name */
@media (min-width: 769px) and (max-width: 960px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 1024px) {
    .service-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-showcase.reverse {
        direction: ltr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .trust-indicators {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 12px;
        transform: translateX(100%);
        transition: var(--transition-slow);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links .nav-link {
        color: rgba(255,255,255,0.8);
        font-size: 1.2rem;
        padding: 12px 32px;
    }

    .nav-links .nav-link:hover,
    .nav-links .nav-link.active {
        color: #fff;
        background: rgba(255,255,255,0.1);
    }

    .nav-actions {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-stats {
        gap: 16px;
        align-items: flex-start;
    }

    .stat {
        flex: 1;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-plus {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 12px;
        line-height: 1.3;
    }

    .stat-divider {
        height: 40px;
        align-self: center;
    }

    .section-title br {
        display: none;
    }

    .projects-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .services,
    .projects,
    .clients,
    .contact {
        padding: 72px 0;
    }

    .service-features {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .mc-gallery {
        grid-template-columns: 1fr;
    }

    /* Phone: one card fills most of the width and the next one peeks in */
    .projects-track {
        gap: 14px;
        margin-right: -24px;
        padding-right: 24px;
    }

    .project-card,
    .project-card.wide {
        flex-basis: 78%;
    }

    .project-image {
        height: 440px;
    }

    .projects-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        scrollbar-width: none;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 9px 18px;
    }

    .video-lightbox {
        padding-bottom: 96px;
    }

    .lightbox-nav {
        top: auto;
        bottom: 24px;
        margin-top: 0;
    }

    .project-overlay {
        opacity: 1;
    }

    .project-info {
        transform: translateY(0);
    }

    .trust-indicators {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .hero-scroll {
        display: none;
    }

    .section-tag::before,
    .section-tag::after {
        width: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .client-logo {
        width: 170px;
        height: 96px;
    }

    .logo-img { height: 60px; }
    .navbar.scrolled .logo-img { height: 52px; }

    .image-frame img {
        height: 300px;
    }
}
