/* --- Global Styles & Variables --- */
:root {
    --primary-color: #1A4D2E; /* Dark Green for Text/Headings */
    --secondary-color: #2E8B57; /* SeaGreen for Accents/Links */
    --hover-color: #113520;     /* Darker Green for Hover */
    --accent-color: #f7941d;   /* Sedeer's Orange */
    --hero-overlay-color: rgba(102, 204, 170, 0.85); /* Light Seafoam Green */
    --text-color: #333;
    --light-grey: #f4f4f4;
    --border-color: #ddd;
    --font-family: 'Lato', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); color: var(--text-color); line-height: 1.6; background-color: #fff; display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { color: var(--primary-color); margin-bottom: 15px; font-weight: 700; }
a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-color); }

/* --- Pre-Header (NEW) --- */
.pre-header { background-color: #f8f9fa; border-bottom: 1px solid var(--border-color); padding: 8px 0; font-size: 14px; }
.pre-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.pre-header-left { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.pre-header-left span { color: var(--text-color); }
.pre-header-left i { color: var(--secondary-color); margin-right: 5px; }
.pre-header-right { display: flex; align-items: center; gap: 15px; }
.pre-header-right a { color: var(--secondary-color); font-size: 16px; display: flex; align-items: center; gap: 5px; font-weight: 700; }
.pre-header-right a .fab { font-size: 18px; }

/* --- Main Header (NEW) --- */
.main-header { background-color: #fff; padding: 10px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 50px; width: auto; }
.logo-text { font-size: 28px; font-weight: 900; color: var(--primary-color); text-transform: uppercase; }
.main-nav ul { list-style: none; display: flex; gap: 30px; }
.main-nav ul li a { color: var(--primary-color); font-weight: 700; padding: 10px 0; position: relative; transition: opacity 0.3s ease; }
.main-nav ul li a .fa-chevron-down { font-size: 12px; margin-left: 5px; }
.main-nav ul:hover > li a { opacity: 0.6; }
.main-nav ul > li a:hover { opacity: 1; }

/* --- Mega Menu (NEW for Columns) --- */

.has-dropdown { position: relative; }
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 0 0 5px 5px;
    padding: 20px;
    
    /* The Fix: Use opacity and pointer-events instead of display:none */
    opacity: 0;
    transform: translateX(-50%) translateY(10px); /* Start slightly lower */
    pointer-events: none; /* Make it unclickable when hidden */
    transition: opacity 0.3s ease, transform 0.3s ease;
    
    /* Ensure it's a flex container for columns */
    display: flex; 
}

.has-dropdown:hover > .mega-menu {
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Move into final position */
    pointer-events: auto; /* Make it clickable when visible */
}

.mega-menu ul { flex-direction: column; gap: 0 !important; align-items: flex-start; }
.mega-menu ul li a { display: block; padding: 8px 15px !important; font-weight: 400 !important; border-radius: 4px; white-space: nowrap; }
.mega-menu ul li a:hover { background-color: var(--hover-color); color: #fff !important; }
.mega-menu-columns { display: flex; gap: 30px; width: 520px; /* Adjust width as needed */ }
.mega-menu-column { flex: 1; }
.mega-menu-column h4 { color: var(--primary-color); padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid var(--secondary-color); font-size: 16px; }
.mega-menu-column h4 i { margin-right: 8px; }

.header-right { display: flex; align-items: center; gap: 20px; }
.search-icon { display: none; /* Hide for now as per sketch */ }
.quote-btn { background-color: var(--secondary-color); color: #fff; padding: 10px 25px; border-radius: 50px; font-weight: 700; transition: background-color 0.3s ease; white-space: nowrap; }
.quote-btn:hover { background-color: var(--hover-color); color: #fff; }
.hamburger-btn { display: none; }

/* --- Hero Section & Wave --- */
.hero-section { position: relative; height: 60vh; min-height: 450px; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; background-image: linear-gradient(var(--hero-overlay-color), var(--hero-overlay-color)), url('../images/hero-background.jpg'); background-size: cover; background-position: center; overflow: hidden; }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { color: #fff; font-size: 48px; font-weight: 900; text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }
.hero-section::before, .hero-section::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 120px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,60 C150,150 350,-20 500,60 C650,140 850,-20 1000,60 L1000,120 L0,120 Z'%3E%3C/path%3E%3C/svg%3E"); background-repeat: repeat-x; }
.hero-section::before { background-size: 2000px 120px; animation: wave-scroll-back 15s linear infinite; opacity: 0.5; z-index: 0; }
.hero-section::after { bottom: -5px; background-size: 2000px 120px; animation: wave-scroll-front 10s linear infinite; opacity: 1; z-index: 1; }
@keyframes wave-scroll-front { 0% { background-position-x: 0; } 100% { background-position-x: -2000px; } }
@keyframes wave-scroll-back { 0% { background-position-x: 0; } 100% { background-position-x: -2000px; } }

/* --- Main Content Section --- */
main { flex-grow: 1; position: relative; z-index: 2; background: #fff; }
.content-section { padding: 60px 0; }
.content-wrapper { display: flex; gap: 40px; }
.main-content { flex: 2; min-width: 0; /* Important fix for flexbox overflow */ }
.sidebar { flex: 1; }

/* === THE FIX FOR IMAGE OVERFLOW === */
.content-image {
    max-width: 100%; /* Ensures image never exceeds container width */
    height: auto;
    display: block; /* Removes any bottom spacing */
    border-radius: 5px;
    margin: 20px 0;
}
.content-image.fade-in-element { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.content-image.is-visible { opacity: 1; transform: translateY(0); }

/* --- Sidebar --- */
.sidebar .widget { background-color: var(--light-grey); border: 1px solid var(--border-color); padding: 25px; margin-bottom: 30px; }
.sidebar .widget h3 { border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-top: 0; }
.services-list { list-style: none; padding: 0; }
.services-list li a { display: block; padding: 10px 15px; border-bottom: 1px solid var(--border-color); color: var(--text-color); transition: all 0.3s ease; }
.services-list li:last-child a { border-bottom: none; }
.services-list li a:hover, .services-list li a.active { background-color: var(--hover-color); color: #fff; padding-left: 20px; }
.contact-form-widget {
    /* The background is now inherited from the main .widget class, so this rule can be removed or left commented out. */
    /* background-color: var(--primary-color); */
}
.contact-form-widget h3 {
    color: var(--primary-color); /* CHANGED from #fff */
    border-bottom-color: var(--primary-color); /* CHANGED from --accent-color for consistency */
}
.form-group label {
    display: block;
    color: var(--text-color); /* CHANGED from #fff to the standard text color */
    margin-bottom: 5px;
}

.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 3px; font-family: var(--font-family); }
.submit-btn { width: 100%; padding: 12px; background-color: var(--accent-color); color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 16px; font-weight: bold; transition: background-color 0.3s ease; }
.submit-btn:hover { background-color: #e6830d; }

/* --- Footer --- */
.site-footer { background-color: var(--primary-color); color: #fff; text-align: center; padding: 20px 0; position: sticky; bottom: 0; z-index: 1; }


/* --- RESPONSIVE STYLES (UPDATED FOR NEW NAV) --- */
/* ========================================= */
/* === RESPONSIVE DESIGN & MOBILE STYLES === */
/* ========================================= */


@media (max-width: 1024px) {
    .main-nav ul { gap: 20px; }
    .mega-menu-columns { width: 450px; }
}

@media (max-width: 992px) {
    .logo-text { font-size: 24px; }
    .main-nav { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background-color: #fff; box-shadow: -5px 0 15px rgba(0,0,0,0.1); padding: 80px 30px 30px; flex-direction: column; transition: right 0.4s ease-in-out; z-index: 1001; }
    .main-nav.is-open { right: 0; }
    .main-nav ul { flex-direction: column; gap: 15px; align-items: flex-start; }
    .main-nav ul li a { font-size: 18px; }
    .mega-menu { display: none !important; position: static; box-shadow: none; padding: 10px 0 0 15px; width: 100%; opacity: 1; transform: none; }
    .has-dropdown > a { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .has-dropdown.open .mega-menu { display: flex !important; flex-direction: column; }
    .has-dropdown.open .fa-chevron-down { transform: rotate(180deg); }
    .mega-menu-columns { flex-direction: column; width: 100%; }
    .header-right { display: none; }
    .hamburger-btn { display: block; background: none; border: none; color: var(--primary-color); font-size: 24px; cursor: pointer; z-index: 1002; }
    .content-wrapper { flex-direction: column; }
}



/* --- Mobile Phone --- */
@media (max-width: 768px) {
    .pre-header .container { justify-content: center; text-align: center; }
    .pre-header-right { margin-top: 10px; width: 100%; text-align: center; }
    .pre-header-right a { margin: 0 10px; }

    .hero-section { height: 50vh; min-height: 350px; }
    .hero-content h1 { font-size: 36px; }
    .hero-content .breadcrumbs { font-size: 14px; }
}