/* ============================================
   Maximus & Co - Glassmorphism + Multi-Color Gradients
   ============================================ */

/* CSS Custom Properties */
:root {
    --gradient-primary: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    --gradient-accent: linear-gradient(135deg, #00c6ff, #7c3aed, #f472b6);
    --gradient-text: linear-gradient(135deg, #00c6ff, #7c3aed, #f472b6);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --dark-bg: #0a0a1e;
}

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

html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Montserrat', sans-serif;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 30, 0.85), rgba(30, 10, 50, 0.8)),
        url('assets/pexels-photomix-company-14953886.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

/* Prevent iOS Safari elastic scrolling from showing background */
@supports (-webkit-touch-callout: none) {
    body::before {
        background-attachment: scroll;
        height: 100vh;
    }
}

/* Make sure all sections are positioned relative to the overlay */
section {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ============================================
   Navigation - Glassmorphism
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 30, 0.85);
    padding: 0.8rem 2rem;
}

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

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: transparent;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #00c6ff, #7c3aed, #f472b6);
    background-clip: text;
    -webkit-background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    transition: filter 0.3s ease;
}

.logo-text:hover {
    filter: brightness(1.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* Mobile Navigation */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    text-align: center;
    color: #fff;
    z-index: 1;
}

.hero-content {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 20px;
    box-sizing: border-box;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 4s ease infinite;
    text-shadow: none;
}

.hero-content h2 {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 4s ease infinite;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5), 0 0 20px rgba(244, 114, 182, 0.3);
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.services-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1200px;
}

/* Service Cards - Premium 3D */
.service-card {
    width: 100%;
    height: 350px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    margin: 0 auto;
    /* Smooth transition for flip; tilt is set directly via JS */
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.3s ease;
}

/* 3D card depth - visible edge when tilted */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(244, 114, 182, 0.4));
    transform: translateZ(-8px);
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before,
.service-card.tilt-active::before {
    opacity: 1;
}

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

/* When card is flipped, disable pointer events on the hidden front face
   so clicks reach the visible back face (and its links) */
.service-card.flipped .card-front {
    pointer-events: none;
}

.service-card:not(.flipped) .card-back {
    pointer-events: none;
}

.service-card .card-front {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

/* Gradient bottom accent line */
.service-card .card-front::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 3;
}

/* Glare/shine overlay — positioned via JS */
.service-card .card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(
        ellipse at var(--glare-x, 50%) var(--glare-y, -20%),
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.08) 30%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .card-front::after,
.service-card.tilt-active .card-front::after {
    opacity: 1;
}

/* Elevated shadow when tilting */
.service-card:hover,
.service-card.tilt-active {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(124, 58, 237, 0.15);
}

.service-card:nth-child(1) .card-front {
    background-image: linear-gradient(rgba(10, 10, 30, 0.65), rgba(10, 10, 30, 0.65)), url('assets/plumbing2.jpg');
    background-size: cover;
}

.service-card:nth-child(2) .card-front {
    background-image: linear-gradient(rgba(10, 10, 30, 0.65), rgba(10, 10, 30, 0.65)), url('assets/heatingrad.jpg');
    background-size: cover;
}

.service-card:nth-child(3) .card-front {
    background-image: linear-gradient(rgba(10, 10, 30, 0.65), rgba(10, 10, 30, 0.65)), url('assets/emerganceplumbing.jpg');
    background-size: cover;
}

.service-card:nth-child(4) .card-front {
    background-image: linear-gradient(rgba(10, 10, 30, 0.65), rgba(10, 10, 30, 0.65)), url('assets/gas-safe-logo_1.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 1rem;
}

.service-card .card-front i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.4));
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.service-card:hover .card-front i,
.service-card.tilt-active .card-front i {
    transform: translateZ(30px) scale(1.1);
}

.service-card .card-front h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.service-card:hover .card-front h3,
.service-card.tilt-active .card-front h3 {
    transform: translateZ(20px);
}

/* Card back - glass with gradient edge */
.card-back {
    transform: rotateY(180deg);
    background: rgba(10, 10, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    justify-content: flex-start;
    color: white;
    border-radius: 15px;
    overflow: hidden;
}

/* Gradient top accent on card back */
.card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 15px 15px 0 0;
}

.card-back h3 {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    flex-shrink: 0;
}

.card-back p {
    text-align: center;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--text-muted);
    flex-shrink: 0;
}

.card-back ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.card-back li {
    margin: 0.3rem 0;
    text-align: center;
    font-size: 0.85rem;
    position: relative;
    padding-left: 0;
    color: var(--text-muted);
}

.card-back li:before {
    content: "\2022";
    color: #7c3aed;
    margin-right: 8px;
}

.service-note {
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.service-card i {
    font-size: 3rem;
    color: #7c3aed;
    margin-bottom: 1rem;
}

/* Card CTA button (used on fault code card) */
.card-cta-button {
    display: inline-block;
    margin-top: auto;
    padding: 0.6rem 1.5rem;
    flex-shrink: 0;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 4s ease infinite;
}

.card-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* ============================================
   About Section
   ============================================ */
.about {
    position: relative;
    padding: 5rem 2rem;
    color: white;
}

.about-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: 2px;
}

/* Glass container for about text */
.about-text .feature-list {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.feature-list {
    display: grid;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.feature i {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.5rem;
}

.about-image {
    flex: 1;
    max-width: 650px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid transparent;
    background-image: var(--gradient-accent);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
}

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

/* ============================================
   Contact Section
   ============================================ */
.contact {
    position: relative;
    padding: 5rem 2rem;
    color: white;
}

.contact-container {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glass form container */
.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), 0 0 5px rgba(244, 114, 182, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form select {
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 100%;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), 0 0 5px rgba(244, 114, 182, 0.2);
}

.contact-form select option {
    background: #1a1a2e;
    color: white;
}

.submit-button {
    padding: 1rem 2rem;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 4s ease infinite;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4), 0 0 15px rgba(244, 114, 182, 0.3);
}

/* Glass cards for contact info */
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.info-item i {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.5rem;
    min-width: 24px;
    text-align: center;
}

.contact-info .info-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info .info-item a:hover {
    color: var(--text-primary);
}

.info-item p {
    color: var(--text-muted);
}

/* ============================================
   Alert Messages
   ============================================ */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

.alert i {
    font-size: 1.2rem;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #66bb6a;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ef5350;
}

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

/* Loading Spinner */
.loading-spinner i {
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Footer - Glassmorphism
   ============================================ */
footer {
    position: relative;
    padding: 3rem 2rem;
    background: rgba(10, 10, 30, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    color: white;
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section h3 {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-muted);
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* Gradient divider */
.footer-bottom::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: var(--gradient-accent);
    margin-bottom: 2rem;
    opacity: 0.5;
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: white;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 4s ease infinite;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5), 0 0 15px rgba(244, 114, 182, 0.3);
    transform: translateY(-2px);
}

/* ============================================
   Responsive - Consolidated Mobile Styles
   ============================================ */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 1rem;
    }

    .navbar.scrolled {
        padding: 0.8rem 1rem;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1000;
    }

    .menu-toggle span {
        width: 25px;
        height: 2px;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: rgba(10, 10, 30, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        padding: 2rem;
        z-index: 999;
    }

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

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    /* Hero */
    .hero {
        min-height: 100vh;
        padding-top: 60px;
        align-items: flex-start;
    }

    .hero-content {
        width: 100%;
        padding: 70px 15px 15px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    .hero-content .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }

    /* Content width fix */
    .hero,
    section,
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    section {
        padding: 40px 20px;
    }

    /* Section titles */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Services */
    .services {
        padding: 3rem 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        width: calc(100% - 40px);
        margin: 0 auto;
        padding: 1rem 0;
    }

    .service-card {
        width: 100%;
        height: auto;
        min-height: 350px;
        margin: 0 auto;
    }

    .card-front,
    .card-back {
        width: 100%;
        height: 100%;
        padding: 1.5rem;
    }

    .card-front i {
        font-size: 3rem;
    }

    .card-front h3 {
        font-size: 1.5rem;
    }

    .card-back {
        font-size: 0.9rem;
    }

    .card-back h3 {
        font-size: 1.5rem;
    }

    .card-back ul {
        padding: 0 1rem;
    }

    /* About */
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        height: 250px;
    }

    /* Contact */
    .contact {
        padding: 2rem 1rem;
        display: block;
    }

    .contact-container {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-info {
        width: 100%;
        max-width: 100%;
        margin-top: 2rem;
    }

    /* Scroll to top */
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero,
    section {
        background-attachment: scroll;
    }
}
