/* Import Google Font - Roboto for a clean look */
@import url('https://fonts.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* General Body & HTML Reset */
html {
    scroll-behavior: smooth;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #e8f4fd; /* Soft, light blue background */
    position: relative;
    overflow-x: hidden;
}

/* Container for Centering Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile Header Bar */
.mobile-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    height: 60px; /* Explicitly defining a fixed height */
}

.mobile-header .site-logo {
    color: white;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
    z-index: 1001;
}

/* Hamburger Menu Icon */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 35px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu svg {
    display: block;
}

.hamburger-menu .line {
    fill: none;
    stroke: white;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease 0.3s, stroke-dashoffset 0.3s ease 0.3s, transform 0.3s ease;
}

.hamburger-menu.active .line-1 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 4;
    transform: translate(0px, 0px) rotate(45deg);
}

.hamburger-menu.active .line-2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke-width: 4;
    transform: translate(0px, 0px) rotate(45deg);
    opacity: 0;
}

.hamburger-menu.active .line-3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 4;
    transform: translate(0px, 0px) rotate(-45deg);
}

/* Left Sidebar Navigation */
.sidebar {
    background-color: #34495e;
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px;
    height: 100%;
    z-index: 999;
    padding-top: 80px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.active {
    left: 0;
}

.sidebar .logo {
    margin-bottom: 40px;
    padding: 0 20px;
    text-align: center;
}

.sidebar .logo a {
    color: white;
    text-decoration: none;
    font-size: 2em;
    font-weight: bold;
    white-space: nowrap;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar nav ul li {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    padding: 10px 0;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #2c3e50;
    color: #1abc9c;
}

/* Main Content Area */
.main-content-wrapper {
    margin-top: 70px;
    padding-left: 0;
    transition: padding-left 0.3s ease;
    flex-grow: 1;
}

/* HERO SECTION STYLES */
.hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    
    background-image: url('../images/hero-home.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Intro Text on Background */
.intro-text-on-background {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 40px auto;
}
.intro-text-on-background h1 {
    font-size: 3.2em;
    margin-bottom: 10px;
    font-weight: 700;
}
.intro-text-on-background p {
    font-size: 1.5em;
    font-weight: 300;
}

/* MAIN CONTENT SECTIONS */
.additional-content-section {
    padding: 60px 0;
    background-color: white;
    position: relative;
    z-index: 5;
    box-shadow: 0 -5px 10px rgba(0,0,0,0.05);
    color: #333;
}

.additional-content-section h2 {
    font-size: 2.5em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.additional-content-section h3 {
    font-size: 1.8em;
    color: #34495e;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
}

.additional-content-section p {
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: justify;
    font-weight: 300;
}

/* Styles for centered CTA buttons */
.additional-content-section .cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

/* Styles for centered service text */
#how-we-do-it h4, #how-we-do-it p {
    text-align: center;
}

/* Styles for the double-line divider */
.divider {
    width: 60%;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    margin: 40px auto;
}

/* Styles for uniform font size */
h1, h2, h4, p {
    font-size: 1.2rem !important;
    line-height: 1.6;
}

/* Special rule for h1 to keep it slightly larger */
h1 {
    font-size: 1.5rem !important;
}

/* Service Cards */
.service-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.service-cards .card {
    background-color: #ecf0f1;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
    box-sizing: border-box;
    text-align: center;
    font-weight: 300;
}

.service-cards .card h4 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 700;
}

.service-cards .card p {
    font-size: 0.95em;
    color: #555;
    text-align: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: #1abc9c;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #16a085;
}

/* Footer Styles */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 20px 0;
    position: relative;
    z-index: 10;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.9em;
    font-weight: 300;
}

footer a {
    color: #1abc9c;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (min-width: 993px) {
    .mobile-header {
        display: none;
    }
    .sidebar {
        left: 0;
        padding-top: 20px;
        box-shadow: none;
    }
    .main-content-wrapper {
        margin-left: 250px;
        margin-top: 0;
    }
    .hero-section {
        min-height: 400px;
        max-height: 72vh;
        background-size: cover;
    }
    .hero-section .container {
        padding-top: 0;
    }
    header nav {
        display: none;
    }
}

@media (max-width: 992px) {
    /* Mobile-specific adjustments */
    .mobile-header {
        display: flex;
    }
    /* This new rule correctly pushes all content below the fixed header */
    .main-content-wrapper {
        margin-top: 60px; /* Use the exact header height to push content down */
        padding-top: 0;
    }
    .hero-section {
        min-height: auto; 
        padding-top: 20px;
        padding-bottom: 20px;
        background-size: 100% auto; 
    }
    .hero-section .container {
        padding-top: 0;
    }
    .hero-content {
        max-width: 90%;
    }
    .hero-content h1, .hero-content h2 {
        font-size: 2.8em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .service-cards .card {
        flex: 1 1 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
    .hamburger-menu {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero-section {
      min-height: auto;
    }
    .hero-content h1, .hero-content h2 {
        font-size: 2.2em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .additional-content-section {
        padding: 40px 0;
    }
    .additional-content-section h2 {
        font-size: 2em;
    }
    .intro-text-on-background h1 {
        font-size: 2.5em;
    }
    .intro-text-on-background p {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .hero-content h1, .hero-content h2 {
        font-size: 1.8em;
    }
    .hero-content p {
        font-size: 0.95em;
    }
    .additional-content-section {
        padding: 30px 0;
    }
    .intro-text-on-background h1 {
        font-size: 2em;
    }
    .intro-text-on-background p {
        font-size: 1.1em;
    }
}

/* Contact Page Specific Form Adjustments */
.contact-form {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: 18px;
    padding: 25px;
    background-color: transparent;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="text"][name="subject"],
.contact-form textarea {
    padding: 18px;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    box-sizing: border-box;
    vertical-align: top;
}
.contact-form textarea {
    min-height: 180px;
}
.contact-form button.btn {
    align-self: center;
    padding: 15px 35px;
    font-size: 1.1rem;
}
.additional-content-section .container h2,
.additional-content-section .container p,
.additional-content-section .container h3 {
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.additional-content-section .container h3:last-of-type {
    margin-top: 40px;
}
.additional-content-section .container p strong {
    display: inline-block;
    min-width: 80px;
}

/* Contact Page Mobile Alignment Adjustments */
.contact-form .form-group {
    display: block;
    width: 100%;
    margin-bottom: 18px;
}
.contact-form label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-text-color);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="text"][name="subject"],
.contact-form textarea {
    width: 100%;
    max-width: 100%;
    text-align: left;
}
.contact-form {
    align-items: stretch;
    padding-left: 15px;
    padding-right: 15px;
}