html {
    scroll-behavior: smooth;
}

:root {
    --bg: #0a0a0a;
    --panel: #101010;
    --panel-2: #141414;
    --brand: #fa1515;
    --text: #eaeaea;
    /* brighter body text */
    --muted: #bcbcbc;
    /* for secondary text */
    --line: #242424;
    --radius: 14px;
    --shadow: 0 12px 30px rgba(250, 21, 21, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

html,
body {
    min-width: 600px;
    /* or 500px if you want it a bit wider */
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout helpers */
.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.section {
    padding: 96px 0;
    position: relative;
}

.eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    line-height: 1.05;
    color: #fff;
}

.h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    line-height: 1.1;
    color: #fff;
}

.lead {
    color: #d6d6d6;
    font-size: 1.075rem;
    line-height: 1.65;
}

/* Header */
header {
    width: clamp(500px, 94vw, 1200px);
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    z-index: 1000;
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    gap: 20px;
    padding: 16px 28px;
}

.nav {
    min-width: 500px;
}

.brand,
.links ul,
.btn {
    white-space: nowrap;
}

.brand {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--brand);
}

.brand img {
    height: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    color: #111;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    border: 2px solid #fff;
    transition: 0.25s ease;
    justify-self: end;
}

.btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #000;
    transform: translateY(-2px);
}

.links {
    justify-self: center;
}

.links ul {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.links li a {
    position: relative;
    display: inline-block;
    overflow: hidden;
    height: 1.2em;
    color: #bbb;
    font-weight: 600;
    text-decoration: none;
}

.links li a span {
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.links li a span:nth-child(2) {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(150%);
    opacity: 0;
    color: #fff;
}

.links li a:hover span:nth-child(1) {
    transform: translateY(-150%);
    opacity: 0;
}

.links li a:hover span:nth-child(2) {
    transform: translateY(0);
    opacity: 1;
}

.links a::after {
    display: none;
}

/* --- Dropdown Menu --- */
.has-dropdown {
    position: relative;
}

.dropdown-toggle {
    position: relative;
    padding-right: 16px;
}

.dropdown-toggle::after {
    content: "▾";
    position: absolute;
    right: -12px;
    top: 2px;
    font-size: 0.8em;
    color: #bbb;
    transition: transform 0.25s ease, color 0.25s ease;
}

.links>ul {
    display: flex;
    gap: 32px;
    /* navbar keeps spacing */
    align-items: center;
}

/* Reset for dropdown menus inside */
.links ul ul,
.dropdown-menu {
    gap: 0 !important;
    /* removes gap inside dropdown */
}

/* Dropdown container */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 175px;
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    overflow: hidden;
    /* removes gaps perfectly */
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 999;
    padding: 0;
    margin: 0;
}

/* Dropdown items (no gaps, equal height) */
.dropdown-menu li {
    list-style: none;
    width: 100%;
    height: 58px;
    margin: 0;
    padding: 0;
    background: #0f0f0f;
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

/* Remove top border for first item */
.dropdown-menu li:first-child {
    border-top: none;
}

/* Links fill 100% area of each box */
.dropdown-menu a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #d6d6d6;
    text-align: center;
    transition: color 0.25s ease, background 0.25s ease;
}

/* Hover covers full area — no visual gap */
.dropdown-menu li:hover {
    background: #171717;
    border-color: var(--brand);
    box-shadow: inset 0 0 10px rgba(250, 21, 21, 0.4);
}

.dropdown-menu a:hover {
    color: #fff;
}

/* Dropdown appears smoothly */
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.has-dropdown:hover .dropdown-toggle::after,
.has-dropdown:focus-within .dropdown-toggle::after {
    transform: rotate(180deg);
    color: #fff;
}

/* Mobile version */
@media (max-width: 720px) {
    .dropdown-menu {
        position: static;
        display: block;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .dropdown-menu li {
        height: auto;
    }

    .dropdown-menu a {
        padding: 10px 0;
    }
}

/* Hero */
.hero {
    min-height: 78vh;
    display: grid;
    place-items: center;
    background: radial-gradient(1200px 600px at 50% 0%, rgba(250, 21, 21, 0.08), transparent), url("images/hero-main.png") center/cover no-repeat;
    position: relative;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.55));
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 950px;
    padding: 24px;
}

.hero .lead {
    margin-top: 12px;
}

.hero-actions {
    margin-top: 26px;
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Services */
#services {
    background: #0b0b0b;
}

.services-head {
    text-align: center;
    margin-bottom: 28px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 26px;
}

.card {
    grid-column: span 4;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid #1d1d1d;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: #2a2a2a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card-media {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(1.05);
    transform: scale(1.02);
}

.card-body {
    padding: 22px 22px 24px;
    display: grid;
    gap: 6px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
}

.card-sub {
    color: var(--muted);
    font-size: 0.98rem;
}

/* Stats bar */
.service-stats {
    margin-top: 64px;
    margin-bottom: -75px;
    padding: 26px 20px;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: center;
}

.service-stats .num {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.service-stats .label {
    margin-top: 8px;
    color: #d0d0d0;
    font-weight: 600;
    font-size: 0.95rem;
}

.service-stats .stat:hover .num {
    color: var(--brand);
    transition: color 0.3s ease;
}

/* About */
#about {
    background: radial-gradient(900px 400px at 10% 10%, rgba(250, 21, 21, 0.09), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 44px;
    align-items: center;
}

.about-media {
    position: relative;
}

.about-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #1f1f1f;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.about-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

/* Experience badge */
.xp-badge {
    position: absolute;
    left: 42px;
    bottom: -28px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 18px 24px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.xp-badge .num {
    font-size: 2.2rem;
    font-weight: 900;
    color: #dcdcdc;
    line-height: 1;
}

.xp-badge .label {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    margin-top: 4px;
    white-space: nowrap;
}

.about-text {
    display: grid;
    gap: 16px;
}

.about-text p {
    color: #d8d8d8;
    font-size: 1.05rem;
    line-height: 1.7;
}

.about-actions {
    margin-top: 8px;
}

/* responsive */
@media (max-width: 700px) {
    .rev-slide {
        flex: 0 0 90%;
        padding: 36px 22px;
    }

    .rev-arrow {
        width: 32px;
        height: 32px;
    }
}

/* Footer */
#footer {
    background: #000;
    padding: 80px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.footer-logo {
    width: 160px;
    margin-bottom: 18px;
}

.footer-about p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #cfcfcf;
    margin-bottom: 12px;
}

.footer-nav h4,
.footer-services h4,
.footer-contact h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
}

.footer-nav ul,
.footer-services ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-nav a,
.footer-services a {
    color: #bdbdbd;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-services a:hover {
    color: var(--brand);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #151515;
    color: #fff;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.social-links a:hover {
    background: var(--brand);
}

.footer-phone {
    color: #d6d6d6;
    margin-bottom: 20px;
}

.footer-btn {
    display: inline-block;
    background: #45b649;
    color: #fff;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.25s ease;
}

.footer-btn:hover {
    background: #38a13c;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--line);
    margin-top: 50px;
    font-size: 0.85rem;
    color: #8f8f8f;
}

/* === SERVICE DETAIL (TEXT LEFT, IMAGE RIGHT) === */
.service-detail-flip {
    background: #0a0a0a;
    padding: 100px 0;
}

.service-grid-flip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 50px;
    align-items: center;
}

/* Keep text first, image second */
.service-text-flip {
    order: 1;
}

.service-photo-flip {
    order: 2;
}

.service-text-flip h2 {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    color: #fff;
    margin-bottom: 18px;
}

.service-text-flip p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.service-text-flip h3 {
    margin-top: 24px;
    color: #fff;
}

/* Keep consistent rectangular aspect ratio for service images */
.service-photo-flip {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius);
}

.service-photo-flip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.service-photo-flip img:hover {
    transform: scale(1.03);
}

/* Add red gradient glow like the About section */
.service-detail-flip {
    background: radial-gradient(1000px 500px at 90% 10%, rgba(250, 21, 21, 0.08), transparent), var(--bg);
    padding: 100px 0;
    position: relative;
}

/* Contact button styling */
.btn-outline-flip {
    display: inline-block;
    border: 2px solid var(--brand);
    color: var(--brand);
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 20px;
    transition: 0.25s ease;
}

.btn-outline-flip:hover {
    background: var(--brand);
    color: #000;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .service-grid-flip {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-text-flip {
        order: 1;
    }

    .service-photo-flip {
        order: 2;
    }
}

.work-gallery-simple {
    background: #0b0b0b;
    padding: 80px 0;
    border-top: 1px solid var(--line);
}

.work-gallery-simple .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    width: min(1200px, 92%);
    margin: 0 auto;
}

.work-gallery-simple img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid #1a1a1a;
    filter: brightness(0.92) contrast(1.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-gallery-simple img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(250, 21, 21, 0.15);
}

/* Responsive footer */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-btn {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .cards .card {
        grid-column: span 6;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .xp-badge {
        left: 24px;
        bottom: -22px;
    }

    .about-img {
        height: 420px;
    }
}

@media (max-width: 720px) {
    .nav {
        gap: 12px;
        padding: 14px 20px;
    }

    .links ul {
        gap: 18px;
    }
}

@media (max-width: 640px) {
    header {
        inset: 14px auto auto 50%;
    }

    .nav {
        padding: 12px 14px;
    }

    .cards .card {
        grid-column: span 12;
    }

    .about-img {
        height: 320px;
    }

    .xp-badge .num {
        font-size: 1.8rem;
    }
}