﻿/* =========================================
   1. Design Tokens & Reset
   ========================================= */

:root {
    /* Modern Palette - Matches your new HTML */
    --primary-dark: #002b5e;
    --primary-light: #2563eb;
    --accent-glow: #3b82f6;
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Animation Curves */
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern secondary page pass: shared by About, Portfolio, FAQ, and legal pages. */
body.cowebs-modern-web,
body.cowebs-modern-software {
    --modern-ink: #0f172a;
    --modern-muted: #64748b;
    --modern-line: #dbe3ef;
    --modern-bg: #f7f9fc;
    --modern-dark: #07111f;
    --modern-dark-soft: #0c1524;
    --modern-web: #063b78;
    --modern-software: #4c1d95;
}

body.cowebs-modern-web {
    background: var(--modern-bg) !important;
    color: var(--modern-ink);
}

body.cowebs-modern-software {
    background: var(--modern-dark) !important;
    color: #f8fafc;
}

body.cowebs-modern-web #header,
body.cowebs-modern-software #header {
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

body.cowebs-modern-web #header {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--modern-line);
}

body.cowebs-modern-software #header {
    background: rgba(7, 17, 31, 0.9) !important;
    border-bottom: 1px solid rgba(219, 234, 254, 0.14) !important;
}

body.cowebs-modern-web header a,
body.cowebs-modern-web section a,
body.cowebs-modern-web button,
body.cowebs-modern-software header a,
body.cowebs-modern-software section a,
body.cowebs-modern-software button {
    letter-spacing: 0 !important;
    text-transform: none !important;
}

body.cowebs-modern-web header a[href*="wa.me"],
body.cowebs-modern-web .mobile-nav a[href*="wa.me"],
body.cowebs-modern-web section a.rounded-full,
body.cowebs-modern-web section a.rounded-lg,
body.cowebs-modern-web section a.rounded-2xl,
body.cowebs-modern-web button.rounded-full,
body.cowebs-modern-web button.rounded-lg,
body.cowebs-modern-software header a[href*="wa.me"],
body.cowebs-modern-software .mobile-nav a[href*="wa.me"],
body.cowebs-modern-software section a.rounded-full,
body.cowebs-modern-software section a.rounded-lg,
body.cowebs-modern-software section a.rounded-2xl,
body.cowebs-modern-software button.rounded-full,
body.cowebs-modern-software button.rounded-lg {
    border-radius: 0.72rem !important;
    box-shadow: none !important;
}

body.cowebs-modern-web header a[href*="wa.me"],
body.cowebs-modern-web .mobile-nav a[href*="wa.me"] {
    background: var(--modern-web) !important;
}

body.cowebs-modern-software header a[href*="wa.me"],
body.cowebs-modern-software .mobile-nav a[href*="wa.me"] {
    background: var(--modern-software) !important;
}

body.cowebs-modern-web > section:first-of-type,
body.cowebs-modern-software > section:first-of-type {
    padding-top: 6rem !important;
    padding-bottom: 5rem !important;
    background-size: 72px 72px, 72px 72px, auto, auto, auto !important;
}

body.cowebs-modern-web > section:first-of-type {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 14% 18%, rgba(47, 128, 237, 0.34), transparent 34rem),
        radial-gradient(circle at 85% 24%, rgba(16, 185, 129, 0.18), transparent 30rem),
        linear-gradient(145deg, #07111f 0%, #0c1524 54%, #111827 100%) !important;
}

body.cowebs-modern-software > section:first-of-type {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 14% 18%, rgba(139, 92, 246, 0.32), transparent 34rem),
        radial-gradient(circle at 85% 24%, rgba(47, 128, 237, 0.17), transparent 30rem),
        linear-gradient(145deg, #07111f 0%, #111827 54%, #160f27 100%) !important;
}

body.cowebs-modern-web > section:first-of-type .text-center,
body.cowebs-modern-software > section:first-of-type .text-center {
    text-align: left !important;
}

body.cowebs-modern-web > section:first-of-type h1,
body.cowebs-modern-software > section:first-of-type h1 {
    max-width: 58rem;
    margin-left: 0;
    margin-right: auto;
    font-size: clamp(2.35rem, 5.8vw, 5.1rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.055em !important;
}

body.cowebs-modern-web > section:first-of-type p,
body.cowebs-modern-software > section:first-of-type p {
    max-width: 44rem;
    margin-left: 0;
    margin-right: auto;
    color: #b7c4d8 !important;
}

body.cowebs-modern-web section h2,
body.cowebs-modern-web section h3,
body.cowebs-modern-software section h2,
body.cowebs-modern-software section h3 {
    letter-spacing: -0.035em !important;
}

body.cowebs-modern-web section h2 .absolute,
body.cowebs-modern-web section h2 + .absolute,
body.cowebs-modern-software section h2 .absolute,
body.cowebs-modern-software section h2 + .absolute {
    display: none !important;
}

body.cowebs-modern-web .rounded-3xl,
body.cowebs-modern-web .rounded-2xl,
body.cowebs-modern-web .rounded-xl,
body.cowebs-modern-web .rounded-lg,
body.cowebs-modern-software .rounded-3xl,
body.cowebs-modern-software .rounded-2xl,
body.cowebs-modern-software .rounded-xl,
body.cowebs-modern-software .rounded-lg {
    border-radius: 0.95rem !important;
}

body.cowebs-modern-web .shadow-lg,
body.cowebs-modern-web .shadow-xl,
body.cowebs-modern-web .shadow-2xl {
    box-shadow: 0 24px 70px -52px rgba(15, 23, 42, 0.42) !important;
}

body.cowebs-modern-web footer,
body.cowebs-modern-software footer {
    background: var(--modern-dark) !important;
}

@media (max-width: 768px) {
    body.cowebs-modern-web > section:first-of-type,
    body.cowebs-modern-software > section:first-of-type {
        padding-top: 4rem !important;
        padding-bottom: 3.5rem !important;
    }

    body.cowebs-modern-web > section:first-of-type h1,
    body.cowebs-modern-software > section:first-of-type h1 {
        font-size: clamp(2.2rem, 12vw, 3.4rem) !important;
    }
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
    touch-action: pan-y; /* Allow vertical scroll but intercept horizontal edge swipes */
}

/* =========================================
   2. Utility Classes & Glassmorphism
   ========================================= */

/* The "Frosted Glass" Effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Portfolio iframe scaling */
.portfolio-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-smooth);
}

/* COWebs.lb - Enhanced Animations & Skills CSS */

/* =========================================
   3. Advanced Animations
   ========================================= */

/* Performance Optimized Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    will-change: opacity, transform;
    transition: opacity 0.8s ease-out, transform 0.8s var(--ease-out-back);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for multiple elements */
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }

/* Hero pattern with subtle movement */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 60px;
}

/* Enhanced Skills Section Styling */
.skills-card {
    transition: all 0.3s ease;
    will-change: transform;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.skills-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.skill-category-title {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   5. Skills Section (Total Redesign)
   ========================================= */

.skill-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-glow);
}

.skill-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4); /* Gradient from Blue to Cyan */
    border-radius: 10px;
    width: 0; /* JS will animate this */
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

/* The "Glow Tip" at the end of the bar */
.skill-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Typing Cursor */
.typing-animation::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--primary-light);
}

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

.skill-percentage {
    font-weight: 600;
    color: #1d4ed8;
    font-size: 14px;
}

.skill-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Service card hover effects */
/* =========================================
   4. Component Styling
   ========================================= */

/* Service Cards - The "Hover Lift" */
.service-card {
    position: relative;
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    /* Colored shadow glow instead of black */
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.service-card .service-icon {
    transition: transform 0.4s var(--ease-out-back);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
}

/* Navigation Links - Underline Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

/* Primary Buttons */
.btn-animate {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.btn-animate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-animate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4); /* Blue glow */
}

.btn-animate:hover::after {
    opacity: 1;
}

/* Social icons animation */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    color: #2196f3;
}

/* Typing animation */
.typing-animation {
    display: inline-block;
    overflow: hidden;
}

.typing-animation::after {
    content: '|';
    animation: blink-caret 1s step-end infinite;
    color: rgba(255,255,255,0.7);
}

@keyframes blink-caret {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .service-card:hover,
    .btn-animate:hover {
        transform: none !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    }

    .typing-animation::after {
        display: none;
    }

    .nav-link::after {
        display: none;
    }

    .skills-card:hover {
        transform: none !important;
    }

    .skill-item:hover {
        transform: none !important;
    }
}

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Performance optimization */
.service-card,
.btn-animate,
.nav-link,
.skills-card,
.skill-item {
    will-change: transform;
}

/* Header optimization for smooth scrolling */
#header {
    will-change: transform, box-shadow;
    transform: translateZ(0); /* Force hardware acceleration */
}

#header .logo {
    will-change: height;
    transition: height 0.2s ease-out;
}

#header .nav-container {
    will-change: padding;
    transition: padding 0.2s ease-out;
    position: relative;
}

/* Header shrinking effect */
#header.shrunk .logo {
    height: 60px; /* Shrink from 80px to 60px */
}

#header.shrunk .nav-container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Hide desktop navigation when header is shrunk on mobile */
@media (max-width: 1024px) {
    #header.shrunk .desktop-nav {
        display: none;
    }

    #header.shrunk .hamburger {
        display: flex;
    }
}

/* =========================================
   6. Header & Navigation Logic
   ========================================= */

#header {
    transition: all 0.4s var(--ease-smooth);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#header.shrunk {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

/* Keep software division pages in a dark header theme for contrast */
body.bg-slate-950 #header {
    background: rgba(2, 6, 23, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
}

body.bg-slate-950 #header.shrunk {
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.8);
}

body.bg-slate-950 #header .desktop-nav > a {
    color: #cbd5e1;
}

body.bg-slate-950 #header .desktop-nav > a:hover {
    color: #e9d5ff;
}

body.bg-slate-950 #header .desktop-nav > a.bg-gradient-to-r {
    color: #ffffff;
}

body.bg-slate-950 #header .hamburger-line {
    background: #e2e8f0;
}

#header .logo {
    transition: height 0.4s var(--ease-smooth);
}

#header.shrunk .logo {
    height: 50px;
}

/* Hamburger Menu Icon */
.hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 101; /* Above mobile nav to stay clickable */
    position: relative;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.hamburger span,
.hamburger-line {
    background: #1f2937;
    border-radius: 10px;
    height: 3px;
    margin: 3px 0;
    transition: .4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    display: block;
    width: 24px;
}

/* Hamburger Animation State */
.hamburger.open span:nth-of-type(1),
.hamburger.open .hamburger-line:nth-child(1) {
    transform-origin: bottom;
    transform: rotatez(45deg) translate(5px, 0px);
}

.hamburger.open span:nth-of-type(2),
.hamburger.open .hamburger-line:nth-child(2) {
    transform-origin: top;
    transform: rotatez(-45deg);
}

.hamburger.open span:nth-of-type(3),
.hamburger.open .hamburger-line:nth-child(3) {
    transform-origin: bottom;
    width: 50%;
    transform: translate(12px,-7px) rotatez(45deg);
}

/* =========================================
   Locations Dropdown Navigation
   Hover-triggered mega-dropdown divided by country.
   Works on both light (web) and dark (software) headers.
   ========================================= */

/* Wrapper — position:relative anchor for the panel */
.nav-dropdown {
    position: relative;
    list-style: none;
}

.contact-noise-texture {
  background-image: radial-gradient(rgba(255, 255, 255, 0.32) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

/* Trigger button/link */
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.25s ease;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    text-decoration: none;
    position: relative;
}

/* Animated chevron arrow */
.nav-dropdown-trigger .dropdown-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-chevron, .nav-dropdown.open .dropdown-chevron, .nav-dropdown.hover-open .dropdown-chevron {
    transform: rotate(180deg);
}

/* Underline accent matching other nav links */
.nav-dropdown-trigger .dropdown-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    transition: width 0.3s ease;
}

.nav-dropdown:hover .dropdown-underline, .nav-dropdown.hover-open .dropdown-underline {
    width: 100%;
}

/* Panel */
.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 520px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.25), 0 4px 16px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 200;
}

/* Small arrow pointing up */
.nav-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 3px 0 0 0;
    transform: translateX(-50%) rotate(45deg);
}

/* Show on hover (desktop) */
@media (min-width: 1025px) {
    .nav-dropdown:hover .nav-dropdown-panel,
    .nav-dropdown.hover-open .nav-dropdown-panel,
    .nav-dropdown.open .nav-dropdown-panel {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }
}

/* Country section */
.dropdown-country {
    margin-bottom: 1rem;
}

.dropdown-country:last-child {
    margin-bottom: 0;
}

.dropdown-country-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-country-flag {
    font-size: 1rem;
    line-height: 1;
}

/* City grid */
.dropdown-city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.15rem;
}

.dropdown-city-grid a {
    display: block;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.dropdown-city-grid a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Cyprus uses 2-col grid (fewer items) */
.dropdown-city-grid.dropdown-city-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

/* ── Dark-header variant (software pages) ── */
body.cowebs-modern-software .nav-dropdown-panel,
.dark-header-dropdown .nav-dropdown-panel {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.cowebs-modern-software .nav-dropdown-panel::before,
.dark-header-dropdown .nav-dropdown-panel::before {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
}

body.cowebs-modern-software .dropdown-country-heading,
.dark-header-dropdown .dropdown-country-heading {
    color: #64748b;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.cowebs-modern-software .dropdown-city-grid a,
.dark-header-dropdown .dropdown-city-grid a {
    color: #cbd5e1;
}

body.cowebs-modern-software .dropdown-city-grid a:hover,
.dark-header-dropdown .dropdown-city-grid a:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

/* ── Mobile accordion for locations in mobile-nav ── */
.mobile-nav-locations-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
    font-family: inherit;
    background: none;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-align: left;
}

.mobile-nav-locations-toggle:hover {
    background: #f8fafc;
    color: #2563eb;
}

.mobile-nav-locations-toggle .mob-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.mobile-nav-locations-toggle.open .mob-chevron {
    transform: rotate(180deg);
}

.mobile-nav-locations-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #f8fafc;
}

.mobile-nav-locations-panel.open {
    max-height: 700px;
}

.mobile-nav-country-group {
    padding: 0.75rem 1.5rem 0.5rem;
}

.mobile-nav-country-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-city-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem;
}

.mobile-nav-city-list a {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 0.83rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 0.4rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-city-list a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Dark mobile nav variant */
.dark-mobile-nav .mobile-nav-locations-toggle {
    color: #cbd5e1;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark-mobile-nav .mobile-nav-locations-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #c4b5fd;
}

.dark-mobile-nav .mobile-nav-locations-panel {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mobile-nav .mobile-nav-country-label {
    color: #64748b;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark-mobile-nav .mobile-nav-city-list a {
    color: #94a3b8;
}

.dark-mobile-nav .mobile-nav-city-list a:hover {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
}

/* Mobile menu max-height must accommodate locations panel */
.mobile-nav.open {
    max-height: 900px !important;
}

/* Mobile Menu Overlay */
.mobile-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-radius: 0 0 1.5rem 1.5rem;
    box-shadow: 0 25px 50px -20px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin: 0;
    padding: 0.5rem 0;
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), max-height 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    pointer-events: none;
    z-index: 40;
}

.mobile-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}

.mobile-nav li {
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.mobile-nav a:hover {
    background-color: #f8fafc;
    color: #2563eb;
}


@media (max-width: 1024px) {
    /* Hide desktop navigation completely on mobile */
    .desktop-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .desktop-nav ul,
    .desktop-nav li,
    .desktop-nav a {
        display: none !important;
        visibility: hidden !important;
    }

    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 768px) {
    /* Disable heavy hover effects on touch devices */
    .service-card:hover { transform: none; }

    .hero-pattern {
        background-size: 40px 40px; /* Smaller pattern */
    }

    h1 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    #header .nav-container {
        padding: 0.75rem 1rem;
    }

    #header.shrunk .nav-container {
        padding: 0.5rem 1rem;
    }

    #header.shrunk .logo {
        height: 50px;
    }

    .hamburger {
        padding: 0.375rem;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
        margin: 2px 0;
    }

    .mobile-nav a {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Fix for inline styles */
.skill-progress-bar[data-percentage] {
    width: 0%;
    transition: width 1.5s ease-in-out, transform 0.3s ease;
}

/* =========================================
   Floating WhatsApp CTA
   Persistent conversion entry point on every public page.
   Hidden when body[data-floating-wa="off"].
   ========================================= */
.floating-whatsapp {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #047857;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(22, 163, 74, 0.28), 0 4px 10px rgba(15, 23, 42, 0.14);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    will-change: transform;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
    transform: translateY(-2px);
    background: #065f46;
    box-shadow: 0 14px 36px rgba(4, 120, 87, 0.38), 0 4px 10px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.floating-whatsapp:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.floating-whatsapp svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .floating-whatsapp {
        padding: 0.65rem;
        right: 0.75rem;
        bottom: 0.75rem;
        border-radius: 9999px;
    }
    .floating-whatsapp .floating-whatsapp-label {
        display: none;
    }
}

body[data-floating-wa="off"] .floating-whatsapp {
    display: none;
}

@media print {
    .floating-whatsapp {
        display: none !important;
    }
}

/* =========================================
   8. Motion System v2 (Webflow-style global layer)
   ========================================= */
:root {
    --motion-duration-xs: 180ms;
    --motion-duration-sm: 320ms;
    --motion-duration-md: 560ms;
    --motion-duration-lg: 900ms;
    --motion-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
    --motion-ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
    --motion-distance-sm: 14px;
    --motion-distance-md: 24px;
    --motion-distance-lg: 40px;
    --motion-depth: 24px;
    --motion-accent: rgba(37, 99, 235, 0.18);
}

body[data-motion="off"],
body[data-motion="minimal"] {
    --motion-duration-sm: 140ms;
    --motion-duration-md: 180ms;
    --motion-duration-lg: 220ms;
}

.motion-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 200;
    pointer-events: none;
    background: linear-gradient(90deg, #2563eb, #22d3ee);
}

.animate-on-scroll {
    opacity: 0;
    transform: translate3d(var(--motion-translate-x, 0), var(--motion-translate-y, var(--motion-distance-md)), 0) scale(var(--motion-scale, 1));
    transition: transform var(--motion-duration-md) var(--motion-ease-entrance), opacity var(--motion-duration-md) var(--motion-ease-standard);
    transition-delay: var(--motion-delay, 0s);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

[data-anim="reveal-left"] {
    --motion-translate-x: calc(var(--motion-distance-md) * -1);
    --motion-translate-y: 0px;
}

[data-anim="reveal-right"] {
    --motion-translate-x: var(--motion-distance-md);
    --motion-translate-y: 0px;
}

[data-anim="reveal-scale"] {
    --motion-translate-y: 10px;
    --motion-scale: 0.94;
}

.motion-text-split .motion-word {
    opacity: 0;
    transform: translateY(12px);
    display: inline-block;
}

.motion-text-split.motion-text-in .motion-word {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--motion-duration-sm) var(--motion-ease-standard), transform var(--motion-duration-sm) var(--motion-ease-entrance);
    transition-delay: calc(var(--word-index, 0) * 44ms);
}

.motion-svg-draw path,
.motion-svg-draw line,
.motion-svg-draw polyline,
.motion-svg-draw circle {
    transition: stroke-dashoffset var(--motion-duration-lg) var(--motion-ease-standard);
}

.motion-svg-draw.svg-draw-in path,
.motion-svg-draw.svg-draw-in line,
.motion-svg-draw.svg-draw-in polyline,
.motion-svg-draw.svg-draw-in circle {
    stroke-dashoffset: 0 !important;
}

.motion-tilt-card {
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform var(--motion-duration-sm) var(--motion-ease-standard), box-shadow var(--motion-duration-sm) var(--motion-ease-standard);
}

.motion-tilt-card:hover {
    box-shadow: 0 20px 45px -22px rgba(15, 23, 42, 0.45);
}

.motion-cursor-accent {
    position: relative;
    overflow: clip;
}

.motion-cursor-accent::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(260px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), var(--motion-accent), transparent 60%);
    transition: opacity var(--motion-duration-sm) var(--motion-ease-standard);
}

.motion-cursor-accent:hover::after {
    opacity: 1;
}

.motion-cta-attention {
    animation: cta-pulse 4.6s ease-in-out infinite;
}

.motion-cta-attention.cta-intent-ready {
    animation-duration: 2.4s;
}

@keyframes cta-pulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.015);
    }
}

.supports-view-transition::view-transition-old(root),
.supports-view-transition::view-transition-new(root) {
    animation-duration: 340ms;
    animation-timing-function: var(--motion-ease-standard);
}

body[data-route-group="case-studies"].supports-view-transition::view-transition-new(root) {
    animation-duration: 460ms;
}

body[data-route-group="blog"].supports-view-transition::view-transition-new(root) {
    animation-duration: 260ms;
}

.motion-pin-fallback {
    position: relative;
    border-image: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(34, 211, 238, 0.08)) 1;
}

body[data-motion="off"] .motion-scroll-progress,
body[data-motion="off"] .motion-cursor-accent::after,
body[data-motion="off"] .motion-cta-attention {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .motion-scroll-progress,
    .motion-cursor-accent::after,
    .motion-cta-attention,
    .motion-tilt-card {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* =========================================
   9. Modern public-page skins
   ========================================= */
body.cowebs-modern-editorial,
body.cowebs-modern-local-web {
    background:
        radial-gradient(circle at 12% 6%, rgba(37, 99, 235, 0.08), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    color: #0f172a;
}

body.cowebs-modern-local-software {
    background:
        radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: #f8fafc;
}

body.cowebs-modern-editorial > header,
body.cowebs-modern-local-web > header {
    background: rgba(255, 255, 255, 0.86) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(18px);
}

body.cowebs-modern-local-software > header {
    background: rgba(2, 6, 23, 0.78) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

body.cowebs-modern-editorial nav,
body.cowebs-modern-local-web nav,
body.cowebs-modern-local-software nav {
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

body.cowebs-modern-editorial .desktop-nav a,
body.cowebs-modern-local-web .desktop-nav a,
body.cowebs-modern-local-software .desktop-nav a {
    letter-spacing: 0;
}

body.cowebs-modern-editorial .desktop-nav > a,
body.cowebs-modern-editorial .cta-button a,
body.cowebs-modern-local-web .desktop-nav > a,
body.cowebs-modern-local-web .cta-button a,
body.cowebs-modern-local-software .desktop-nav > a,
body.cowebs-modern-local-software .cta-button a {
    border-radius: 8px !important;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2) !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
}

body.cowebs-modern-local-software .desktop-nav > a,
body.cowebs-modern-local-software .cta-button a {
    box-shadow: 0 18px 42px rgba(168, 85, 247, 0.28) !important;
}

body.cowebs-modern-editorial > section:first-of-type,
body.cowebs-modern-local-web > section:first-of-type {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.88)),
        radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.34), transparent 22rem) !important;
}

body.cowebs-modern-local-software > section:first-of-type {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(88, 28, 135, 0.68)),
        radial-gradient(circle at 78% 20%, rgba(168, 85, 247, 0.35), transparent 24rem) !important;
}

body.cowebs-modern-editorial > section:first-of-type::after,
body.cowebs-modern-local-web > section:first-of-type::after,
body.cowebs-modern-local-software > section:first-of-type::after {
    content: '';
    position: absolute;
    inset: auto 8% -7rem auto;
    width: min(34vw, 24rem);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(12deg);
    pointer-events: none;
}

body.cowebs-modern-editorial > section:first-of-type > *,
body.cowebs-modern-local-web > section:first-of-type > *,
body.cowebs-modern-local-software > section:first-of-type > * {
    position: relative;
    z-index: 1;
}

body.cowebs-modern-editorial h1,
body.cowebs-modern-local-web h1,
body.cowebs-modern-local-software h1 {
    letter-spacing: 0;
    text-wrap: balance;
}

body.cowebs-modern-editorial h2,
body.cowebs-modern-editorial h3,
body.cowebs-modern-local-web h2,
body.cowebs-modern-local-web h3,
body.cowebs-modern-local-software h2,
body.cowebs-modern-local-software h3 {
    letter-spacing: 0;
    text-wrap: balance;
}

body.cowebs-modern-editorial .blog-card,
body.cowebs-modern-editorial article,
body.cowebs-modern-local-web .bg-white,
body.cowebs-modern-local-web .rounded-2xl,
body.cowebs-modern-local-web .rounded-3xl {
    border-radius: 8px !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08) !important;
}

body.cowebs-modern-editorial .blog-card-image,
body.cowebs-modern-editorial .article-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    background: #0f172a;
}

body.cowebs-modern-editorial .article-cover-wrap {
    margin: -2.5rem auto 0;
    max-width: 64rem;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

body.cowebs-modern-editorial .article-cover {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

@media (max-width: 768px) {
    body.cowebs-modern-editorial .article-cover-wrap {
        margin-top: -1.25rem;
    }
}

body.cowebs-modern-local-software .rounded-2xl,
body.cowebs-modern-local-software .rounded-3xl,
body.cowebs-modern-local-software .bg-white\/5 {
    border-radius: 8px !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background-color: rgba(255, 255, 255, 0.055) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22) !important;
}

body.cowebs-modern-editorial .blog-card:hover,
body.cowebs-modern-local-web .rounded-2xl:hover,
body.cowebs-modern-local-web .rounded-3xl:hover,
body.cowebs-modern-local-software .rounded-2xl:hover,
body.cowebs-modern-local-software .rounded-3xl:hover {
    transform: translateY(-3px);
}

body.cowebs-modern-editorial footer,
body.cowebs-modern-local-web footer {
    background: #0f172a !important;
}

body.cowebs-modern-local-software footer {
    background: #020617 !important;
}

@media (max-width: 768px) {
    body.cowebs-modern-editorial section:first-of-type,
    body.cowebs-modern-local-web section:first-of-type,
    body.cowebs-modern-local-software section:first-of-type {
        padding-top: 4.75rem !important;
        padding-bottom: 4.75rem !important;
    }

    body.cowebs-modern-editorial h1,
    body.cowebs-modern-local-web h1,
    body.cowebs-modern-local-software h1 {
        font-size: clamp(2.25rem, 12vw, 3.5rem) !important;
        line-height: 1.05 !important;
    }
}

/* =========================================
   Custom Scrollbar
   ========================================= */
html {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark scrollbar for software pages */
body.cowebs-modern-software {
    scrollbar-color: #334155 #0f172a;
}
body.cowebs-modern-software::-webkit-scrollbar-track {
    background: #0f172a;
}
body.cowebs-modern-software::-webkit-scrollbar-thumb {
    background: #334155;
    border: 2px solid #0f172a;
}
body.cowebs-modern-software::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
