/* =======================================
   Variables & Theme Tokens
   ======================================= */
:root {
    /* Color Palette (Custom Theme - Gleeson Homes Inspired) */
    --primary-color: #003B30;     /* Deep Forest Green */
    --primary-light: #008862;     /* Vibrant Green */
    --bg-color: #fdfaf0;          /* Cream App BG */
    --surface-color: #fdfaf0;     /* Pure Cream */
    --surface-dark: #f2fcf8;      /* Extremely Light Green for alternating sections */
    --accent-color: #008862;      /* Vibrant Green */
    --accent-hover: #49A942;      /* Success Green for hover */
    --text-main: #5b6770;         /* Grayish Blue text */
    --text-muted: #7a8a94;
    --text-light: #fdfaf0;
    
    /* Typography */
    --font-family: 'Montserrat', sans-serif;
    
    /* Transitions & Shadows */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
}

/* =======================================
   Reset & Base Styles
   ======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 5rem 0;
}

.text-center, .text-center p {
    text-align: center;
}

.text-accent {
    color: var(--accent-color);
}

/* =======================================
   Typography & Utilities
   ======================================= */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-color);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-align: justify; /* Keeps description paragraphs straight on both edges */
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent-color);
    margin: 0 auto 1.5rem auto;
    border-radius: 2px;
}

.divider.left {
    margin: 0 0 1.5rem 0;
}

/* =======================================
   Buttons
   ======================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fdfaf0;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px) scale(1.025);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--surface-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: var(--accent-color);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: #fdfaf0;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* =======================================
   Navigation
   ======================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background-color: var(--primary-color);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.0rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.logo-img {
    height: 2.5rem;
    width: auto;
    border-radius: 6px;
    background-color: #fdfaf0; /* Ensures visibility on dark headers */
    padding: 4px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-dot {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links .btn-outline {
    color: var(--text-light);
}

.nav-links .btn-outline:hover {
    color: #fdfaf0;
}

.mobile-menu-btn {
    display: none;
    color: #fdfaf0;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background-color: var(--primary-color);
    z-index: 999;
    padding-top: 80px;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.mobile-nav.open,
.menu-toggle-checkbox:checked ~ .mobile-nav {
    right: 0;
}

.mobile-link {
    display: block;
    padding: 1rem 2rem;
    color: #fdfaf0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* =======================================
   Hero Section
   ======================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    background: url('hero.png') center/cover no-repeat; /* Fallback */
    background-color: var(--primary-color); /* Fallback */
    color: #fdfaf0;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* Neutral shadow to keep text readable without coloring the image */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    color: #fdfaf0;
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    opacity: 0.9;
    margin: 0 auto 2.5rem auto;
    max-width: 600px;
    text-align: center;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* =======================================
   About Us Section
   ======================================= */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item h4 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.stat-item span {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* =======================================
   Trust Banner
   ======================================= */
.trust-banner {
    background-color: var(--primary-color);
    color: #fdfaf0;
    padding: 1.5rem 0;
    border-top: 3px solid var(--accent-color);
    font-size: 0.95rem;
}

.trust-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: center;
}

/* =======================================
   Testimonials Section
   ======================================= */
.testimonials {
    background-color: var(--surface-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #fdfaf0;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.stars {
    color: #FFD700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.quote {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =======================================
   Services Section
   ======================================= */
.section-header {
    margin-bottom: 4rem;
}

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

.service-card {
    background-color: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid transparent;
    cursor: pointer;
    height: 100%;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--accent-color);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card:hover .service-icon {
    color: var(--accent-color);
}

/* =======================================
   Careers Section
   ======================================= */
.careers {
    background-color: var(--surface-color);
}

.careers-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 3rem;
    background: var(--surface-dark);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--accent-color);
}

.careers-box p {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.8;
}

.careers-cta {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* =======================================
   Why Us Section
   ======================================= */
.why-us {
    background-color: var(--surface-dark);
}

.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-list {
    margin-top: 1.5rem;
}

.why-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.metric-card {
    background-color: var(--primary-color);
    color: #fdfaf0;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.metric-card:hover {
    transform: scale(1.05);
}

.metric-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =======================================
   Compliance Section
   ======================================= */
.compliance {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fdfaf0;
}

.compliance h2 {
    color: #fdfaf0;
}

.compliance-box {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 4rem 3rem;
    border-radius: 16px;
}

.compliance-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.compliance p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =======================================
   Gallery Section
   ======================================= */
.gallery {
    background-color: var(--surface-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 350px;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 59, 48, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay h3 {
    color: #fdfaf0;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0;
    text-align: left;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* =======================================
   Contact Section
   ======================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background-color: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-info {
    padding: 3rem;
    background-color: var(--primary-color);
    color: #fdfaf0;
}

.contact-info h2 {
    color: #fdfaf0;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.method i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

.method h4 {
    color: #fdfaf0;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.method a, .method span {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
}

.method a:hover {
    color: var(--accent-color);
}

.phone-link {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: #fdfaf0 !important;
}

.contact-form-container {
    padding: 3rem;
}

.contact-form h3 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: transparent;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: transparent;
}

/* =======================================
   Footer
   ======================================= */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.logo-img-footer {
    height: 2.5rem;
    width: auto;
    border-radius: 4px;
    background-color: #fdfaf0;
    padding: 4px;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
}

.footer-links a:hover {
    color: #fdfaf0;
}

/* =======================================
   Animations
   ======================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =======================================
   Responsive Media Queries
   ======================================= */
@media (max-width: 992px) {
    .why-us-content, .contact-wrapper, .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .section {
        padding: 3.5rem 0;
    }

    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo {
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn span {
        font-size: 1.6rem !important;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.1;
        word-break: break-word;
    }
    
    .hero-subtitle {
        padding: 0 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .contact-wrapper {
        gap: 0;
        border-radius: 0; /* Full width on mobile looks cleaner */
    }
    
    .contact-info, .contact-form-container {
        padding: 2.5rem 1.25rem;
    }
    
    .careers-box, .compliance-box {
        padding: 2.5rem 1.25rem;
        margin: 0 5px;
        border-radius: 12px;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    p {
        text-align: left;
    }

    .about-image img {
        max-width: 100%;
        height: auto;
    }

    .stat-item h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .badges {
        flex-direction: column;
        gap: 0.75rem;
    }

    .badge {
        width: 100%;
        text-align: center;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 2rem;
    }

    .compliance-icon {
        font-size: 3rem;
    }
}

@media (max-width: 360px) {
    .logo-text {
        display: none; /* Hide text on extremely small screens if it still overflows */
    }
}
