/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Custom Properties */
:root {
    --primary-color: #ff9900;
    --secondary-color: #f9cb9c;
    --background-dark: #000000;
    --text-light: #ffffff;
    --text-muted: #969696;
    --accent-blue: #4a90e2;
    --accent-green: #7ed321;
    
    --font-primary: 'Antonio', Arial, sans-serif;
    --font-secondary: Arial, sans-serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    --border-radius: 8px;
    --max-width: 1200px;
}

/* Base Typography */
body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--background-dark);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}
img {
    display:
    block;
    width: 100%;
    height: 100%;
    object-fit:
    cover;
}

/* Typography Scale */
h1 {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    text-align: center;
    position: relative;
    z-index: 1;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

/* Header Section */
.header {
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--background-dark) 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 153, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(126, 211, 33, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='stars' patternUnits='userSpaceOnUse' width='100' height='100'%3E%3Ccircle cx='20' cy='30' r='1' fill='%23ff9900' opacity='0.3'/%3E%3Ccircle cx='80' cy='20' r='0.5' fill='%23ffffff' opacity='0.5'/%3E%3Ccircle cx='60' cy='70' r='1.5' fill='%23f9cb9c' opacity='0.4'/%3E%3Ccircle cx='30' cy='80' r='0.8' fill='%23ffffff' opacity='0.3'/%3E%3Ccircle cx='90' cy='60' r='0.5' fill='%23ff9900' opacity='0.6'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23stars)'/%3E%3C/svg%3E");
    opacity: 0.3;
    animation: starfield 30s linear infinite;
}

@keyframes starfield {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.logo {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(255, 153, 0, 0.3);
}

.tagline {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-dark) !important;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Main Content Sections */
.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section:last-of-type {
    padding-bottom: var(--spacing-lg);
}

.section:nth-child(even) {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.5) 0%, rgba(42, 42, 42, 0.3) 100%);
}

.section:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 153, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(74, 144, 226, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ff9900' stroke-width='0.5' opacity='0.1'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Ccircle cx='150' cy='150' r='30'/%3E%3Cpath d='M 20 20 L 40 40 M 160 40 L 180 20 M 20 180 L 40 160'/%3E%3Crect x='100' y='80' width='20' height='20' rx='2'/%3E%3Cpolygon points='170,80 180,100 160,100'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    position: relative;
    z-index: 2;
}

.hero-highlight {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1) 0%, rgba(255, 153, 0, 0.05) 100%);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.highlight-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

.big-text-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-primary);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(255, 153, 0, 0.03);
    z-index: 0;
    user-select: none;
    pointer-events: none;
}

.big-text-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ff9900' stroke-width='1' opacity='0.05'%3E%3Ccircle cx='150' cy='150' r='80'/%3E%3Ccircle cx='150' cy='150' r='120'/%3E%3Cpath d='M 150 70 L 150 30 M 150 230 L 150 270 M 70 150 L 30 150 M 230 150 L 270 150'/%3E%3Cpath d='M 100 100 L 80 80 M 200 200 L 220 220 M 200 100 L 220 80 M 100 200 L 80 220'/%3E%3Cg transform='translate(150,150)'%3E%3Cpath d='M -40 -20 L -20 -40 L 20 -40 L 40 -20 L 40 20 L 20 40 L -20 40 L -40 20 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Service Icons */
.service-icon {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.service-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1) 0%, rgba(255, 153, 0, 0.05) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 153, 0, 0.2);
    margin: 0 auto;
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 153, 0, 0.4);
    border-color: var(--primary-color);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.service-list {
    list-style: none;
}

.service-list li {
    padding: var(--spacing-xs) 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-list li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* Expertise Section */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.expertise-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expertise-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.expertise-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.2);
}

.expertise-item:hover::before {
    left: 100%;
}

/* Expertise Icons */
.expertise-icon {
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.expertise-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(249, 203, 156, 0.1) 0%, rgba(249, 203, 156, 0.05) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    transition: all 0.3s ease;
    border: 2px solid rgba(249, 203, 156, 0.2);
    margin: 0 auto;
}

.expertise-item:hover .expertise-icon i {
    transform: rotateY(360deg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.card-title-item {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

/* Process Section */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.process-phase {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-top: 4px solid var(--primary-color);
    position: relative;
}

.phase-header {
    background-color: var(--primary-color);
    color: var(--background-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

/* Portfolio Section */
.portfolio-highlight {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-md);
    text-align: center;
}

.portfolio-highlight h3 {
    margin-bottom: var(--spacing-xs);
}

.portfolio-highlight p {
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    margin-block-end: var(--spacing-xs);
}

.stat-item {
    padding: var(--spacing-xs);
}

.stat-item p {
    margin-bottom: 0;
    line-height: 1.3;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.contact-section h2 {
    margin-bottom: var(--spacing-sm);
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ff9900' stroke-width='0.8' opacity='0.08'%3E%3Cpath d='M 20 60 Q 60 20 100 60 Q 60 100 20 60'/%3E%3Cpath d='M 40 40 L 60 20 L 80 40 L 60 60 Z'/%3E%3Ccircle cx='60' cy='60' r='5'/%3E%3Cpath d='M 10 10 L 30 10 M 90 10 L 110 10 M 10 110 L 30 110 M 90 110 L 110 110'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.05); }
}

.contact-info {
    margin-top: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.contact-info p {
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-link {
    display: inline-block;
    margin: var(--spacing-xs) 0;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-link img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid #333;
    margin-top: var(--spacing-xl);
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .services-grid,
    .expertise-grid,
    .process-timeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}

/* --- Horizontal Auto-Scrolling Gallery --- */
.horizontal-gallery {
    --gallery-gap: var(--spacing-md);
}

.horizontal-gallery .scroller-viewport {
    position: relative;
    overflow-x: auto;      /* must be scrollable for scrollLeft to work */
    overflow-y: hidden;
    padding: calc(var(--gallery-gap) / 2) 0;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbars but keep scrolling */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 5%, black 95%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, black 5%, black 95%, transparent 100%);
}
.horizontal-gallery .scroller-viewport::-webkit-scrollbar { display: none; }

.horizontal-gallery .scroller-track {
    display: inline-flex;
    gap: var(--gallery-gap);
    align-items: center;
    will-change: transform;
    min-width: max-content; /* ensure content defines width so scrolling works */
}

.horizontal-gallery .gallery-item {
    flex: 0 0 auto;
    width: clamp(110px, 16vw, 210px);
    /* aspect-ratio: 16 / 9; */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.horizontal-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Slight zoom on hover without breaking layout */
.horizontal-gallery .scroller-viewport:hover .gallery-item img {
    transform: scale(1.03);
}

.horizontal-gallery .gallery-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: var(--spacing-sm);
}

/* --- Compact Vertical Rhythm Utilities --- */
.section.section--compact {
    padding-top: 0;
    padding-bottom: 0;
}

/* Tighten gallery internals when compact */
.section--compact.horizontal-gallery .scroller-viewport {
    padding-top: 0;
    padding-bottom: 0;
}

.section--compact.horizontal-gallery .gallery-hint {
    margin-top: var(--spacing-xs);
}




/* === Responsive top nav & mobile popup === */
.site-topnav .nav-toggle{
  display: none;
  -webkit-tap-highlight-color: transparent;
  height: 40px;
  width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.site-topnav .nav-toggle:focus{ outline: 2px dashed rgba(255,255,255,0.35); outline-offset: 2px; }
.site-topnav .nav-toggle .bar{
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background: var(--nav-link, #e5e7eb);
  transition: transform .2s ease, opacity .2s ease;
}
.site-topnav .nav-toggle.is-open .bar:nth-child(1){ transform: translateY(5px) rotate(45deg); }
.site-topnav .nav-toggle.is-open .bar:nth-child(2){ opacity: 0; }
.site-topnav .nav-toggle.is-open .bar:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

/* Hide body scroll when popup is open */
.no-scroll, .no-scroll body { overflow: hidden; }

/* Popup base */
.nav-popup{
  position: fixed;
  inset: 0;
  display: none; /* use hidden attribute in JS */
  z-index: 10000;
}
.nav-popup[aria-hidden="false"]{ display: block; }

.nav-popup__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-popup__panel{
  position: absolute;
  top: var(--nav-height, 64px);
  right: 12px;
  left: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,22,25,0.96);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding: 12px;
  transform-origin: top right;
  animation: navPop .16s ease;
}
@keyframes navPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-popup__close{
  position: absolute;
  top: 8px;
  right: 8px;
  height: 36px;
  width: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
}

.nav-popup__links{
  display: grid;
  gap: 8px;
  padding: 8px;
  margin-top: 8px;
}
.nav-popup__links a{
  display: block;
  text-decoration: none;
  color: var(--nav-link, #e5e7eb);
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.nav-popup__links a:hover{
  color: var(--nav-link-hover, #fff);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

/* Switch to hamburger on smaller screens */
@media (max-width: 900px){
  .site-topnav .nav-links{ display: none; }
  .site-topnav .nav-toggle{ display: inline-flex; }
}



/* === Responsive top bar: logo left, "Menu" right on mobile === */
.site-topnav{ position: sticky; top: 0; z-index: 999; }
.site-topnav .nav-inner{
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--nav-height, 64px);
  position: relative;
}
.site-topnav .brand{ display: inline-flex; align-items: center; gap: 10px; }
.site-topnav .brand img{ height: 40px; width: auto; max-width: 160px; }

/* Toggle button */
.site-topnav .nav-toggle{
  margin-left: auto;
  display: none;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--nav-link, #e5e7eb);
  font-weight: 700;
  letter-spacing: .02em;
}
.site-topnav .nav-toggle:active{ transform: translateY(1px); }

/* Desktop */
@media (min-width: 901px){
  .site-topnav .nav-links{ display: flex; }
  .site-topnav .nav-toggle{ display: none; }
}

/* Mobile: show only logo + Menu button */
@media (max-width: 900px){
  .site-topnav .nav-links{ display: none !important; }
  .site-topnav .nav-toggle{ display: inline-flex; }
}

/* Compact dropdown */
.nav-dropdown[aria-hidden="true"]{ display: none; }
.nav-dropdown[aria-hidden="false"]{ display: block; }

.nav-dropdown{
  position: absolute;
  inset: auto 12px auto auto; /* right-aligned */
  top: var(--nav-height, 64px);
  z-index: 1000;
}
.nav-dropdown__panel{
  display: grid;
  gap: 6px;
  width: min(86vw, 280px);
  margin-left: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,22,25,0.98);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  animation: dd-fade .14s ease-out;
}
.nav-dropdown__panel a{
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--nav-link, #e5e7eb);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  font-weight: 700;
}
.nav-dropdown__panel a:hover{
  color: var(--nav-link-hover, #fff);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
@keyframes dd-fade {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* General responsive helpers */
img{ max-width: 100%; height: auto; }
:where(.container, .wrap, .shell){ max-width: 1200px; margin-inline: auto; padding-inline: clamp(12px, 3vw, 24px); }



/* === Mobile top bar & dropdown visibility fixes === */
@media (max-width: 900px){
  nav.site-topnav .nav-toggle{ display: inline-flex !important; }
  nav.site-topnav .nav-links{ display: none !important; }
}

/* Make the Menu button always readable */
nav.site-topnav .nav-toggle{
  margin-left: auto;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1;
  color: #111;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Add ☰ icon before label */
nav.site-topnav .nav-toggle .nav-toggle__label::before{
  content: "☰";
  display: inline-block;
  margin-right: 6px;
  font-size: 18px;
}

/* Fix dropdown: position under the bar on the right */
.nav-dropdown{
  position: fixed;
  top: var(--nav-height, 64px);
  right: 12px;
  left: auto;
}
.nav-dropdown__panel{
  width: min(86vw, 280px);
}



/* === Mobile nav fit fixes v2 === */
@media (max-width: 900px){
  html, body { max-width: 100%; overflow-x: hidden; }
  .site-topnav{ --nav-height: 56px; }
  .site-topnav .nav-inner{
    min-height: var(--nav-height);
    padding: 6px 10px;
    gap: 10px;
    overflow: hidden;
  }
  .site-topnav .brand{
    max-width: calc(100% - 120px); /* leave room for Menu button */
    overflow: hidden;
    white-space: nowrap;
  }
  .site-topnav .brand img{
    height: 32px;
    width: auto;
    max-width: 160px;
  }
  .site-topnav .nav-toggle{
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    line-height: 1;
    flex: 0 0 auto;
  }
  /* Keep dropdown tucked to the right under the bar */
  .nav-dropdown{ top: var(--nav-height); right: 8px; left: auto; }
  .nav-dropdown__panel{ width: min(88vw, 280px); }
}
/* Ultra-small devices */
@media (max-width: 360px){
  .site-topnav{ --nav-height: 52px; }
  .site-topnav .nav-inner{ padding: 6px 8px; gap: 8px; }
  .site-topnav .brand{ max-width: calc(100% - 108px); }
  .site-topnav .brand img{ height: 28px; }
  .site-topnav .nav-toggle{ height: 34px; padding: 0 8px; font-size: 13px; }
}


/* === Mobile nav fit: final overrides === */
html, body { max-width: 100%; overflow-x: hidden; }

/* Ensure inner container never exceeds screen width */
nav.site-topnav .nav-inner { max-width: 100%; }
nav.site-topnav .brand img { max-width: min(50vw, 180px); height: auto; }

/* Let brand shrink if space is tight */
nav.site-topnav .brand { min-width: 0; overflow: hidden; }

/* Use safe-area for dropdown top position */
.nav-dropdown { top: calc(var(--nav-height) + env(safe-area-inset-top, 0px)) !important; }

/* Ultra-narrow screens */
@media (max-width: 360px){
  nav.site-topnav .nav-toggle{ padding: 0 8px; font-size: 13px; }
  nav.site-topnav .brand img{ max-width: 44vw; }
}
