/* General Reset / Base Styles */
html {
    overflow-x: hidden; /* Prevent horizontal scroll */
    scroll-behavior: smooth; /* Add smooth scrolling */
}

body {
    font-family: 'Lato', sans-serif;
    color: rgb(51, 51, 51);
    margin: 0;
}

/* Apply box-sizing globally */
*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* Layout Helpers - Uses older table display method for vertical centering */
.sectionContainer {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.sectionContent {
    max-width: 1400px;
    display: table-cell;
    vertical-align: middle;
    padding: 80px 15px;
    position: relative;
    overflow: visible !important; /* Consider if !important is truly necessary */
}

.sectionOverlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Ensure overlay is behind content */
}

/* Header Styles */
header {
    width: 100%;
    position: relative;
    min-height: 900px; /* Consider reducing if too large */
    color: white;
    background: url("../img/electric-car-charging.jpeg") center center / cover no-repeat;
}

#headerOverlay {
    background: rgba(0, 0, 0, 0.5);
}

#outerHeader {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: table; /* Uses table display for vertical centering */
    table-layout: fixed;
}

#headerContainer {
    /* height: 100%; */ /* Likely redundant as parent has height and this is table-cell */
    display: table-cell;
    vertical-align: middle;
}

#headerContent {
    padding-top: 80px;
    padding-bottom: 80px;
    max-width: 1400px;
    /* Centering handled by parent table-cell */
}

#headerTitle {
    font-family: 'Poppins', sans-serif;
    font-size: 80px;
    font-weight: 800;
    margin-bottom: 10px;
}

#headerSubtitle {
    font-family: 'Roboto Slab', sans-serif;
    font-size: 24px;
    font-weight: 300;
    line-height: 1.5;
}

/* Main Menu / Overlay Styles */
#mainMenu {
    position: absolute;
    width: 100%;
    z-index: 1000; /* Ensure menu button is above header content */
    top: 0;
    left: 0;
}

#trigger-overlay {
    position: fixed;
    z-index: 1001; /* Above #mainMenu */
    padding: 15px;
    border: none;
    background: none;
    cursor: pointer;
    top: 20px;
    right: 20px;
}

#trigger-overlay i {
    font-size: 24px;
    color: white;
    text-shadow: #8a8a8a 0px 0px 3px;
}

.overlay {
    position: fixed;
    width: 300px;
    height: 100%;
    top: 0;
    right: 0;
    z-index: 9999;
    background: rgb(50, 50, 50);
    color: white;
    visibility: hidden;
    /* backface-visibility: hidden; */ /* Prefixed version likely unnecessary */
    backface-visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.5s, visibility 0s 0.5s;
}

.overlay.open {
    visibility: visible;
    transform: translateX(0%);
    transition: transform 0.5s;
}

.overlay .overlay-close {
    position: absolute;
    right: 20px;
    top: 20px;
    overflow: hidden;
    border: none;
    outline: none;
    background: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.overlay nav {
    position: relative;
    top: 50%;
    /* height: auto; */ /* Default value */
    transform: translateY(-50%);
    padding: 20px;
}

.overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.overlay ul li {
    display: block;
    min-height: 54px;
    /* width: 100%; */ /* Default for block */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.overlay ul li:last-child {
    border-bottom: none;
}

.overlay ul li a {
    display: block;
    padding: 15px 10px;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 1px;
    /* text-decoration: none; */ /* Inherited from global 'a' */
    /* cursor: pointer; */ /* Default for 'a' */
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
}

.overlay ul li a:hover,
.overlay ul li a:focus {
    text-decoration: none; /* Ensure no underline on hover/focus */
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
}

/* Section Styles */
section {
    width: 100%;
    position: relative;
    /* height: auto; */ /* Default value */
    background: white; /* Default section background */
}

/* About Section */
#aboutContainer {
    background: url("../img/lightning-strike-bg.jpg") center center / cover no-repeat;
}
#aboutContent {
    text-align: center; /* Center align content within this div */
    color: white; /* Apply common color */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); /* Apply common shadow */
}
#aboutTitle {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    font-weight: 800;
    /* color: white; */ /* Inherited from #aboutContent */
    /* text-shadow: ...; */ /* Inherited from #aboutContent */
    /* text-align: center; */ /* Inherited from #aboutContent */
}
#aboutSubtitle {
    font-family: 'Roboto Slab', sans-serif;
    font-size: 20px;
    font-weight: 300;
    /* color: white; */ /* Inherited from #aboutContent */
    /* text-shadow: ...; */ /* Inherited from #aboutContent */
    /* text-align: center; */ /* Inherited from #aboutContent */
}
#aboutParagraph1, #aboutParagraph2 {
    font-family: 'Lato', sans-serif;
    /* color: white; */ /* Inherited from #aboutContent */
    /* text-shadow: ...; */ /* Inherited from #aboutContent */
    font-size: 18px;
    /* text-align: center; */ /* Inherited from #aboutContent */
    line-height: 1.6;
    margin-bottom: 15px;
}
/* Note: This offset might be better handled with Bootstrap offset classes if applicable */
#aboutContent .row > div[class*="col-"] {
    position: relative;
    left: 25%;
}

/* Roadmap Section (ID: XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ) */
/* Consider renaming this ID for maintainability */
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .sectionContainer {
    background: url("../img/autumn-road-sunset-bg.jpg") center center / cover no-repeat;
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customHeader {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customColumn {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: 5px;
    padding-right: 5px;
    color: white; /* Common color for column content */
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customTitle {
    font-family: 'Poppins', sans-serif;
    /* color: rgb(255, 255, 255); */ /* Inherited from .customColumn */
    font-size: 16px;
    /* text-align: center; */ /* Inherited from .customColumn */
    /* width: 100%; */ /* Default behavior */
    font-weight: 800;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* flex-grow: 0; */ /* Default value */
    /* flex-shrink: 0; */ /* Default value */
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customImage {
    margin: 15px auto;
    /* flex-shrink: 0; */ /* Default value */
    max-width: 50px;
    margin-top: 10px;
    margin-bottom: 10px;
    display: block; /* Ensure margin auto works */
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customParagraph {
    font-family: 'Lato', sans-serif;
    /* color: white; */ /* Inherited from .customColumn */
    /* text-align: center; */ /* Inherited from .customColumn */
    /* width: 100%; */ /* Default behavior */
    font-size: 12px;
    line-height: 1.5;
    flex-grow: 1; /* Allow paragraph to take remaining space */
    margin-top: auto; /* Push paragraph towards the bottom if needed */
    padding-top: 10px;
}
#XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .columnRowContainer .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch; /* Ensure columns have equal height if wrapped */
}

/* Contact Section */
#contactContainer {
    background: url("../img/robot-plug-info-bg.jpg") left center / cover no-repeat; /* Changed position to left center */
    margin-bottom: 0px;
    min-height: 800px;
    display: table; /* Uses table display for vertical centering */
    width: 100%;
}

#contactContent {
    display: table-cell;
    vertical-align: middle;
}

#contactTitle {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: white;
    text-align: center;
    margin-bottom: 10px;
}
#contactReachOut {
    font-family: 'Roboto Slab', sans-serif;
    font-size: 20px;
    font-weight: 300;
    color: white;
    text-align: center;
    margin-top: 20px;
}
/* Warning: Selecting based on inline style attribute is fragile. Add a class to the target div in HTML if possible. */
#contactWrap .col-sm-12 div[style*="text-align: center"] {
    margin-top: 20px;
    margin-bottom: 40px;
}
#contactWrap .col-sm-12 div[style*="text-align: center"] img {
    display: block; /* Needed for margin auto centering */
    margin-left: auto;
    margin-right: auto;
}

/* Footer Styles */
#footer {
    /* width: 100%; */ /* Default for footer */
    position: relative;
    background: rgb(50, 50, 50);
    color: white;
    padding: 30px 15px;
    text-align: center;
}

#footerFour {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* Newsletter Popup Styles */
#newsletterOuter {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Controlled by JS */
    opacity: 0; /* For fade-in */
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#newsletterOuter.visible {
    display: flex;
}

#newsletterBorder {
    background: white;
    color: rgb(50, 50, 50);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 100%;
}

#closeNewsletterButton {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    z-index: 1; /* Relative to #newsletterBorder */
}
#closeNewsletterButton:hover {
    color: #333;
}

#newsletterIcon {
    font-size: 40px;
    color: rgb(50, 50, 50);
    margin-bottom: 15px;
}

#newsletterTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 10px;
}

#newsletterHr {
    width: 50px;
    margin: 15px auto;
    border: 0;
    border-top: 2px solid #eee;
}

#newsletterSubtitle {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
    color: #666;
}

#newsletterRowContainer {
    display: flex;
    flex-direction: column; /* Default: Stack on small screens */
    gap: 10px;
}

#newsletterInput {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    flex-grow: 1;
}

#newsletterButton {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    background-color: rgb(50, 50, 50);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

#newsletterButton:hover {
    background-color: #555;
}

/* Utility Classes */
.customButton {
    display: inline-block;
    padding: 10px 20px;
    color: rgb(50, 50, 50);
    border: 2px solid rgb(50, 50, 50);
    background: transparent;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s; /* Include all transitioning properties */
    text-decoration: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    text-align: center;
}

.customButton:hover {
    color: white;
    border-color: rgb(50, 50, 50); /* Keep border color consistent on hover? Or change? Assuming keep */
    background: rgb(50, 50, 50);
}

/* Styles for buttons on dark/image backgrounds */
/* Grouping selectors for common properties */
header .customButton,
.customImageBg .customButton, /* Assuming .customImageBg exists */
#contactContainer .customButton, /* Target within #contactContainer */
#aboutContainer .customButton { /* Added for about section if needed */
    color: white;
    border-color: white;
}

header .customButton:hover,
.customImageBg .customButton:hover,
#contactContainer .customButton:hover,
#aboutContainer .customButton:hover {
    color: rgb(50, 50, 50);
    background: white;
    border-color: white;
}

/* SweetAlert Overrides */
/* This seems overly specific, ensure it's necessary and doesn't break layout */
.swal-icon span {
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Media Queries */
@media only screen and (min-width: 768px) {
    #newsletterRowContainer {
        flex-direction: row; /* Side-by-side layout */
    }
}

@media only screen and (max-width : 800px) {
    #headerContent {
        max-width: 90%;
        padding-left: 15px;
        padding-right: 15px;
    }

    #headerTitle {
        font-size: 50px;
    }
    #headerSubtitle {
        font-size: 18px;
    }
    .sectionContent {
        padding: 60px 15px;
    }
    /* Grouping selectors for common responsive style changes */
    #aboutTitle,
    #XrmXQXIzg5qIcOt0nXgc1aslAwtsuX78vIn6ISEdJ .customHeader,
    #contactTitle {
        font-size: 32px;
    }
}

/* Added media query for contact background on small screens */
@media (max-width: 767px) {
    #contactContainer {
        /* Shift background slightly left to keep email visible */
        background-position: 20% 50%; /* Adjust the first percentage (horizontal) as needed */
    }
}