/* ========================================
   CSS Variables & Base Styles
   ======================================== */
:root {
    --primary: #f9d806;
    --secondary: #454545;
    --accent: #ff4d30;
    --light: #f8f9fa;
    --dark: #333;
    --gray: #6c757d;
    --dark-bg: #1a1a2e;
    --dark-bg2: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Hide scrollbars globally while keeping scroll functionality */
* {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE & Edge */
}

*::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
    min-width: 320px;
}

/* Prevent horizontal overflow from SVG backgrounds/decorations */
section,
.section {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ensure images never overflow */
img, svg {
    max-width: 100%;
}

/* Make long text wrap properly */
h1, h2, h3, h4, p, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   Preloader (SVG ring)
   ======================================== */
.preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--dark-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner { text-align: center; }

.preloader-svg { margin-bottom: 20px; }

.preloader-ring-fill {
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    animation: preloaderSpin 1.8s ease-in-out forwards, preloaderRotate 1.8s linear forwards;
    transform-origin: center;
}

@keyframes preloaderSpin {
    to { stroke-dashoffset: 0; }
}

@keyframes preloaderRotate {
    to { transform: rotate(360deg); }
}

.preloader-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeIn 0.5s 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: #ffde29;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(249, 216, 6, 0.3);
}

.btn-accent { background-color: var(--accent); color: white; }
.btn-accent:hover { background-color: #e0442a; box-shadow: 0 10px 30px rgba(255, 77, 48, 0.3); }
.btn-sm { padding: 8px 20px; font-size: 0.8rem; }

.btn-glow { animation: btnGlow 2s ease-in-out infinite alternate; }
@keyframes btnGlow {
    from { box-shadow: 0 0 5px rgba(249, 216, 6, 0.2); }
    to { box-shadow: 0 0 25px rgba(249, 216, 6, 0.5), 0 0 50px rgba(249, 216, 6, 0.1); }
}

.btn-accent.btn-glow { animation: btnGlowAccent 2s ease-in-out infinite alternate; }
@keyframes btnGlowAccent {
    from { box-shadow: 0 0 5px rgba(255, 77, 48, 0.2); }
    to { box-shadow: 0 0 25px rgba(255, 77, 48, 0.5), 0 0 50px rgba(255, 77, 48, 0.1); }
}

/* ========================================
   Section Styles
   ======================================== */
.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
}

/* ========================================
   Scroll Reveal (Staggered)
   ======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Top Bar
   ======================================== */
.top-bar {
    background-color: #2c3e50;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 767px) { .top-bar { display: none !important; } }

.contacts-info { display: flex; gap: 20px; }

.contacts-item {
    display: flex;
    gap: 5px;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

/* Inline contact links (phone/email) */
.link-contact {
    color: inherit;
    transition: color 0.3s ease;
    border-bottom: 1px dashed transparent;
}

.link-contact:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.social-links { display: flex; gap: 12px; }

.social-links a {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px) rotate(360deg);
}

/* ========================================
   Header
   ======================================== */
header {
    background-color: var(--secondary);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0; z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 8px 0;
    background-color: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { display: flex; align-items: center; }

.logo-img {
    width: 50px; height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    animation: logoPulse 2s infinite;
}

@keyframes logoPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(249, 216, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 216, 6, 0); }
}

@font-face {
    font-family: 'Clarendon Narrow';
    src: url('fonts/Clarendon Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

.logo-text {
    font-size: 2.0rem;
    font-weight: 700;
    font-family: 'Clarendon Narrow', serif;
}

.nav-menu { display: flex; }
.nav-menu li { margin-left: 25px; }

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary); }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(rgba(10, 10, 30, 0.82), rgba(10, 10, 30, 0.82)),
        url('https://images.unsplash.com/photo-1621905252507-b35492cc74b4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80') no-repeat center center/cover;
    color: white;
    padding: 180px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* SVG Circuit Pattern */
.hero-circuit-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.circuit-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawCircuit 3s ease forwards;
}

.circuit-path:nth-child(1) { animation-delay: 0.2s; }
.circuit-path:nth-child(2) { animation-delay: 0.6s; }
.circuit-path:nth-child(3) { animation-delay: 1.0s; }
.circuit-path:nth-child(4) { animation-delay: 1.4s; }
.circuit-path:nth-child(5) { animation-delay: 0.8s; }
.circuit-path:nth-child(6) { animation-delay: 1.6s; }

@keyframes drawCircuit {
    to { stroke-dashoffset: 0; }
}

.circuit-node {
    opacity: 0;
    animation: nodeAppear 0.5s ease forwards;
}

.circuit-node:nth-child(1) { animation-delay: 0.5s; }
.circuit-node:nth-child(2) { animation-delay: 0.8s; }
.circuit-node:nth-child(3) { animation-delay: 1.0s; }
.circuit-node:nth-child(4) { animation-delay: 1.2s; }
.circuit-node:nth-child(5) { animation-delay: 1.4s; }
.circuit-node:nth-child(6) { animation-delay: 0.9s; }
.circuit-node:nth-child(7) { animation-delay: 1.1s; }
.circuit-node:nth-child(8) { animation-delay: 1.3s; }
.circuit-node:nth-child(9) { animation-delay: 1.5s; }
.circuit-node:nth-child(10) { animation-delay: 1.3s; }
.circuit-node:nth-child(11) { animation-delay: 1.5s; }
.circuit-node:nth-child(12) { animation-delay: 1.7s; }
.circuit-node:nth-child(13) { animation-delay: 1.1s; }
.circuit-node:nth-child(14) { animation-delay: 1.3s; }
.circuit-node:nth-child(15) { animation-delay: 1.6s; }
.circuit-node:nth-child(16) { animation-delay: 1.8s; }
.circuit-node:nth-child(17) { animation-delay: 1.9s; }
.circuit-node:nth-child(18) { animation-delay: 2.0s; }

@keyframes nodeAppear {
    from { opacity: 0; r: 0; }
    to { opacity: 1; r: 4; }
}

/* Floating geometric shapes */
.shape-float {
    animation: shapeFloat 8s ease-in-out infinite;
}

.shape-float-reverse {
    animation: shapeFloatReverse 10s ease-in-out infinite;
}

@keyframes shapeFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(5deg); }
    50% { transform: translate(-5px, -25px) rotate(-3deg); }
    75% { transform: translate(8px, -10px) rotate(4deg); }
}

@keyframes shapeFloatReverse {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, 12px) rotate(-5deg); }
    50% { transform: translate(8px, 20px) rotate(3deg); }
    75% { transform: translate(-6px, 8px) rotate(-2deg); }
}

.hero-gradient-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(45deg,
        rgba(249, 216, 6, 0.05) 0%,
        transparent 25%,
        rgba(255, 77, 48, 0.05) 50%,
        transparent 75%,
        rgba(249, 216, 6, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typewriter */
.typewriter-wrapper {
    font-size: 1.3rem;
    margin-bottom: 20px;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.typewriter-prefix { color: rgba(255, 255, 255, 0.8); }

.typewriter-text {
    color: var(--primary);
    font-weight: 600;
    min-width: 220px;
    text-align: left;
}

.typewriter-cursor {
    color: var(--primary);
    animation: blink 0.8s step-end infinite;
    font-weight: 300;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

/* Stats Bar with SVG Rings */
.stats-bar {
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px 20px;
}

.stat-item {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-ring {
    margin-bottom: 8px;
}

.stat-ring-fill {
    stroke-dasharray: 239;
    stroke-dashoffset: 239;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 2s ease;
}

.stat-ring-fill.animated {
    /* offset set by JS based on data-percent */
}

.stat-inner { text-align: center; }

.stat-numbers {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-suffix {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Wave Dividers (multi-layer)
   ======================================== */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 100px;
}

.wave-hero {
    position: absolute;
    bottom: 0; left: 0;
    z-index: 3;
}

.wave-hero svg { height: 120px; }

.wave-bottom {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    z-index: 2;
}

.wave-white-to-dark { background: #ffffff; }
.wave-white-to-dark svg { height: 90px; }

.wave-dark-to-white {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    z-index: 2;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services-section {
    background: #ffffff;
    padding-bottom: 140px;
}

/* SVG dot grid background */
.svg-dot-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Filter Buttons */
.services-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.filter-btn {
    padding: 10px 22px;
    background: white;
    border: 2px solid #eef0f2;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.88rem;
    color: var(--gray);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), #ffde29);
    border-color: transparent;
    color: var(--secondary);
    box-shadow: 0 6px 20px rgba(249, 216, 6, 0.35);
}

/* Bento Grid */
.services-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

.bento-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #eef0f2;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    cursor: pointer;
}

.bento-card.size-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg2) 100%);
    color: white;
    min-height: 540px;
    padding: 45px;
}

.bento-card.size-wide {
    grid-column: span 2;
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.bento-card.size-large:hover {
    box-shadow: 0 25px 60px rgba(26, 26, 46, 0.35);
}

.bento-card.filtered-out {
    opacity: 0.2;
    filter: grayscale(0.8);
    pointer-events: none;
    transform: scale(0.96);
}

/* Background number */
.bento-number {
    position: absolute;
    top: 18px;
    right: 28px;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04);
    line-height: 1;
    z-index: 0;
    font-family: 'Poppins', sans-serif;
    pointer-events: none;
}

.bento-card.size-large .bento-number {
    color: rgba(255, 255, 255, 0.05);
    font-size: 9rem;
}

/* Decorative SVG blob in large card */
.bento-card.size-large::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(249, 216, 6, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bento-card.size-large::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 77, 48, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Icon */
.bento-icon {
    position: relative;
    width: 60px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    z-index: 1;
}

.bento-icon svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.bento-card:hover .bento-icon svg {
    transform: rotate(25deg) scale(1.08);
}

.bento-icon i {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.bento-card:hover .bento-icon i {
    color: var(--accent);
    transform: scale(1.15);
}

.bento-card.size-large .bento-icon {
    width: 90px;
    height: 100px;
    margin-bottom: 25px;
}

.bento-card.size-large .bento-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.bento-card.size-large:hover .bento-icon i {
    color: #ffde29;
}

/* Content */
.bento-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.bento-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.bento-card:hover h3 {
    color: var(--accent);
}

.bento-card.size-large h3 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--primary) 0%, #ffde29 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bento-card.size-large:hover h3 {
    color: inherit;
}

.bento-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.65;
}

.bento-card.size-large p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

/* Tags */
.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.bento-tag {
    padding: 3px 11px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tag-residential {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
}

.tag-commercial {
    background: rgba(249, 216, 6, 0.18);
    color: #a88e00;
}

.tag-industrial {
    background: rgba(255, 77, 48, 0.12);
    color: var(--accent);
}

.bento-card.size-large .bento-tag {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Learn more */
.bento-learn-more {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.bento-learn-more:hover {
    gap: 14px;
}

.bento-card.size-large .bento-learn-more {
    background: var(--primary);
    color: var(--secondary);
    padding: 12px 26px;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(249, 216, 6, 0.35);
    margin-top: 10px;
}

.bento-card.size-large .bento-learn-more:hover {
    background: #ffde29;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(249, 216, 6, 0.5);
}

/* ========================================
   Service Detail Modal
   ======================================== */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.service-modal.active {
    display: flex;
}

.service-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.85) translateY(40px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.service-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--dark);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg) scale(1.1);
}

.service-modal-header {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg2) 100%);
    padding: 38px 35px;
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 22px;
    position: sticky;
    top: 0;
    z-index: 5;
    overflow: hidden;
}

.service-modal-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(249, 216, 6, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.service-modal-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(249, 216, 6, 0.3);
    position: relative;
    z-index: 1;
}

.service-modal-header-text {
    position: relative;
    z-index: 1;
}

.service-modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.service-modal-categories .bento-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.service-modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.3;
}

.service-modal-body {
    padding: 35px;
}

.service-modal-desc {
    color: var(--dark);
    line-height: 1.75;
    margin-bottom: 28px;
    font-size: 1rem;
}

.service-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 28px;
}

.service-modal-section {
    background: var(--light);
    padding: 20px;
    border-radius: 14px;
}

.service-modal-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-modal-section h4 i {
    color: var(--accent);
    font-size: 1rem;
}

.service-modal-section ul,
.service-modal-section ol {
    padding-left: 22px;
}

.service-modal-section li {
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 0.88rem;
    line-height: 1.55;
}

.service-modal-section p {
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 600;
}

.service-modal-cta {
    display: flex;
    gap: 12px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.service-modal-cta .btn {
    flex: 1;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Bento Responsive */
@media (max-width: 992px) {
    .services-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-card.size-large {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 380px;
    }

    .bento-card.size-wide {
        grid-column: span 2;
    }

    .bento-card.size-large h3 { font-size: 1.8rem; }
}

@media (max-width: 600px) {
    .services-bento {
        grid-template-columns: 1fr;
    }

    .bento-card,
    .bento-card.size-large,
    .bento-card.size-wide {
        grid-column: span 1;
        grid-row: auto;
        min-height: auto;
        padding: 28px 24px;
    }

    .bento-card.size-large {
        padding: 32px 28px;
    }

    .bento-card.size-large h3 { font-size: 1.6rem; }
    .bento-card.size-large p { font-size: 0.95rem; }

    .service-modal-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 25px;
    }

    .service-modal-body { padding: 25px; }

    .service-modal-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-modal-cta { flex-direction: column; }

    .filter-btn { padding: 9px 18px; font-size: 0.82rem; }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background-color: var(--light);
    padding-bottom: 140px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.about-features { margin-top: 30px; }

.feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.feature:hover {
    background: white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    transform: translateX(10px);
}

.feature-icon {
    margin-right: 15px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.feature:hover .feature-icon { transform: scale(1.15); }

/* About image wrapper with SVG decorations */
.about-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-blob {
    position: absolute;
    width: 120%; height: 120%;
    top: -10%; left: -10%;
    z-index: 0;
    pointer-events: none;
}

.blob-rotate {
    animation: blobRotate 25s linear infinite;
    transform-origin: center;
}

.blob-rotate-reverse {
    animation: blobRotate 30s linear infinite reverse;
    transform-origin: center;
}

@keyframes blobRotate {
    to { transform: rotate(360deg); }
}

.about-bracket {
    position: absolute;
    z-index: 3;
    opacity: 0.7;
    transition: all 0.4s ease;
}

.about-bracket.top-left { top: -10px; left: -10px; }
.about-bracket.bottom-right { bottom: -10px; right: -10px; }

.about-img-wrapper:hover .about-bracket.top-left { top: -18px; left: -18px; }
.about-img-wrapper:hover .about-bracket.bottom-right { bottom: -18px; right: -18px; }

.about-img {
    position: relative;
    z-index: 1;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.about-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* ========================================
   PROJECTS SECTION - Expanding Accordion
   ======================================== */
.projects-section {
    position: relative;
    background: #ffffff;
}

.projects-accordion {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 520px;
    border-radius: 20px;
}

.project-panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px;
    min-width: 80px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-panel:hover,
.project-panel.active {
    flex: 5;
}

.project-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, filter 0.5s ease;
    filter: brightness(0.6) saturate(0.8);
}

.project-panel:hover img,
.project-panel.active img {
    transform: scale(1.05);
    filter: brightness(0.85) saturate(1);
}

.panel-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(26, 26, 46, 0.95) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Number badge */
.panel-number {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 3;
    transition: all 0.4s ease;
}

.project-panel:hover .panel-number,
.project-panel.active .panel-number {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Vertical title (collapsed state) */
.panel-title-vertical {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 25px;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.panel-title-vertical span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: white;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.75rem;
    white-space: nowrap;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.project-panel:hover .panel-title-vertical,
.project-panel.active .panel-title-vertical {
    opacity: 0;
}

/* Expanded content */
.panel-content {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
    z-index: 2;
}

.project-panel:hover .panel-content,
.project-panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
}

.panel-content .panel-tag {
    display: inline-block;
    background: var(--primary);
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.panel-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.panel-content p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 520px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.panel-view-btn {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(249, 216, 6, 0.3);
}

.panel-view-btn:hover {
    background: #ffde29;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(249, 216, 6, 0.5);
}

.panel-view-btn i {
    transition: transform 0.3s ease;
}

.panel-view-btn:hover i {
    transform: translateX(3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .projects-accordion {
        flex-direction: column;
        height: auto;
        gap: 16px;
    }

    .project-panel {
        flex: 1 1 auto !important;
        width: 100%;
        min-width: 0;
        height: 280px;
        border-radius: 14px;
    }

    .project-panel img {
        filter: brightness(0.75) saturate(1);
    }

    .panel-title-vertical {
        display: none;
    }

    .panel-content {
        opacity: 1;
        transform: translateY(0);
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .panel-content h3 {
        font-size: 1.2rem;
    }

    .panel-content p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .panel-number {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
        top: 14px;
        left: 14px;
    }
}

@media (max-width: 480px) {
    .project-panel {
        height: 250px;
    }

    .panel-content p {
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active { display: flex; }

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3001;
}

.lightbox-close:hover { color: var(--primary); transform: rotate(90deg); }

.lightbox-content {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow-y: auto;
    animation: lightboxIn 0.4s ease;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-content img { width: 100%; max-height: 500px; object-fit: cover; }

.lightbox-info { padding: 25px; }
.lightbox-info h3 { font-size: 1.5rem; margin-bottom: 10px; }
.lightbox-info p { color: var(--gray); line-height: 1.7; }

/* ========================================
   CLIENTS SECTION - Flip Cards
   ======================================== */
.clients-section {
    background: var(--dark-bg);
    color: white;
    position: relative;
    padding-bottom: 140px;
}

/* SVG hexagon pattern overlay */
.clients-pattern {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.clients-section .section-subtitle { color: var(--primary); }
.clients-section .section-title h2::after { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.clients-section .section-title p { color: rgba(255,255,255,0.6); }

.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.flip-card { height: 300px; cursor: pointer; }

.flip-card-inner {
    width: 100%; height: 100%;
    position: relative;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

/* Hint text: show correct word per device */
.hint-mobile { display: none; }
.hint-desktop { display: inline; }

@media (hover: none), (max-width: 768px) {
    .hint-mobile { display: inline; }
    .hint-desktop { display: none; }
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.flip-card-front {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

/* SVG circle behind flip card */
.flip-bg-shape {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    pointer-events: none;
    animation: blobRotate 20s linear infinite;
}

.flip-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.flip-card:hover .flip-icon { transform: scale(1.1); }

.flip-card-front h3 { font-size: 1.5rem; margin-bottom: 5px; position: relative; z-index: 1; }

.flip-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 10px;
    position: relative; z-index: 1;
}

.flip-hint i { margin-right: 5px; }

.flip-card-back {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back h3 { font-size: 1.5rem; margin-bottom: 15px; }
.flip-card-back p { margin-bottom: 20px; line-height: 1.6; font-size: 0.95rem; }
.flip-card-back .btn { background: white; color: var(--accent); }
.flip-card-back .btn:hover { background: var(--secondary); color: white; }

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    position: relative;
    overflow: hidden;
}

/* SVG decorative shapes */
.contact-deco-left {
    position: absolute;
    top: -50px; left: -100px;
    opacity: 0.5;
    pointer-events: none;
    animation: shapeFloat 12s ease-in-out infinite;
}

.contact-deco-right {
    position: absolute;
    bottom: 50px; right: -50px;
    opacity: 0.5;
    pointer-events: none;
    animation: shapeFloatReverse 15s ease-in-out infinite;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s ease;
    border: 1px solid #eef0f2;
}

.contact-item:hover {
    transform: translateY(-5px) translateX(5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.contact-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--dark-bg), var(--dark-bg2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.contact-item:hover .contact-icon {
    border-radius: 50%;
    transform: rotate(5deg) scale(1.08);
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.contact-item h4 { font-size: 16px; color: #2c3e50; margin-bottom: 4px; }
.contact-item p { color: #7f8c8d; font-size: 0.9rem; }

/* Contact Form */
.contact-form {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f2;
}

/* Floating Labels */
.floating-label { position: relative; }

.floating-label label {
    position: absolute;
    top: 14px; left: 15px;
    color: var(--gray);
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: white;
    padding: 0 5px;
}

.floating-label .form-control:focus ~ label,
.floating-label .form-control:not(:placeholder-shown) ~ label {
    top: -10px; left: 10px;
    font-size: 12px;
    color: var(--dark-bg);
    font-weight: 600;
}

.form-group { margin-bottom: 22px; }

.form-control {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--dark-bg);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 26, 46, 0.06);
}

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-weight: 600;
}

.custom-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-email { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.btn-email:hover { background: linear-gradient(135deg, #c0392b, #a93226); }

.btn-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.btn-whatsapp:hover { background: linear-gradient(135deg, #128C7E, #075E54); }

.button-group { display: flex; gap: 15px; margin-top: 10px; }

.error { color: #e74c3c; font-size: 13px; margin-top: 5px; display: none; }

.success-message {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.whatsapp-notification {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.whatsapp-notification a { color: white; text-decoration: underline; font-weight: bold; }

/* ========================================
   Footer
   ======================================== */
footer {
    background-color: var(--secondary);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 50px; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.footer-links li {
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.footer-links li:hover { transform: translateX(5px); }
.footer-links a { transition: color 0.3s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-links i { margin-right: 8px; color: var(--primary); }

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
}

/* Built by JPworks signature */
.built-by {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.built-by:hover {
    color: white;
}

.jp-brand {
    color: white;
    font-weight: 700;
    margin-left: 5px;
}

.jp-red {
    color: #e74c3c;
    transition: color 0.3s ease;
}

.built-by:hover .jp-red {
    color: #ff4d30;
}

.jp-cursor {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 1px;
    animation: jpCursorBlink 1s step-end infinite;
}

@keyframes jpCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Popups
   ======================================== */
.location-popup,
.email-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.location-popup.active,
.email-popup.active { display: flex; }

.location-content,
.email-content {
    background-color: white;
    border-radius: 20px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    animation: popupFadeIn 0.3s ease;
}

.location-content { max-width: 800px; }
.email-content { max-width: 500px; }

@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.location-header,
.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    border-radius: 20px 20px 0 0;
}

.location-header h3,
.email-header h3 { margin: 0; color: var(--secondary); }

.close-popup {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup:hover {
    color: var(--accent);
    background: rgba(255, 77, 48, 0.1);
    transform: rotate(90deg);
}

.location-body, .email-body { padding: 20px; }

.map-container { height: 400px; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.map-container iframe { width: 100%; height: 100%; border: none; }

.location-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.location-detail { display: flex; align-items: flex-start; gap: 10px; }
.location-detail i { color: var(--primary); font-size: 1.2rem; }

.email-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ========================================
   Back to Top with Progress Ring
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 54px;
    height: 54px;
    background-color: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    color: white;
    font-size: 1.1rem;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.back-to-top .fa-arrow-up {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.2s ease;
    stroke-linecap: round;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    .about-content,
    .contact-content { grid-template-columns: 1fr; }

    .about-img-wrapper { order: -1; }
    .about-img { height: 400px; }
    .hero-title { font-size: 2.8rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .clients-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

    .about-blob { display: none; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }

    .nav-menu {
        position: fixed;
        top: 70px; left: -100%;
        width: 100%;
        background-color: rgba(26, 26, 26, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transition: left 0.3s ease;
    }

    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 10px 0; }

    .logo-text { font-size: 1.5rem; }
    .logo-img { width: 40px; height: 40px; }

    .hero { padding: 140px 0 80px; min-height: auto; }
    .hero-title { font-size: 2rem; }

    .typewriter-wrapper {
        font-size: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .typewriter-text { min-width: auto; text-align: center; }

    .section-title { margin-bottom: 40px; }
    .section-title h2 { font-size: 2rem; }
    .section-title p { font-size: 0.92rem; }
    .section-subtitle { font-size: 0.8rem; letter-spacing: 2px; }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn { width: 100%; max-width: 250px; }

    .location-details { grid-template-columns: 1fr; }
    .map-container { height: 280px; }
    .contact-form { padding: 25px; }
    .button-group { flex-direction: column; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 15px;
        gap: 15px;
    }

    .stat-number { font-size: 1.6rem; }
    .stat-ring { width: 70px; height: 70px; }
    .flip-card { height: 260px; }

    .section { padding: 60px 0; }
    .services-section, .about, .clients-section { padding-bottom: 85px; }

    .wave-divider svg { height: 60px; }
    .wave-hero svg { height: 80px; }

    .hero-circuit-svg { opacity: 0.4; }
    .hero-floating-icons { display: none; }
    .contact-deco-left, .contact-deco-right { display: none; }

    /* Services filter buttons */
    .services-filter { gap: 8px; margin-bottom: 28px; }
    .filter-btn { padding: 9px 16px; font-size: 0.78rem; }

    /* Bento */
    .bento-number { font-size: 4rem; top: 12px; right: 18px; }
    .bento-card.size-large .bento-number { font-size: 6rem; }
    .bento-card h3 { font-size: 1.1rem; }
    .bento-card p { font-size: 0.85rem; }

    /* Service modal */
    .service-modal-cta { flex-direction: column; }
    .service-modal-close { top: 12px; right: 12px; width: 38px; height: 38px; }

    /* About */
    .about-img { height: 360px; }
    .about-bracket { width: 35px; height: 35px; }

    /* Contact items */
    .contact-item { padding: 18px; gap: 14px; }
    .contact-icon { width: 44px; height: 44px; }

    /* Footer */
    footer { padding: 45px 0 18px; }
    .footer-content { gap: 28px; }

    /* Back to top */
    .back-to-top { bottom: 18px; right: 18px; width: 46px; height: 46px; font-size: 0.95rem; }

    /* Lightbox */
    .lightbox { padding: 20px; }
    .lightbox-close { top: 12px; right: 15px; font-size: 1.7rem; }
    .lightbox-content img { max-height: 300px; }

    /* Popups */
    .location-content, .email-content { width: 95%; }
    .location-header h3, .email-header h3 { font-size: 1.1rem; }

    /* Form group margin tightened */
    .form-group { margin-bottom: 18px; }

    /* Scroll progress (slightly thicker for visibility on mobile) */
    .scroll-progress { height: 3px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.7rem; }
    .hero-desc { font-size: 0.9rem; line-height: 1.7; }
    .typewriter-wrapper { font-size: 0.88rem; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 18px 12px;
    }
    .stat-number { font-size: 1.35rem; }
    .stat-ring { width: 56px; height: 56px; }
    .stat-label { font-size: 0.6rem; letter-spacing: 0.5px; }
    .stat-icon { font-size: 1.2rem; }

    .section-title h2 { font-size: 1.7rem; }
    .section-title p { font-size: 0.88rem; }

    .clients-grid { grid-template-columns: 1fr; }
    .flip-card { height: 240px; }
    .flip-icon { width: 64px; height: 64px; font-size: 1.6rem; }

    /* Service modal tighter */
    .service-modal-header { padding: 25px 20px; gap: 15px; }
    .service-modal-icon { width: 56px; height: 56px; font-size: 1.5rem; }
    .service-modal-header h2 { font-size: 1.2rem; }
    .service-modal-body { padding: 22px 18px; }
    .service-modal-section { padding: 16px; }
    .service-modal-section h4 { font-size: 0.92rem; }
    .service-modal-section li { font-size: 0.82rem; }

    /* Contact form compact */
    .contact-form { padding: 22px 18px; }
    .form-control { padding: 11px 13px; font-size: 14px; }

    /* Footer copyright text */
    .footer-bottom p { font-size: 0.78rem; }
    .built-by { font-size: 0.8rem; }

    /* Lightbox */
    .lightbox-info { padding: 18px; }
    .lightbox-info h3 { font-size: 1.2rem; }

    /* Projects extra tight */
    .project-panel { height: 240px; }
    .panel-content h3 { font-size: 1.05rem; }
    .panel-content .panel-tag { font-size: 0.62rem; padding: 3px 9px; }
    .panel-view-btn { padding: 8px 18px; font-size: 0.78rem; }
}

/* Very small screens */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .hero-title { font-size: 1.5rem; }
    .section-title h2 { font-size: 1.5rem; }
    .stats-grid { gap: 8px; padding: 15px 10px; }
    .filter-btn { padding: 8px 12px; font-size: 0.72rem; }
    .filter-btn i { display: none; }
    .bento-card { padding: 22px 18px; }
    .project-panel { height: 220px; }
}
