:root {
    --primary-blue: #003D72;
    --accent-orange: #FF6600;
    --text-dark: #333333;
    --white: #ffffff;
    --light-bg: #f4f7f9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'Roboto', sans-serif; color: var(--text-dark); line-height: 1.6; font-size: 18px; overflow-x: hidden; }

.container { width: 90%; max-width: 1200px; margin: auto; }

/* Nav Styles */
.main-nav { padding: 15px 0; background: var(--white); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { height: 75px; z-index: 1001; }
.nav-links { list-style: none; display: flex; gap: 25px; }
.nav-links a { text-decoration: none; color: var(--primary-blue); font-weight: bold; font-size: 1.1rem; position: relative; padding-bottom: 5px; }
.nav-links a::after { content: ""; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--accent-orange); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }

/* Hamburger Icon Styling */
.menu-toggle { display: none; cursor: pointer; z-index: 1001; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background: var(--primary-blue); }

/* Hero */
.hero { position: relative; height: 750px; display: flex; align-items: center; justify-content: center; color: var(--white); text-align: center; }
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.slide { position: absolute; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; animation: fadeSlide 15s infinite; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); }
.hero-content h1 { font-size: 4rem; margin-bottom: 15px; position: relative; z-index: 2; }
.hero-content p { font-size: 1.5rem; position: relative; z-index: 2; }

/* Action Bar */
.action-bar { background: var(--primary-blue); color: var(--white); padding: 40px 0; }
.bar-flex { display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 1.3rem; }
.btn-phone { background: var(--accent-orange); color: var(--white); padding: 12px 24px; text-decoration: none; border-radius: 5px; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.white-icon { filter: brightness(0) invert(1); }

/* Service Shortcut Grid */
.service-shortcuts { padding: 80px 0 20px 0; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; text-align: center; }
.shortcut-card { padding: 40px 20px; transition: transform 0.3s ease; }
.shortcut-card:hover { transform: translateY(-10px); }
.icon-circle { width: 80px; height: 80px; background: var(--light-bg); color: var(--primary-blue); font-size: 2.5rem; line-height: 80px; margin: 0 auto 20px; border-radius: 50%; border: 2px solid #eee; }
.shortcut-card h3 { color: var(--primary-blue); margin-bottom: 15px; font-size: 1.6rem; text-transform: uppercase; }
.link-text { color: var(--accent-orange); text-decoration: none; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; }

/* Intro Section */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 80px 0; align-items: center; }
.text-col h2 { font-size: 2.5rem; color: var(--primary-blue); margin-bottom: 20px; }
.check-list { margin: 20px 0; list-style: none; }
.check-list li::before { content: "✔"; color: var(--accent-orange); margin-right: 10px; font-weight: bold; }
.home-featured-img { width: 100%; border: 8px solid var(--white); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.btn-more, .btn-cta { display: inline-block; background: var(--accent-orange); color: var(--white); padding: 12px 30px; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; }
.btn-more { background: var(--primary-blue); margin-top: 20px; }

/* Footer */
.main-footer { background: var(--primary-blue); color: var(--white); padding: 100px 0 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 50px; padding-bottom: 80px; }
.footer-column h3 { color: var(--accent-orange); margin-bottom: 25px; font-size: 1.5rem; text-transform: uppercase; }
.footer-column p { margin-bottom: 12px; color: #e0e0e0; }
.footer-column a { color: var(--white); text-decoration: none; }
.map-container { border: 4px solid rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden; }
hr { border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 20px 0; }
.copyright-bar { background: rgba(0,0,0,0.2); padding: 30px 0; text-align: center; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.copyright-bar a { color: var(--white); font-weight: bold; }

/* Sticky Mobile Bar */
.mobile-sticky-bar { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--accent-orange); padding: 15px; text-align: center; z-index: 2000; box-shadow: 0 -5px 15px rgba(0,0,0,0.2); }
.btn-sticky-call { color: var(--white); text-decoration: none; font-weight: bold; font-size: 1.2rem; display: block; }

/* Animation */
@keyframes fadeSlide { 0% { opacity: 0; } 10% { opacity: 1; } 33% { opacity: 1; } 43% { opacity: 0; } 100% { opacity: 0; } }

/* Mobile View Adjustments (Hamburger Logic) */
@media (max-width: 968px) {
    .menu-toggle { display: block; }
    .nav-links { position: absolute; top: 105px; left: -100%; flex-direction: column; background: var(--white); width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 10px rgba(0,0,0,0.1); }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 20px 0; }
    .nav-cta { display: none; } /* Hides top CTA button on small screens */

    /* Animation for the Hamburger bars */
    #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .bar-flex { flex-direction: column; gap: 20px; text-align: center; }
    .mobile-sticky-bar { display: block; }
    body { padding-bottom: 60px; }
}

/* Update this in your style.css */
.sub-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    background-size: cover;      /* Keeps it crisp */
    background-position: center; /* Keeps the center of the photo visible */
}

/* Gallery Styling */
.gallery-section { padding: 80px 0; }
.gallery-intro { text-align: center; margin-bottom: 50px; }
.gallery-intro h2 { color: var(--primary-blue); font-size: 2.5rem; margin-bottom: 15px; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 4px solid var(--white);
    transition: transform 0.3s;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps images from stretching */
    transition: 0.5s;
}

.project-card:hover { transform: scale(1.02); z-index: 10; }
.project-card:hover img { transform: scale(1.1); }

@media (max-width: 768px) {
    .sub-hero { height: 250px; }
    .sub-hero h1 { font-size: 2.2rem; }
}

.gallery-copy {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    font-style: italic;
}

/* Sub-Page Slim Hero */
.sub-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    background-image: url('images/slide1.jpg'); /* You can swap this for a jobsite photo */
    background-size: cover;
    background-position: center;
}

.sub-hero .hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.sub-hero .hero-content { position: relative; z-index: 2; }
.sub-hero h1 { font-size: 3.5rem; text-transform: uppercase; margin-bottom: 10px; }

/* Gallery Layout */
.gallery-section { padding: 80px 0; }
.gallery-intro { text-align: center; margin-bottom: 60px; }
.gallery-intro h2 { color: var(--primary-blue); font-size: 2.5rem; margin-bottom: 20px; }
.gallery-copy { max-width: 900px; margin: 0 auto; font-size: 1.2rem; color: #555; line-height: 1.8; font-style: italic; }

.gallery-subtitle {
    color: var(--primary-blue);
    margin: 60px 0 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid var(--accent-orange);
    text-transform: uppercase;
    font-size: 1.8rem;
    font-weight: 700;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.project-card:hover img { transform: scale(1.1); }

/* Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border: 5px solid white;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.close-lightbox {
    position: absolute;
    top: 30px; right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .sub-hero { height: 300px; }
    .sub-hero h1 { font-size: 2.5rem; }
    .gallery-subtitle { font-size: 1.4rem; }
}

/* Fix #1: Widening the paragraph to match grid width */
.gallery-copy {
    max-width: 100%; /* Removes the 800px-900px restriction */
    text-align: center;
    margin: 0 auto 60px;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    font-style: normal;
}

/* Fix #2: Lightbox Arrows and Layout */
.lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lightbox-arrow {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    position: absolute;
    z-index: 10001;
    border-radius: 5px;
}

.lightbox-arrow:hover { background: var(--accent-orange); }

.left-arrow { left: 20px; }
.right-arrow { right: 20px; }

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10002;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Mobile adjustments for arrows */
@media (max-width: 768px) {
    .lightbox-arrow { font-size: 2rem; padding: 10px; }
    .left-arrow { left: 5px; }
    .right-arrow { right: 5px; }
}

.home-services { padding: 80px 0; background: #f9f9f9; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { color: var(--primary-blue); font-size: 2.5rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-blue);
}

.service-item h4 { margin-bottom: 15px; color: var(--primary-blue); font-size: 1.3rem; }

/* Services Page Layout */
.services-intro { text-align: center; margin-bottom: 50px; padding-top: 60px; }
.services-intro h2 { font-size: 2.5rem; color: var(--primary-blue); margin-bottom: 15px; }
.services-intro p { max-width: 900px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8; color: #555; }

.service-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.service-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.service-box:hover { transform: translateY(-5px); }

.box-header {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    text-align: center;
}

.box-header h3 { margin: 0; font-size: 1.4rem; }

.equipment-list {
    list-style: none;
    padding: 30px;
}

.equipment-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #444;
    position: relative;
    padding-left: 25px;
}

.equipment-list li::before {
    content: "➔";
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}

.equipment-list li:last-child { border-bottom: none; }

/* =========================================
   5. SERVICES PAGE
   ========================================= */

.services-intro { 
    text-align: center; 
    margin-bottom: 15px;     /* Tightened from 30px to 15px */
    padding-top: 60px; 
}

.services-intro h2 { 
    font-size: 2.8rem; 
    color: var(--primary-blue); 
    margin-bottom: 25px; 
}

.services-intro p { 
    width: 100%;             
    max-width: 1180px;       
    margin: 0 auto 15px;     
    font-size: 1.2rem; 
    line-height: 1.8; 
    color: #444; 
}

/* Ensure the grid doesn't add its own extra top spacing */
.service-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 0;           /* Ensures no extra gap above the boxes */
    margin-bottom: 80px;
}

/* =========================================
   8. BRAND CAROUSEL (Global Component)
   ========================================= */

.brand-carousel-section {
    padding: 80px 0;
    overflow: hidden; 
    background: #fff;
    /* --- Removed border-top and border-bottom lines here for a cleaner look --- */
}

.carousel-wrapper {
    width: 100%;
    position: relative;
}

.carousel-track {
    display: flex;
    width: calc(250px * 28); 
    animation: scroll 40s linear infinite; /* Smooth, linear slow crawl */
}

.logo-slide {
    width: 250px; 
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

.logo-slide img {
    max-width: 100%;
    max-height: 80px;
    transition: transform 0.3s ease; /* Subtle interaction on hover keeps it feeling dynamic */
}

/* Optional: Gentle lift effect on hover */
.logo-slide img:hover {
    transform: scale(1.05); /* Very slight zoom on hover */
}

/* The Animation Loop */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 14)); } 
}

/* =========================================
   9. FAQ (Global Component)
   ========================================= */

   /* FAQ Specific Styles */
.faq-accordion-wrapper {
    max-width: 800px;
    margin: 0 auto 50px;
}

.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: #003366; /* Matching your blue */
    padding: 15px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.faq-answer {
    display: none;
    padding-bottom: 20px;
    line-height: 1.6;
    color: #444;
}

.toggle-icon {
    color: #ff6600; /* Matching your orange */
}

/* =========================================
   10. CONTACT PAGE (Badge Integration)
   ========================================= */
.contact-section { 
    padding: 60px 0 100px; /* Increased bottom padding */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr; /* Shifting more width to the form */
    gap: 60px;
    align-items: center; /* V-aligns badge column with form */
}

/* --- Left Column Refinements --- */
.contact-brand-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* H-aligns content in column */
    text-align: center;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle depth */
}

.contact-badge-img {
    max-width: 150px; /* Adjust based on asset size */
    margin-bottom: 25px;
}

.brand-title {
    font-size: 1.8rem;
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: 20px;
}

.contact-divider {
    width: 60%;
    border: 0;
    border-top: 2px solid var(--accent-orange);
    margin: 25px 0;
}

.info-item { 
    margin-bottom: 12px; 
    font-size: 1.1rem; 
}

.info-item strong { color: var(--primary-blue); }

/* --- Right Column (Form) --- */
.contact-form-wrapper h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.btn-submit {
    background: var(--accent-orange);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    width: 100%; /* Makes the button full width for impact */
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.btn-submit:hover { background: #e65c00; } /* Darker orange */

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-brand-column { padding: 30px; }
}


/* ============================================================
   NORTHERNLOGICS: SERVICES PAGE ADDITIONS 
   (Service Areas List & Brand Carousel)
   ============================================================ */

/* 1. SERVICE AREAS LAYOUT - REFINED */
.service-areas {
    padding: 80px 0;
    background-color: #ffffff;
}

.areas-intro {
    text-align: center;
    margin-bottom: 50px;
}

.areas-intro h2 {
    color: #003366; 
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 40px; /* Vertical gap, Horizontal gap */
    max-width: 1100px;
    margin: 0 auto;
}

/* Align the County Headers */
.area-col h3 {
    font-size: 1.1rem;
    color: #ff6600; 
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    min-height: 1.5em;
    white-space: nowrap; /* Prevents title from wrapping */
}

/* Remove the border-bottom for the "empty" titles to keep it clean */
.area-col h3:empty, 
.area-col h3:contains('&nbsp;') {
    border-bottom: none;
}

.area-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area-col li {
    padding: 6px 0;
    font-size: 0.95rem; /* Slightly smaller to ensure fit */
    color: #444;
    display: flex;
    align-items: center;
}

/* Using the icon as a direct element for better alignment */
.area-col li::before {
    content: "📍";
    margin-right: 10px;
    font-size: 0.85rem;
}

/* 2. LOGO CAROUSEL ANIMATION */
.logo-carousel-container {
    padding: 60px 0;
    background-color: #f4f7f9;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #e1e8ed;
}

.carousel-track {
    display: flex;
    width: calc(250px * 20); 
    animation: scroll 40s linear infinite;
}

.logo-slide {
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
}

.logo-slide img {
    max-width: 160px;
    height: auto;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 10)); }
}

/* 3. RESPONSIVE CONTROLS */
@media (max-width: 992px) {
    .areas-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (max-width: 600px) {
    .areas-grid { grid-template-columns: 1fr; text-align: center; }
    .area-col li { padding-left: 0; }
    .area-col li::before { display: none; }
    
    /* Speed up carousel slightly on mobile for better UX */
    .carousel-track { animation: scroll 25s linear infinite; }
}

/* ============================================================
   END OF SERVICES ADDITIONS
   ============================================================ */


   /* --- Refined Service Areas List --- */
.service-areas {
    padding: 80px 0;
    border-top: 1px solid #eee;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.area-col h3 {
    font-size: 1.1rem;
    color: #ff6600; /* Accent Orange */
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    min-height: 1.5em;
}

.area-col ul {
    list-style: none;
    padding: 0;
}

.area-col li {
    padding: 5px 0;
    font-size: 1rem;
    color: #444;
    display: flex;
    align-items: center;
}

.area-col li::before {
    content: "📍";
    margin-right: 10px;
    font-size: 0.85rem;
}

/* Hide the placeholder headers on mobile so it doesn't look like awkward gaps */
@media (max-width: 900px) {
    .areas-grid { grid-template-columns: repeat(2, 1fr); }
    .hide-mobile { display: none; }
}

@media (max-width: 500px) {
    .areas-grid { grid-template-columns: 1fr; }
}