@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #0077b6;
    --secondary-color: #00b4d8;
    --accent-color: #90e0ef;
    --text-color: #333;
    --light-text: #f0faff;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 10px;
    /* Global offset for sticky header */
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Changed from center to allow scrolling */
    background: linear-gradient(135deg, #023e8a, #0077b6, #0096c7);
    background-image: url('./assets/images/plumbing_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    /* Changed from fixed for better mobile performance */
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    padding-top: 6rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling for iOS */
}

/* Ensure sections are not hidden behind fixed navbar when navigated to */
#services,
#about,
#contact {
    scroll-margin-top: 85px;
}

/* Dark overlay to ensure text readability */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Removed dark overlay */
    z-index: -1;
    position: fixed;
    /* Fixed overlay */
    display: none;
    /* Completely hide it to be safe */
}



.container {
    width: 90%;
    max-width: 900px;
    /* Increased max-width */
    padding: 1rem;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    color: var(--light-text);
    animation: fadeInUp 1s ease-out;
}

.logo-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    width: 100%;
    max-width: 450px;
    /* Increased from 350px */
    height: auto;
    /* Make logo white for better contrast on dark background */
    filter: brightness(0) invert(1) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.main-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: #90e0ef;
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: none;
    -webkit-text-fill-color: initial;
    background: none;
}

h1 {
    /* Existing h1 styles might need adjustment if they conflict with .main-title */
}

.subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.25rem);
    font-weight: 300;
    margin-bottom: 2rem;
    color: #caf0f8;
}

.content {
    /* removed background for cleaner look in services */
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
    text-align: left;
}

.intro-text {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.6);
    /* Improved visibility */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Visible border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    /* Shadow for depth */
    backdrop-filter: blur(5px);
    text-align: left;
}

.about-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #caf0f8;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.about-section p {
    margin-bottom: 1rem;
    color: #e0f7fa;
    /* Light blue text for high contrast */
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-section strong {
    color: var(--accent-color);
    font-weight: 600;
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    /* Changed to 4:3 ratio for full visibility */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-weight: 600;
}

.service-card p {
    font-size: 0.95rem;
    color: #e0f7fa;
    margin-bottom: 0;
    line-height: 1.5;
}

.contact-section {
    display: flex;
    flex-direction: column;
    /* Stack vertically for clearer list */
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.6);
    /* Darker background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Visible border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
    backdrop-filter: blur(5px);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    /* Slightly larger text */
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    /* Limit width for readability */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.2);
}

.contact-item svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

.contact-item a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Map Container */
.map-container {
    margin-top: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 35px;
    /* Adjust height for navbar */
    width: auto;
    filter: brightness(0) invert(1);
    /* Make logo white */
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: #e0f7fa;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: #fff;
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Adjust body padding for navbar */
body {
    padding-top: 5rem;
}

/* Mobile Menu Icon (Desktop Default) */
.hamburger-menu {
    display: none;
}

.mobile-only {
    display: none;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Force visibility on mobile to prevent JS delay/failure issues */
@media (max-width: 768px) {
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Footer Styles */
footer {
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem 0;
    text-align: center;
    color: #8899a6;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile Action Bar */
.mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    display: none;
    z-index: 1001;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.action-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    gap: 10px;
    transition: background 0.3s;
}

.call-btn {
    background: #023e8a;
    color: white;
}

.call-btn:hover {
    background: #002f6c;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background: #128c7e;
}

/* =========================================
   Responsive Design & Mobile Optimizations
   ========================================= */

/* Tablet & Mobile (Max Width: 768px) */
@media (max-width: 768px) {

    /* Layout Adjustments */
    .container {
        width: 95%;
        padding: 0.5rem;
    }

    .glass-card {
        padding: 1.5rem 1rem;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Navigation */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1002;
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    /* Animate Hamburger to X */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Fixed Sidebar for Mobile/Tablet */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.98) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2.5rem !important;
        z-index: 9999 !important;

        /* Hidden state */
        transform: translateX(100%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s !important;
    }

    .nav-links.active {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Specific Desktop Fix (> 992px) */
@media (min-width: 993px) {
    .hamburger-menu {
        display: none !important;
    }

    .nav-links {
        display: flex !important;
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        pointer-events: auto !important;
        height: auto !important;
        width: auto !important;
        background: transparent !important;
        flex-direction: row !important;
    }
}

.nav-links li a {
    font-size: 1.5rem;
    /* Larger text */
    font-weight: 500;
    color: #fff;
}

.mobile-only {
    display: block;
}

.nav-container {
    justify-content: space-between;
    /* Space between logo and burger */
    padding: 0 1rem;
    /* Add horizontal padding */
    width: 100%;
}

.nav-logo img {
    height: 28px;
    /* Slightly smaller for mobile */
}

/* Services Grid */
.services-grid {
    grid-template-columns: 1fr;
    /* Single column */
    gap: 1.5rem;
}

/* Sections */
.about-section {
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.contact-section {
    flex-direction: column;
    gap: 1rem;
}

/* Mobile Bottom Bar Visibility */
.mobile-action-bar {
    display: flex;
}

.whatsapp-float {
    display: none;
    /* Hide float in favor of bar */
}

/* Spacing for Fixed Elements */
body {
    padding-bottom: 80px;
    /* Space for bottom bar */
}

footer {
    padding-bottom: 80px;
}

/* Scroll Offset Adjustment for Mobile */
#services,
#about,
#contact {
    scroll-margin-top: 60px;
    /* Tighter offset specifically for mobile header */
}
}

/* Small Mobile (Max Width: 480px) */
@media (max-width: 480px) {

    h1 {
        font-size: 1.6rem;
    }

    .intro-text {
        font-size: 0.95rem;
        padding: 1rem;
    }

    /* Tighter padding for very small screens */
    .glass-card {
        padding: 1.25rem 0.75rem;
    }

    .service-card {
        margin-bottom: 1rem;
    }

    /* Make action bar slightly more compact if needed */
    .mobile-action-bar {
        height: 55px;
    }

    .action-btn {
        font-size: 0.95rem;
    }
}