/* =========================
   Local Font (No Google Fonts)
========================= */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* =========================
   Reset
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    color: #eef4ff;
    min-height: 100vh;
    line-height: 1.8;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.25), transparent 30%),
        radial-gradient(circle at left, rgba(32, 211, 255, 0.18), transparent 25%),
        linear-gradient(180deg, #06111f 0%, #0a1426 45%, #07111f 100%);
    animation: pageFadeIn 0.35s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}

:root {
    --bg: #07111f;
    --surface: rgba(13, 22, 38, 0.72);
    --surface-2: rgba(18, 28, 46, 0.9);
    --primary: #5b8cff;
    --primary-2: #20d3ff;
    --text: #eef4ff;
    --muted: #a8b4cc;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

:focus-visible {
    outline: 2px solid rgba(32, 211, 255, 0.85);
    outline-offset: 3px;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* =========================
   Top spacing fix
========================= */
/* صفحه اصلی */
main {
    padding-top: 14px;
}

/* هرو صفحه اصلی */
.hero {
    padding: 28px 0 36px;
}

/* صفحات خدمات */
.service-page .hero {
    padding: 28px 0 35px;
}

/* =========================
   Background blurs
========================= */
.bg-blur {
    position: fixed;
    filter: blur(90px);
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

.bg-blur-1 {
    width: 280px;
    height: 280px;
    top: 60px;
    right: -60px;
    background: #4f8cff;
}

.bg-blur-2 {
    width: 220px;
    height: 220px;
    bottom: 120px;
    left: -50px;
    background: #20d3ff;
}

/* =========================
   Header / Navigation
========================= */
.header,
.page-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 17, 31, 0.72);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: visible;
}

.nav-wrap,
.page-header .container {
    position: relative;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 5000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 8px 20px rgba(91, 140, 255, 0.35));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text span {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.2px;
    color: #eef4ff;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.dropdown-toggle,
.nav-cta,
.header-links a,
.header-links .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 0.96rem;
    transition: 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.nav-link:hover,
.dropdown-toggle:hover,
.header-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.28), rgba(32, 211, 255, 0.18));
    border-color: rgba(91, 140, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.08);
}

.nav-cta,
.header-links .btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #06111f;
    font-weight: 800;
    border: none;
    box-shadow: 0 14px 30px rgba(79, 140, 255, 0.3);
}

.nav-cta:hover,
.header-links .btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    gap: 8px;
}

.chevron {
    display: inline-block;
    transition: transform 0.25s ease;
    font-size: 0.9rem;
    opacity: 0.9;
}

.dropdown:hover .chevron,
.dropdown.open .chevron,
.dropdown:focus-within .chevron {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    width: 300px;
    padding-top: 8px;
    z-index: 2500;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.22s ease;
}

.dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(9, 17, 31, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.dropdown-inner a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #eef4ff;
    transition: 0.2s ease;
}

.dropdown-inner a:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(-2px);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-inner a.active-service {
    background: rgba(91, 140, 255, 0.18);
    border: 1px solid rgba(91, 140, 255, 0.22);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #eef4ff;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 1.15rem;
    cursor: pointer;
    transition: 0.25s ease;
    position: relative;
    z-index: 6000;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

/* =========================
   Main page: Hero
========================= */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 42px;
}

.hero-copy {
    padding: 20px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.92rem;
    color: #dce8ff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 4.1rem);
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

.hero h1 span {
    background: linear-gradient(135deg, #8db6ff 0%, #20d3ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text {
    color: var(--muted);
    max-width: 640px;
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #06111f;
    box-shadow: 0 14px 30px rgba(79, 140, 255, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-box strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.stat-box span {
    color: var(--muted);
    font-size: 0.93rem;
}

/* =========================
   Hero card: right-skewed by default, straight on hover
========================= */
.hero-panel {
    position: relative;
    perspective: 1200px;
    width: 100%;
}

.hero-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transform: perspective(1200px) rotateY(10deg) rotateX(5deg);
    transform-style: preserve-3d;
    will-change: transform;
    transition:
        transform 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-8px) scale(1.01);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 4.2;
    object-fit: cover;
    display: block;
}

.hero-card-info {
    padding: 22px;
}

.hero-card-info h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.hero-card-info p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* =========================
   Sections
========================= */
section {
    padding: 70px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 30px;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: #9ec0ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    margin-bottom: 10px;
}

.section-head p {
    color: var(--muted);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(91, 140, 255, 0.28);
}

.service-image {
    display: block;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: 0.35s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.06);
}

.service-body {
    padding: 20px;
    position: relative;
}

.service-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(91, 140, 255, 0.15);
    color: #cfe0ff;
    font-size: 0.85rem;
    border: 1px solid rgba(91, 140, 255, 0.18);
}

.service-body h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.service-body p {
    color: var(--muted);
    font-size: 0.95rem;
    min-height: 64px;
}

.card-link {
    display: inline-flex;
    margin-top: 12px;
    color: #8ecbff;
    font-weight: 700;
}

.card-link:hover {
    color: #d9f3ff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(32, 211, 255, 0.22);
}

.feature-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    flex: 0 0 48px;
    color: #06111f;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* =========================
   Footer
========================= */
.footer {
    margin-top: 40px;
    padding-top: 26px;
    background: rgba(6, 15, 27, 0.92);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
    padding: 30px 0;
}

.footer h3,
.footer h4 {
    margin-bottom: 12px;
}

.footer p,
.footer li a {
    color: var(--muted);
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 10px;
}

.footer li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding: 16px 0;
    color: #98a7c4;
    font-size: 0.92rem;
}

/* =========================
   Service pages base
========================= */
.service-page {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    color: #eef4ff;
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.25), transparent 30%),
        radial-gradient(circle at left, rgba(32, 211, 255, 0.15), transparent 25%),
        linear-gradient(180deg, #06111f 0%, #0a1426 45%, #07111f 100%);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.service-page a {
    color: inherit;
    text-decoration: none;
}

.service-page main {
    padding: 0;
}

.service-page .hero {
    padding: 28px 0 35px;
}

.service-page .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
}

.service-page .hero-box,
.service-page .info-box,
.service-page .order-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    backdrop-filter: blur(16px);
}

.service-page .hero-box {
    padding: 28px;
}

.service-page .hero-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(91, 140, 255, 0.15);
    color: #dce8ff;
    border: 1px solid rgba(91, 140, 255, 0.18);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.service-page .hero-box h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.35;
    margin: 0 0 16px;
    font-weight: 900;
}

.service-page .hero-box h1 span {
    background: linear-gradient(135deg, #8db6ff 0%, #20d3ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.service-page .hero-box p {
    color: #a8b4cc;
    line-height: 2;
    font-size: 1rem;
    margin-bottom: 22px;
}

.service-page .hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.service-page .hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    min-height: 100%;
}

.service-page .hero-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 28px;
    display: block;
}

.service-page section {
    padding: 35px 0;
}

.service-page .section-head {
    text-align: center;
    margin-bottom: 22px;
}

.service-page .section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    margin-bottom: 10px;
}

.service-page .section-head p {
    color: #a8b4cc;
}

.service-page .feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.service-page .feature-card {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.service-page .feature-number {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #5b8cff, #20d3ff);
    color: #06111f;
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 46px;
}

.service-page .feature-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.service-page .feature-card p {
    margin: 0;
    color: #a8b4cc;
    line-height: 1.9;
    font-size: 0.95rem;
}

.service-page .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.service-page .info-box {
    padding: 24px;
}

.service-page .info-box h3 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.service-page .info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-page .info-box li {
    margin-bottom: 10px;
    color: #c7d6f5;
    line-height: 1.9;
}

.service-page .order-box {
    padding: 28px;
    text-align: center;
}

.service-page .order-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(32, 211, 255, 0.12);
    color: #dff8ff;
    border: 1px solid rgba(32, 211, 255, 0.18);
    font-weight: 700;
}

.service-page .order-box h2 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.service-page .order-box p {
    color: #a8b4cc;
    max-width: 760px;
    margin: 0 auto 18px;
    line-height: 2;
}

.service-page .order-points {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.service-page .order-points span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #eef4ff;
    font-size: 0.92rem;
}

.service-page .order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #5b8cff, #20d3ff);
    color: #06111f;
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(79, 140, 255, 0.3);
    transition: 0.25s ease;
}

.service-page .order-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.service-page .footer {
    margin-top: 28px;
    padding: 26px 0 18px;
    background: rgba(6, 15, 27, 0.92);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.service-page .footer .container {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 20px;
}

.service-page .footer p,
.service-page .footer li a {
    color: #a8b4cc;
    line-height: 2;
}

.service-page .footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-page .footer-bottom {
    text-align: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #8fa0c0;
}

/* =========================
   Intro animations
========================= */
html.js .intro-item {
    opacity: 0;
    transform: translateX(24px) translateY(18px) scale(0.98);
    filter: blur(5px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.75s ease;
    transition-delay: var(--intro-delay, 0ms);
    will-change: opacity, transform, filter;
}

html.js .intro-reveal {
    opacity: 0;
    transform: translateX(26px);
    clip-path: inset(0 0 0 100%);
    filter: blur(5px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.8s ease;
    transition-delay: var(--intro-delay, 0ms);
    will-change: opacity, transform, clip-path, filter;
}

html.js .intro-zoom {
    opacity: 0;
    transform: translateX(14px) scale(0.94);
    filter: blur(6px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.8s ease;
    transition-delay: var(--intro-delay, 0ms);
    will-change: opacity, transform, filter;
}

html.js .intro-fade {
    opacity: 0;
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.8s ease;
    transition-delay: var(--intro-delay, 0ms);
    will-change: opacity, filter;
    filter: blur(4px);
}

body.intro-ready .intro-item {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: blur(0);
}

body.intro-ready .intro-reveal {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0 0 0 0);
    filter: blur(0);
}

body.intro-ready .intro-zoom {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
}

body.intro-ready .intro-fade {
    opacity: 1;
    filter: blur(0);
}

.intro-counter {
    display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
    html.js .intro-item,
    html.js .intro-reveal,
    html.js .intro-zoom,
    html.js .intro-fade {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        filter: none !important;
        transition: none !important;
    }

    body {
        animation: none !important;
    }

    body.page-leaving {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================
   Page transition
========================= */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-leaving {
    opacity: 0 !important;
    transform: translateY(8px) scale(0.99) !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
    pointer-events: none;
}

/* =========================
   Responsive
========================= */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-page .hero-grid,
    .service-page .content-grid,
    .service-page .footer .container {
        grid-template-columns: 1fr;
    }

    .service-page .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: fixed;
        top: 92px;
        right: 4%;
        left: 4%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        background: rgba(7, 17, 31, 0.98);
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.35);
        backdrop-filter: blur(18px);
        z-index: 5500;
        max-height: calc(100vh - 120px);
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: 0.25s ease;
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link,
    .dropdown-toggle,
    .nav-cta,
    .header-links a,
    .header-links .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .header-links {
        width: 100%;
        justify-content: center;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        padding-top: 0;

        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;

        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease, padding-top 0.28s ease;
    }

    .dropdown-inner {
        overflow: hidden;
        padding: 0 12px;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .dropdown.open .dropdown-content {
        max-height: 600px;
        padding-top: 10px;
    }

    .dropdown.open .dropdown-inner {
        padding: 12px;
        background: rgba(9, 17, 31, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .service-page .footer .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        width: min(100%, 440px);
        margin: 0 auto;
    }

    /* right skew on mobile too */
    .hero-card {
        transform: perspective(1000px) rotateY(6deg) rotateX(3deg);
    }

    .hero-card:hover {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-4px) scale(1.005);
    }

    .hero-card img {
        aspect-ratio: 16 / 10;
        max-height: 260px;
        object-fit: cover;
        object-position: center;
    }

    .container {
        width: min(1200px, 94%);
    }

    .service-page .feature-grid {
        grid-template-columns: 1fr;
    }

    .service-page .hero-image {
        width: min(100%, 440px);
        margin: 0 auto;
    }

    .service-page .hero-image img {
        max-height: 250px;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        object-position: center;
    }

    /* reduce top spacing more on mobile */
    main {
        padding-top: 8px;
    }

    .hero {
        padding: 14px 0 28px;
    }

    .service-page .hero {
        padding: 14px 0 28px;
    }
}

/* Touch devices: keep right skew and no weird flattening */
@media (hover: none) and (pointer: coarse) {
    .hero-card,
    .hero-card:hover {
        transform: perspective(1000px) rotateY(6deg) rotateX(3deg);
    }
}