/* 
 * SecureAutomation - Privacy-Focused Building Management Systems
 * A minimalist, block-based responsive design
 */

/* Base styles and CSS reset */
:root {
    /* Vibrant modern color palette: ef476f, ffd166, 06d6a0, 118ab2, 073b4c */
    --primary: #073b4c;        /* Midnight green - sophisticated base */
    --secondary: #06d6a0;      /* Emerald - energy and growth */
    --accent: #ef476f;         /* Bright pink - bold highlights */
    --tertiary: #118ab2;       /* Blue NCS - trust and stability */
    --quaternary: #ffd166;     /* Sunglow - warmth and optimism */
    --light: #ffffff;          /* Clean white for contrast */
    --dark: #073b4c;           /* Midnight green for depth */
    --white: #ffffff;          /* Pure white for clarity */
    
    /* Dynamic gradients for visual impact */
    --gradient-hero: linear-gradient(135deg, #073b4c 0%, #118ab2 50%, #06d6a0 100%);
    --gradient-accent: linear-gradient(135deg, #ef476f 0%, #ffd166 100%);
    --gradient-cool: linear-gradient(135deg, #118ab2 0%, #06d6a0 100%);
    --gradient-warm: linear-gradient(135deg, #ffd166 0%, #ef476f 100%);
    
    /* Block colors with strategic gradients */
    --block-1: var(--gradient-accent);
    --block-2: var(--gradient-cool);
    --block-3: var(--gradient-warm);
    --block-4: var(--gradient-hero);
    
    /* Sophisticated shadows */
    --shadow-light: 0 2px 10px rgba(7, 59, 76, 0.15);
    --shadow-medium: 0 8px 30px rgba(7, 59, 76, 0.25);
    --shadow-heavy: 0 15px 35px rgba(7, 59, 76, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Inter';
    font-display: fallback;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
}

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

ul {
    list-style: none;
}

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

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

section {
    padding: 5rem 0;
}

.btn {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    color: var(--white);
}

/* Header and Navigation */
header {
    background: var(--primary);
    backdrop-filter: blur(20px);
    color: var(--white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    border-bottom: 3px solid var(--secondary);
    transition: all 0.3s ease;
}

/* Scrolled header state for mobile */
header.scrolled {
    padding: 0.8rem 0;
}

header.scrolled .logo {
    font-size: 1.4rem;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}


.cellular-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: auto;
    cursor: pointer;
    will-change: transform;
    contain: layout style paint;
    background: transparent;
}

.cellular-canvas:not([data-initialized]) {
    background: linear-gradient(45deg, 
        rgba(116, 136, 115, 0.1) 25%, 
        transparent 25%, 
        transparent 75%, 
        rgba(116, 136, 115, 0.1) 75%, 
        rgba(116, 136, 115, 0.1)), 
        linear-gradient(45deg, 
        rgba(116, 136, 115, 0.1) 25%, 
        transparent 25%, 
        transparent 75%, 
        rgba(116, 136, 115, 0.1) 75%, 
        rgba(116, 136, 115, 0.1));
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Services Section */
.services {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
    position: relative;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    contain: layout;
}

/* Fallback for browsers without CSS Grid support */
@supports not (display: grid) {
    .service-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .service-item {
        flex: 1 1 calc(33.333% - 1rem);
        margin-bottom: 2rem;
    }
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.service-block {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
    color: var(--dark);
    border: 2px solid transparent;
    contain: layout style;
    will-change: transform;
}

.service-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: var(--block-1);
    transition: height 0.3s ease;
}


.service-block:nth-child(1)::before {
    background: var(--block-1);
}

.service-block:nth-child(2)::before {
    background: var(--block-2);
}

.service-block:nth-child(3)::before {
    background: var(--block-3);
}

.service-block:nth-child(4)::before {
    background: var(--block-4);
}

.service-block:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

/* Individual service block colors */
.service-block[data-service="security"] {
    border-color: var(--accent);
}

.service-block[data-service="security"]:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b94 100%);
    color: var(--white);
}

.service-block[data-service="lighting"] {
    border-color: var(--quaternary);
}

.service-block[data-service="lighting"]:hover {
    background: linear-gradient(135deg, var(--quaternary) 0%, #ffdb4d 100%);
    color: var(--dark);
}

.service-block[data-service="solar"] {
    border-color: var(--secondary);
}

.service-block[data-service="solar"]:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, #00e5b3 100%);
    color: var(--white);
}

.service-block[data-service="hvac"] {
    border-color: var(--tertiary);
}

.service-block[data-service="hvac"]:hover {
    background: linear-gradient(135deg, var(--tertiary) 0%, #1ea6d9 100%);
    color: var(--white);
}

.service-block[data-service="automation"] {
    border-color: var(--primary);
}

.service-block[data-service="automation"]:hover {
    background: linear-gradient(135deg, #118ab2 0%, #06d6a0 100%);
    color: var(--white);
}

/* Keep button styled properly when service block is hovered */
.service-block:hover .expand-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 15;
    pointer-events: auto;
}

.service-block:hover .expand-btn:hover {
    background: var(--white);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.8);
    z-index: 15;
}

.service-block:hover::before {
    height: 100%;
    opacity: 0.1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem auto;
}

.service-block h3 {
    margin-bottom: 0.8rem;
    flex-shrink: 0;
    text-shadow: 2px 2px 4px rgba(7, 59, 76, 0.3);
    color: var(--primary);
}

.service-block p {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.expand-btn {
    background: var(--white);
    color: var(--dark);
    border: 1px solid #e0e0e0;
    padding: 0.7rem 1.2rem;
    border-radius: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1.2rem;
    margin-bottom: 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    align-self: center;
    min-width: 120px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: #c0c0c0;
}


.service-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.service-details.expanded {
    display: flex;
}

@media (min-width: 768px) {
    .service-details.expanded {
        padding: 3rem 15%;
    }
}

.service-details-modal {
    background: var(--white);
    border-radius: 20px;
    max-width: 900px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    contain: layout style;
    will-change: transform, opacity;
}

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

.service-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.service-details-title {
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.service-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.service-close-btn:hover {
    background: #f0f0f0;
    color: var(--dark);
}

.service-content {
    padding: 2rem;
    color: var(--dark);
}

.service-content h4 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.service-content ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.service-content ul li {
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
}

.service-content ul li:hover {
    background: #f1f3f4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

@media (max-width: 768px) {
    .service-content ul {
        grid-template-columns: 1fr;
    }
}

/* Modal responsive design */
@media (max-width: 768px) {
    .service-details-modal {
        width: 98%;
        max-height: 90vh;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .service-details-header {
        padding: 1rem 1rem 0.5rem 1rem;
    }
    
    .service-content {
        padding: 0.8rem 1rem 1rem 1rem;
        font-size: 0.8rem;
    }
    
    .service-details-title {
        font-size: 1.1rem;
        margin-bottom: 0;
    }
    
    .service-content h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .service-content ul li {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .service-close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}


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

/* Fallback for browsers without CSS Grid support */
@supports not (display: grid) {
    .approach-blocks {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .approach-block {
        flex: 1 1 calc(33.333% - 1rem);
        margin-bottom: 2rem;
    }
}

.approach-block {
    padding: 3rem;
    border-radius: 10px;
    color: var(--white);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    contain: layout style;
    will-change: transform;
}

.approach-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.approach-block:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.approach-block:hover::after {
    opacity: 1;
}

.approach-block:nth-child(1) {
    background: var(--block-1);
}

.approach-block:nth-child(2) {
    background: var(--block-2);
}

.approach-block:nth-child(3) {
    background: var(--block-3);
}

/* Combined Features and Approach Background */
.approach {
    background: linear-gradient(to right, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding-bottom: 2.5rem;
}

/* Features Section */
.features {
    background: linear-gradient(to right, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    position: relative;
    padding-top: 2.5rem;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.feature-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}



/* Contact Section */
.contact {
    background: var(--gradient-warm);
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Fallback for browsers without CSS Grid support */
@supports not (display: grid) {
    .contact-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .contact-form,
    .contact-info {
        flex: 1 1 calc(50% - 1.5rem);
        margin-bottom: 3rem;
    }
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.3);
    transform: translateY(-2px);
}

.contact-info {
    padding: 2rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links ul {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    align-items: center;
}

.footer-links ul li {
    margin-bottom: 0;
}

.footer-links ul li a {
    padding: 0.5rem 0.3rem;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .footer-links ul {
        gap: 1.2rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-links ul li a {
        padding: 0.7rem 0.5rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-links ul {
        gap: 0.8rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .footer-links ul li a {
        padding: 0.6rem 0.4rem;
        min-width: 44px;
        min-height: 44px;
    }
}

.footer-links ul li a {
    color: var(--light);
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Animation classes */
.animate {
    opacity: 1;
    transform: translateY(0);
}

.service-block,
.approach-block {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.service-block.animate,
.approach-block.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation for service icons */
.service-icon {
    animation: float 3s ease-in-out infinite;
}


.service-block:nth-child(2) .service-icon {
    animation-delay: 0.5s;
}

.service-block:nth-child(3) .service-icon {
    animation-delay: 1s;
}

.service-block:nth-child(4) .service-icon {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}


/* Pulse animation for CTA button */
.hero .btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: var(--shadow-medium);
    }
    50% {
        box-shadow: var(--shadow-heavy), 0 0 0 10px rgba(116, 136, 115, 0.1);
    }
    100% {
        box-shadow: var(--shadow-medium);
    }
}

/* Improved feature list styling */
.feature-list li {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-list li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-list {
    position: relative;
}

.feature-list li {
    position: relative;
    padding-left: 3rem;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        padding-top: 42px; /* Manual offset for mobile navigation */
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    /* Enhanced mobile header with scroll effects */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 1rem 0;
        transition: all 0.3s ease;
    }
    
    header.scrolled {
        padding: 0.6rem 0;
        box-shadow: var(--shadow-heavy);
    }
    
    header.scrolled .logo {
        font-size: 1.3rem;
    }
    
    nav {
        position: fixed;
        top: var(--header-height, 70px); /* Dynamic header height */
        right: -100%;
        width: 70%;
        height: calc(100vh - var(--header-height, 70px)); /* Adjust height to account for header */
        background-color: var(--primary);
        transition: all 0.3s ease;
        z-index: 1001;
        padding-top: 2rem;
        overflow-x: hidden;
    }
    
    nav.active {
        right: 0 !important;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .mobile-menu-btn {
        display: block;
        z-index: 1002;
        position: relative;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
        outline: none;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: var(--white);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .service-block {
        padding: 0.7rem;
        font-size: 0.8rem;
        min-height: 200px;
    }
    
    .service-block p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .service-block h3 {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .expand-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        margin-top: 1rem;
    }
    
    .approach-blocks,
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    section {
        padding: 3rem 0;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}