/* ==========================================================================
   Design System & Tokens - Makkah Sewage Services Work Showcase
   ========================================================================== */

:root {
    --font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
    --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;

    /* Color Palette */
    --primary-teal: #14b8a6;
    --primary-light: #5eead4;
    --primary-dark: #0f766e;
    
    --brand-cyan: #2dd4bf;
    --brand-cyan-glow: rgba(45, 212, 191, 0.35);
    
    --bg-dark: #0f172a;
    --bg-header: #0d1b2a;
    --bg-section-light: #f0fdfa;
    --bg-card: #ffffff;
    
    --text-dark: #0f172a;
    --text-muted: #475569;
    --text-light: #f8fafc;
    --text-emerald: #0d9488;
    
    --border-light: #ccfbf1;
    --border-subtle: #e2e8f0;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.12);
    --shadow-teal: 0 10px 30px rgba(20, 184, 166, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #f8fafc;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Floating Background Glows */
.ambient-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.bg-glow-1 {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--brand-cyan), transparent);
    animation: floatGlow 12s ease-in-out infinite alternate;
}

.bg-glow-2 {
    bottom: 20%;
    left: -100px;
    background: radial-gradient(circle, var(--primary-teal), transparent);
    animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, -40px) scale(0.9); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-dark);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ==========================================================================
   CSS Animation Creator - Scroll Reveal & Motion Directives
   ========================================================================== */

.reveal-fade-up, .reveal-fade-left, .reveal-fade-right, .reveal-scale-up {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-up {
    transform: translateY(40px);
}

.reveal-fade-left {
    transform: translateX(-40px);
}

.reveal-fade-right {
    transform: translateX(40px);
}

.reveal-scale-up {
    transform: scale(0.92) translateY(20px);
}

.reveal-active {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Micro-interaction Glow Pulse */
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(45, 212, 191, 0.2); }
    50% { box-shadow: 0 0 20px rgba(45, 212, 191, 0.6); }
}

/* Buttons & Badges */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 36px rgba(20, 184, 166, 0.4);
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
    background-color: #20ba5a;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35);
}

.btn-call-header {
    background-color: rgba(45, 212, 191, 0.15);
    color: var(--brand-cyan);
    border: 1px solid rgba(45, 212, 191, 0.3);
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
}

.btn-call-header:hover {
    background-color: var(--brand-cyan);
    color: var(--bg-dark);
}

.btn-card-call {
    width: 100%;
    background: var(--bg-section-light);
    color: var(--primary-dark);
    border: 1.5px solid var(--primary-teal);
    padding: 0.85rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-card-call:hover, .btn-card-call.highlight-btn {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-teal);
}

/* Card Service Actions & Square Call Button */
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: auto;
}

.btn-card-wa {
    flex: 1;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    border: 1.5px solid transparent;
    padding: 0.85rem 1rem;
    font-size: 0.98rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition-normal);
}

.btn-card-wa:hover {
    background: linear-gradient(135deg, #20ba5a, #0e7367);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.btn-card-wa i {
    font-size: 1.25rem;
}

.btn-card-call-sq {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-section-light);
    color: var(--primary-dark);
    border: 1.5px solid var(--primary-teal);
    border-radius: var(--radius-md);
    font-size: 1.15rem;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-card-call-sq:hover {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(20, 184, 166, 0.12);
    color: var(--primary-dark);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.badge-glow {
    background: rgba(45, 212, 191, 0.15);
    color: var(--brand-cyan);
    border-color: rgba(45, 212, 191, 0.3);
}

.pulse-glow {
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.5); }
    70% { box-shadow: 0 0 0 16px rgba(20, 184, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(13, 27, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-normal);
    padding: 0.8rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-cyan), var(--primary-teal));
    color: var(--bg-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px var(--brand-cyan-glow);
    transition: var(--transition-normal);
}

.brand:hover .brand-icon {
    transform: rotate(-10deg) scale(1.1);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.8rem;
    color: var(--brand-cyan);
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.4rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 2px;
    background-color: var(--brand-cyan);
    transition: var(--transition-fast);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    position: relative;
    padding: 9.5rem 0 5rem 0;
    background: linear-gradient(180deg, #0d1b2a 0%, #1e293b 100%);
    color: #ffffff;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.75rem;
    color: #ffffff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #5eead4, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--brand-cyan);
}

.stat-item strong {
    display: block;
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.1rem;
}

.stat-item span {
    font-size: 0.8rem;
    color: #94a3b8;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.15);
}

.hero-visual {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(45, 212, 191, 0.25);
    transition: var(--transition-smooth);
}

.hero-image-wrapper:hover {
    border-color: var(--brand-cyan);
    transform: translateY(-5px);
}

.hero-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-wrapper:hover .hero-img {
    transform: scale(1.05);
}

.floating-badge {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    left: 1.5rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 212, 191, 0.3);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.floating-badge i {
    color: var(--brand-cyan);
    font-size: 1.2rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
    padding: 5rem 0;
    background-color: #f8fafc;
}

.section-header {
    margin-bottom: 3.5rem;
}

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

.sub-heading {
    display: inline-block;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.card-image-box {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image-box img {
    transform: scale(1.08);
}

.card-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--bg-section-light);
    color: var(--primary-dark);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ==========================================================================
   Portfolio Showcase Section (معرض الأعمال)
   ========================================================================== */

.portfolio-section {
    padding: 5rem 0;
    background: #ffffff;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-teal);
    transform: translateY(-2px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.8rem;
}

.portfolio-item {
    transition: all 0.4s ease;
}

.portfolio-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 4/3;
    background-color: #0f172a;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover img {
    transform: scale(1.12);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .portfolio-info {
    transform: translateY(0);
}

.p-category {
    display: inline-block;
    color: var(--brand-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.portfolio-info h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.portfolio-info p {
    color: #cbd5e1;
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
}

.btn-zoom-img {
    background: rgba(45, 212, 191, 0.2);
    color: var(--brand-cyan);
    border: 1px solid rgba(45, 212, 191, 0.4);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-zoom-img:hover {
    background: var(--brand-cyan);
    color: var(--bg-dark);
}

/* ==========================================================================
   Before & After Slider Section
   ========================================================================== */

.before-after-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

.ba-slider-container {
    position: relative;
    max-width: 900px;
    height: 480px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid #ffffff;
    user-select: none;
    touch-action: pan-y;
}

.ba-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ba-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-before {
    z-index: 1;
}

.ba-after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    border-left: none;
}

.ba-label {
    position: absolute;
    top: 1.25rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffffff;
    z-index: 15;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    max-width: calc(50% - 1.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.label-before {
    left: 1.25rem;
    background: rgba(225, 29, 72, 0.9);
}

.label-after {
    right: 1.25rem;
    background: rgba(13, 148, 136, 0.9);
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--brand-cyan);
    z-index: 20;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.8);
}

.ba-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: var(--brand-cyan);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ba-slider-container:hover .ba-handle-button {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.5), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.ba-range-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
    padding: 3rem 0;
    background-color: #ffffff;
}

.features-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    background: var(--bg-section-light);
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
}

.feature-item {
    text-align: center;
    padding: 1rem;
}

.f-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    color: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem auto;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.feature-item:hover .f-icon {
    transform: scale(1.15) rotate(10deg);
    background: var(--primary-teal);
    color: #ffffff;
}

.feature-item h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-item p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-card {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.info-card:hover {
    border-color: var(--primary-teal);
    transform: translateY(-3px);
}

.info-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-section-light);
    color: var(--primary-teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-body h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.info-body p, .info-body a {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.info-body a:hover {
    color: var(--primary-teal);
}

.map-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.map-header-link {
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
}

.map-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
}

.map-external-link:hover {
    color: var(--primary-teal);
}

.contact-form-panel {
    background: #ffffff;
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: #f8fafc;
    transition: var(--transition-fast);
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-teal);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
    color: #ffffff;
    padding: 0.9rem;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-teal);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.35);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #0f172a;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--brand-cyan);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-content img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000000;
}

.lightbox-caption {
    padding: 1rem 1.5rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    background: #0f172a;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: #ef4444;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background-color: var(--bg-header);
    color: #94a3b8;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .brand {
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 400px;
}

.footer-links h4, .footer-contact h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a:hover {
    color: var(--brand-cyan);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--brand-cyan);
}

.footer-contact a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.float-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    transition: var(--transition-normal);
}

.float-whatsapp {
    background-color: #25D366;
}

.float-phone {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-dark));
}

.float-btn:hover {
    transform: scale(1.12);
}

.float-tooltip {
    position: absolute;
    left: 70px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    pointer-events: none;
}

.float-btn:hover .float-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-teal);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--primary-teal);
    font-size: 1.3rem;
}

/* Reduced Motion Accessibility Constraint */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group, .hero-stats {
        justify-content: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ba-slider-container {
        height: 360px;
    }
}

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

    .nav-menu {
        position: fixed;
        top: 0;
        right: -280px;
        bottom: 0;
        width: 280px;
        background-color: var(--bg-header);
        z-index: 999;
        flex-direction: column;
        padding: 6rem 2rem 2rem 2rem;
        transition: right var(--transition-normal);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .btn-call-header span {
        display: none;
    }
    
    .btn-call-header {
        padding: 0.5rem;
        border-radius: 50%;
        width: 38px;
        height: 38px;
    }

    .ba-slider-container {
        height: 320px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

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

    .section-desc {
        font-size: 0.95rem;
    }

    /* Hero Mobile Layout */
    .hero-section {
        padding: 6rem 0 3rem 0;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }

    .stat-divider {
        width: 80%;
        height: 1px;
    }

    /* Services Cards Mobile Layout */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .card-content {
        padding: 1.25rem 1rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-text {
        font-size: 0.92rem;
        margin-bottom: 1.2rem;
    }

    .card-actions {
        gap: 0.5rem;
    }

    .btn-card-wa {
        padding: 0.75rem 0.75rem;
        font-size: 0.92rem;
    }

    .btn-card-call-sq {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.05rem;
    }

    /* Portfolio Mobile Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Before & After Mobile Layout */
    .ba-slider-container {
        height: 260px;
    }

    .ba-label {
        top: 0.75rem;
        padding: 0.3rem 0.65rem;
        font-size: 0.75rem;
        max-width: calc(50% - 0.75rem);
    }

    .label-before {
        left: 0.75rem;
    }

    .label-after {
        right: 0.75rem;
    }

    .label-extra {
        display: none;
    }

    /* Contact Form Mobile Layout */
    .contact-form-panel {
        padding: 1.5rem 1rem;
    }

    /* Floating Actions Mobile */
    .floating-actions {
        bottom: 1rem;
        right: 1rem;
        gap: 0.6rem;
    }

    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }
}

@media (max-width: 400px) {
    .brand-title {
        font-size: 0.92rem;
    }

    .brand-sub {
        font-size: 0.72rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }
}


/* Mobile viewport containment: prevent horizontal gaps/scroll while preserving vertical scrolling */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    min-width: 0;
}

main,
section,
header,
footer,
.container {
    max-width: 100%;
}

img,
video,
svg,
iframe {
    max-width: 100%;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        min-width: 0;
    }

    .hero-container,
    .contact-wrapper,
    .footer-container,
    .services-grid,
    .portfolio-grid,
    .features-box {
        min-width: 0;
        width: 100%;
    }

    .hero-content,
    .hero-visual,
    .hero-stats,
    .contact-info-panel,
    .contact-form-panel,
    .features-box,
    .ba-slider-container {
        min-width: 0;
        max-width: 100%;
    }

    .hero-title,
    .hero-subtitle,
    .section-title,
    .section-desc,
    .card-title,
    .card-text,
    .info-body,
    .footer-col {
        overflow-wrap: anywhere;
    }

    .nav-menu {
        max-width: min(280px, 85vw);
    }
}

@media (max-width: 576px) {
    .container {
        padding-inline: 0.75rem;
    }

    .hero-section,
    .services-section,
    .portfolio-section,
    .before-after-section,
    .features-section,
    .contact-section,
    .footer {
        overflow-x: clip;
    }

    .hero-cta-group .btn,
    .btn-lg {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .hero-stats {
        width: 100%;
    }

    .ba-slider-container {
        width: 100%;
    }
}


/* Fixed mobile menu control: stays at the top-left and never creates horizontal overflow */
@media (max-width: 768px) {
    .mobile-toggle {
        position: fixed;
        top: max(0.75rem, env(safe-area-inset-top));
        left: max(0.75rem, env(safe-area-inset-left));
        z-index: 1002;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        border-radius: 10px;
        touch-action: manipulation;
    }

    .navbar,
    .mobile-toggle,
    .nav-menu,
    .mobile-overlay {
        max-width: 100vw;
    }
}


/* Final navbar containment and mobile typography safeguards */
.navbar {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: clip;
}

.navbar .nav-container {
    min-width: 0;
    max-width: 1200px;
    box-sizing: border-box;
}

.navbar .brand,
.navbar .nav-actions,
.navbar .brand-text {
    min-width: 0;
}

.navbar .brand-text {
    overflow: hidden;
    text-align: right;
}

@media (max-width: 768px) {
    .navbar .nav-container {
        width: 100%;
        max-width: 100vw;
        padding-inline: 0.75rem;
        gap: 0.5rem;
        overflow: hidden;
    }

    .navbar .brand {
        flex: 1 1 auto;
        max-width: calc(100vw - 5.5rem);
        overflow: hidden;
    }

    .navbar .brand-title {
        display: block;
        max-width: 100%;
        font-size: clamp(0.72rem, 3.4vw, 0.95rem);
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar .brand-sub {
        display: block;
        font-size: clamp(0.58rem, 2.6vw, 0.75rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar .brand-icon {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .navbar .nav-actions {
        flex: 0 0 auto;
        min-width: 0;
        padding-left: 3.25rem;
    }

    .navbar .btn-call-header {
        flex: 0 0 38px;
    }

    .nav-menu {
        right: calc(-1 * min(280px, 85vw));
        width: min(280px, 85vw);
        max-width: 85vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .nav-menu.active {
        right: 0;
    }
}

@media (max-width: 380px) {
    .navbar .nav-container {
        padding-inline: 0.5rem;
    }

    .navbar .brand {
        max-width: calc(100vw - 5rem);
    }

    .navbar .brand-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .navbar .nav-actions {
        padding-left: 3rem;
    }
}
