/* Base Styles & Typography */
:root {
    /* Brand Colors from Logo */
    --primary-color: #007bff; /* Vibrant Blue */
    --secondary-color: #66cc33; /* Fresh Green */
    --dark-color: #1a2734;    /* NEW: Slightly darker for better contrast */
    --footer-dark-bg: #1f2a38; /* Slightly deeper background for the footer */
    --light-color: #ffffff;
    --gray-light: #f8f9fa;   
    --gray-medium: #dee2e6;  
    
    /* 🍎 New: Apple/System Font Stack for native aesthetic */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    
    /* NEW: Box Shadow Variables for clean design */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    
    /* NAVBAR ADJUSTABLE VARIABLES */
    --navbar-padding: 0.8rem 1.5rem;
    --navbar-gap: 15px;
    --navbar-link-padding: 8px 12px;
    --navbar-link-font-size: 0.95rem;
    --navbar-link-font-weight: 500;
    --navbar-link-border-radius: 6px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    /* NEW: Smooth transition for potential dark mode */
    transition: background-color 0.3s, color 0.3s;
    /* Mobile optimization */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    /* REDUCED: Was 4rem 1.5rem */
    padding: 3rem 1.5rem; 
    text-align: center;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    /* Mobile optimization */
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- TOP BAR STYLING --- */
#top-bar {
    background-color: var(--dark-color); /* Dark background */
    color: rgba(255, 255, 255, 0.9); /* Increased opacity for better legibility */
    font-size: 0.80rem;
    padding: 8px 0;
}

.container-top-bar {
    max-width: 1200px;
    margin: auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* IMPROVED: Added flex and gap for cleaner spacing logic */
.top-bar-contact {
    display: flex;
    gap: 20px; 
}

.top-bar-info p,
.top-bar-contact a {
    margin: 0;
    display: inline-block;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-bar-contact a:hover {
    color: var(--primary-color);
}

.top-bar-info i,
.top-bar-contact i {
    margin-right: 5px;
    color: var(--secondary-color); /* Use a secondary color for icons */
}
/* --- END TOP BAR STYLING --- */

/* --- Utility Classes --- */
.sub-heading {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* --- Buttons (Refactored for DRY) --- */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; 
    display: inline-block;
    /* Mobile: Ensure minimum touch target size of 44x44px */
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cta {
    /* IMPROVED: Removed !important */
    background-color: var(--secondary-color);
    color: var(--light-color); 
    padding: 12px 28px; 
    box-shadow: 0 4px 12px rgba(102, 204, 51, 0.3); 
    font-weight: 600;
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: #55b222;
    color: var(--light-color); 
    box-shadow: 0 8px 20px rgba(102, 204, 51, 0.5); 
    transform: translateY(-3px);
    border-color: #55b222;
}

.btn-primary {
    /* Inherits .btn styles */
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

/* Header & Navigation */
header {
    background: var(--light-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: var(--navbar-padding);
    gap: var(--navbar-gap);
    flex-wrap: nowrap;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo strong {
    font-weight: 700;
    color: var(--primary-color);
}

.logo img {
    margin-right: 10px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.nav-links li a {
    color: var(--dark-color);
    font-weight: var(--navbar-link-font-weight);
    padding: var(--navbar-link-padding);
    border-radius: var(--navbar-link-border-radius);
    transition: all 0.3s ease;
    font-size: var(--navbar-link-font-size);
    position: relative;
    display: inline-block;
}

.nav-links li a:not(.btn-cta)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links li a:not(.btn-cta):hover::after {
    width: 100%;
}

/* Contact Us button in navbar */
.nav-links li a.btn-cta {
    border: none;
}

/* Burger Icon for Mobile */
.burger {
    display: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.burger div {
    width: 28px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 6px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
    pointer-events: none;
}

/* Burger animation for the 'toggle' class controlled by main.js */
.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-6px, 7px);
}

.burger.toggle .line2 {
    opacity: 0;
}

.burger.toggle .line3 {
    transform: rotate(45deg) translate(-6px, -7px);
}

/* Hero Section (Carousel) - MODIFIED FOR VIDEO BACKGROUND */
.hero {
    position: relative;
    height: 90vh; 
    overflow: hidden;
    background: #111; 
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: none;
}

/* Video Background Styling (Generic for hero, services, careers) */
.video-background,
.section-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Overlay for text legibility (Generic for hero, services, careers) */
.video-overlay,
.section-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* Dark overlay for readability */
    z-index: 1; 
}


.carousel-slide.active {
    opacity: 1;
}

.hero-content {
    color: var(--light-color);
    max-width: 800px;
    padding: 20px;
    position: relative;
    z-index: 2; 
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* NEW: Text shadow for better visibility */
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero .btn-cta {
    font-size: 1.1rem;
    padding: 15px 30px; 
}


/* General Section Styling - Comfortable Spacing */
section {
    padding: 3rem 1.5rem; 
    overflow: hidden; 
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

/* About Section */
#about .container {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

#about h2 {
    width: 100%;
    text-align: center;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 200px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md); /* Using new variable */
}

/* --- Services Section with Video Background --- */
#services {
    position: relative;
    color: var(--light-color); /* Change text color for dark background */
    padding: 4rem 1.5rem; /* Reduced padding */
    background-color: #111; /* Fallback for video loading */
    z-index: 1;
}

/* Ensure content is positioned above the video and overlay */
.content-on-video {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Ensure text inside services is white */
#services h2, #services p { 
    color: var(--light-color);
}
#services h3 {
    color: var(--light-color);
}

.services-grid {
    display: grid;
    /* Desktop: 3 columns with a min size of 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px;
    margin-top: 3rem;
    text-align: center;
}

.service-card {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(5px); /* Optional: Frosted glass effect */
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease, box-shadow 0.3s ease;
    text-align: left;
    border-top: 5px solid var(--secondary-color);
    perspective: 1000px;
    transform: translateZ(0);
    color: var(--light-color);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light border */
}

.service-card i {
    color: var(--secondary-color); /* Highlight icons with green */
    font-size: 2rem;
    margin-bottom: 15px;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}
/* --- End Services Section Style --- */

/* --- Tech Stack Section --- */
#tech-stack {
    background-color: var(--light-color);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 30px;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tech-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px; 
    transition: transform 0.3s ease;
}

.tech-logo img {
    width: 100%; 
    height: auto;
    filter: grayscale(100%); 
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
    margin-bottom: 10px;
}

.tech-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.tech-logo:hover {
    transform: translateY(-5px);
}

.tech-logo p {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 500;
    margin: 0;
    text-align: center;
}

/* --- Why Choose Us Section --- */
#why-choose-us {
    background: var(--gray-light);
}

.why-container {
    text-align: left;
    display: flex;
    gap: 40px;
}

.why-video-column {
    flex: 1;
    min-width: 300px;
}

.why-video-player {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: block;
    object-fit: cover;
}

.why-text-column {
    flex: 1;
    min-width: 300px;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.why-card {
    background: var(--light-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid var(--primary-color);
}

.why-card i {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.why-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: var(--dark-color);
    font-weight: 700;
}

.why-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
/* --- End Why Choose Us Section --- */


/* --- Careers Section with Video Background --- */
#careers {
    position: relative;
    color: var(--light-color);
    padding: 4rem 1.5rem;
    background-color: #1a2734; /* Dark color fallback */
    z-index: 1;
}

/* Ensure text inside careers is white/light */
#careers h2, #careers p, #careers h4 { 
    color: var(--light-color);
}

#careers .sub-heading {
    color: var(--secondary-color);
}

.careers-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
    text-align: center;
}

.career-perk {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.career-perk i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
}

.career-perk h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.career-perk p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.career-perk:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
/* --- End Careers Section Style --- */

/* --- Combined Utility Section (FAQ & Estimate) --- */
#combined-utility {
    background: var(--gray-light);
}

.info-utility-grid {
    display: grid;
    /* Desktop: Estimation column is 1.5 times wider than FAQ */
    grid-template-columns: 1.5fr 1fr; 
    gap: 40px;
    text-align: left;
    max-width: 1000px;
    margin: 3rem auto 0;
    align-items: flex-start;
}

/* Estimation Column */
.estimation-col {
    background: var(--light-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-color);
}

.estimation-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-medium);
    border-radius: 6px;
    font-size: 1rem;
    appearance: none; /* Remove default select styling */
    background-color: var(--light-color);
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.estimation-form .btn-primary {
    width: 100%;
    padding: 12px 0;
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--light-color);
    color: var(--dark-color);
    border-left: 5px solid var(--secondary-color);
    text-align: center;
    transition: all 0.5s ease;
}

.result-box.hidden {
    display: none;
}

.final-estimate {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

/* FAQ Column */
.faq-col {
    background: var(--light-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md); /* Using new variable */
    border-left: 5px solid var(--secondary-color);
}

/* Accordion styles */
.accordion {
    margin-top: 20px;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-medium);
}

.accordion-header {
    background: none;
    color: var(--dark-color);
    cursor: pointer;
    width: 100%;
    border: none;
    text-align: left;
    padding: 18px 0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    color: var(--primary-color);
}

.accordion-header i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 0;
}

.accordion-content.active {
    max-height: 500px; /* Large enough value to accommodate content */
    padding: 0 0 15px 0;
    transition: max-height 0.6s ease-in, padding 0.4s ease-in;
}

.accordion-header[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.accordion-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}
/* --- End Combined Utility Section --- */


/* --- Contact Section --- */
#contact {
    background: var(--light-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 3rem;
    text-align: left;
    align-items: flex-start;
}

.contact-info {
    padding: 20px;
    border-radius: 12px;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #495057;
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-item a {
    color: #495057;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}


.contact-form-container {
    background: var(--gray-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.contact-form-container h3 {
    color: var(--primary-color);
    text-align: center;
}

.contact-form-container .form-group input[type="text"],
.contact-form-container .form-group input[type="email"],
.contact-form-container .form-group textarea,
.contact-form-container .form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form-container .form-group input[type="file"] {
    padding-top: 10px;
    padding-bottom: 10px;
}

.contact-form-container .form-group input:focus,
.contact-form-container .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form-container .form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

.contact-form-container .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

#form-status {
    background: #e9ecef;
    color: var(--dark-color);
    margin-top: 15px;
    text-align: center;
    border-left: 5px solid var(--primary-color);
}

.contact-map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: var(--shadow-md);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
/* --- End Contact Section --- */

/* --- Footer --- */
footer {
    background: var(--footer-dark-bg);
    color: var(--light-color);
    padding: 40px 1.5rem 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr; /* Layout adjusted for logo/info and links */
    gap: 40px;
    max-width: 1200px;
    margin: auto;
    text-align: left;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light-color);
    margin-bottom: 15px;
}

.footer-logo img {
    width: 40px;
    margin-right: 10px;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--light-color);
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-links a:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-middle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    grid-column: span 2; /* Span across two columns */
}

.footer-col h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1.8rem;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: block;
    max-width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 1rem;
}

.footer-col ul {
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 14px;
    opacity: 0.9;
    font-size: 0.95rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.footer-col a:hover::after {
    width: 100%;
}

.footer-col i {
    margin-right: 10px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.footer-contact p {
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 0.95rem;
    opacity: 0.85;
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.6);
}

/* --- Animation for Scroll (from main.js logic) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile Navigation Link Fade Animation (Used by main.js) --- */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================== */
/* --- RESPONSIVENESS MEDIA QUERIES --- */
/* ===================================== */

/* TABLET: Max-width 1024px (Wider tablets and smaller desktops) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 2.5rem 1rem;
    }
    h2 {
        font-size: 2rem;
    }
    
    /* Navbar adjustments */
    .logo {
        font-size: 1.1rem;
    }
    .nav-links li a {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    /* Hero adjustments */
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }

    /* Why Choose Us stacking */
    .why-container {
        flex-direction: column;
    }
    .why-video-column, .why-text-column {
        min-width: 100%;
    }
    .why-video-player {
        max-height: 350px;
    }

    /* Contact Grid stacking */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* TABLET: Max-width 768px (Standard tablet view) */
@media screen and (max-width: 768px) {
    :root {
        --navbar-padding: 0.7rem 1rem;
        --navbar-gap: 8px;
    }

    #navbar {
        padding: var(--navbar-padding);
        gap: var(--navbar-gap);
    }
    
    /* Hide desktop navigation links */
    .nav-links {
        /* Mobile Overlay Setup */
        position: fixed;
        top: 0;
        right: 0;
        width: 75%; /* Overlay width */
        max-width: 300px;
        height: 125vh;
        background-color: var(--dark-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px; /* Space for the fixed header */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        
        /* Visibility/Transition control */
        transform: translateX(100%); /* Start off-screen */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.5s ease-in-out, opacity 0.5s ease, visibility 0s 0.5s; 
    }

    .nav-links.nav-active {
        transform: translateX(0%); /* Slide in */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.5s ease-in-out, opacity 0.5s ease, visibility 0s; /* Show visibility immediately */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 0;
        /* Initial state for JS animation */
        opacity: 0; 
    }
    
    .nav-links li a {
        color: var(--light-color); /* Light color for dark overlay */
        padding: 15px 20px;
        font-size: 1.1rem;
        width: 100%;
        display: block;
        border-radius: 0;
    }
    
    .nav-links li a:not(.btn-cta)::after {
        display: none; /* Hide desktop underline */
    }

    .nav-links li a.btn-cta {
        margin-top: 20px;
        width: 80%;
    }

    /* Show the burger icon */
    .burger {
        display: block; 
        position: relative;
        z-index: 1002;
    }
    
    .logo {
        font-size: 1rem;
        min-width: 0;
        flex-shrink: 1;
    }
    .logo img {
        width: 35px;
        height: auto;
        margin-right: 8px;
    }
    
    /* Hero adjustments */
    .hero { 
        height: 65vh; 
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }

    /* About Section stacking */
    #about .container {
        flex-direction: column;
        gap: 30px;
    }
    .about-text, .about-image {
        min-width: 100%;
        text-align: center;
    }

    /* Services Grid adjustments */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    /* Combined Utility (Estimation & FAQ) stacking */
    .info-utility-grid {
        grid-template-columns: 1fr; /* Stack the two columns */
        gap: 30px;
    }
    .faq-col, .estimation-col {
        padding: 30px; /* Reduced padding for smaller screens */
    }

    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 30px;
    }
    .footer-middle {
        grid-template-columns: 1fr; /* Stack middle columns */
    }
}


/* MOBILE: Max-width 480px (Small phones) */
@media screen and (max-width: 480px) {
    
    /* TOP BAR stacking for small phones */
    #top-bar {
        padding: 5px 0;
        font-size: 0.75rem; /* Reduce font size */
    }
    .container-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 0 1rem;
    }
    .top-bar-info {
        width: 100%;
        text-align: center;
    }
    .top-bar-contact {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    .top-bar-info p {
        margin: 0;
    }
    
    /* Section padding/typography */
    section { 
        padding: 2rem 1rem; 
    }
    .container {
        padding: 2rem 1rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    
    /* Hero section */
    .hero { 
        height: 55vh; 
    }
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    .hero p {
        font-size: 0.9rem;
    }
    .hero .btn-cta {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Why Choose Us grid collapses to one column */
    .why-choose-grid {
        grid-template-columns: 1fr;
    }

    /* Contact form padding */
    .contact-form-container {
        padding: 30px;
    }

    /* Footer Info column */
    .footer-col:first-child {
        grid-column: span 1;
    }
}