/* ============================================
   CFM Mechanical Contractors - Main Stylesheet
   Based on B&I Florida design language
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: #fff;
    background-color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.nav-logo-img {
    height: 50px;
    width: auto;
    filter: invert(1);
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #d4a843;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    color: #fff;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #d4a843;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover {
    color: #d4a843;
}

.nav-social {
    display: flex;
    gap: 12px;
}

.nav-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d4a843;
    border-radius: 4px;
    color: #1a1a1a;
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-social a:hover {
    transform: scale(1.1);
    background: #e6bc5a;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect fill="%23333" width="1920" height="1080"/><rect fill="%23444" x="100" y="200" width="300" height="600" rx="10"/><rect fill="%23555" x="150" y="300" width="40" height="400" rx="5"/><rect fill="%23666" x="250" y="250" width="80" height="500" rx="5"/><circle fill="%23c44" cx="270" cy="350" r="30"/><rect fill="%23888" x="500" y="100" width="800" height="40" rx="5"/><rect fill="%23777" x="600" y="150" width="600" height="30" rx="5"/><rect fill="%23999" x="700" y="400" width="200" height="300" rx="10"/><rect fill="%23aaa" x="1000" y="300" width="400" height="500" rx="10"/></svg>');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(26, 26, 26, 1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Vision Statement Section
   ============================================ */
.vision-section {
    position: relative;
    padding: 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(40,40,40,0.7) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect fill="%23555" width="1920" height="1080"/><circle fill="%23666" cx="400" cy="400" r="200"/><rect fill="%23777" x="800" y="200" width="600" height="600" rx="20"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.vision-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: #2a2a2a;
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-label {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: #999;
    margin-bottom: 16px;
}

.about-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
}

.about-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #bbb;
    max-width: 520px;
}

.map-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.map-container iframe {
    display: block;
    width: 100%;
    min-height: 450px;
}

.map-overlay-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.8);
    color: #d4a843;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212,168,67,0.3);
}

.map-pin {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #d4a843;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(212,168,67,0.6);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
    background: #1a1a1a;
    padding: 100px 0;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #444, transparent);
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    text-align: center;
    flex-wrap: wrap;
}

.stat-item {
    padding: 40px 20px;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    display: inline;
    transition: color 0.5s ease;
}

.stat-item.visible .stat-number {
    color: #fff;
}

.stat-plus {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.5s ease;
}

.stat-item.visible .stat-plus {
    color: #d4a843;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    margin-top: 12px;
}

/* ============================================
   Services Section
   ============================================ */
.services-section {
    background: #222;
    padding: 120px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service-card {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-image {
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gradient placeholders for cards without photos */
.service-img-3 {
    background: none;
}

.service-img-4 {
    height: 250px;
    background: linear-gradient(135deg, #5a3a6a, #3a2a4a);
}

/* SVG overlay only for placeholder card */
.service-img-3::after {
    display: none;
}

.service-img-4::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

.service-img-4::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="none" stroke="white" stroke-width="2" cx="100" cy="100" r="60"/><circle fill="none" stroke="white" stroke-width="1" cx="100" cy="100" r="30"/><path fill="none" stroke="white" stroke-width="2" d="M100,40 L100,20 M100,160 L100,180 M40,100 L20,100 M160,100 L180,100"/><circle fill="white" cx="100" cy="100" r="5"/></svg>');
}

.service-content {
    padding: 30px;
}

.service-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-divider {
    width: 50px;
    height: 3px;
    background: #d4a843;
    margin-bottom: 16px;
}

.service-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #aaa;
    margin-bottom: 20px;
}

.service-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d4a843;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 14px;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-section {
    background: #1a1a1a;
    padding: 120px 0;
}

.section-label {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: #999;
    margin-bottom: 8px;
}

.section-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 50px;
}

.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
    background: #333;
    cursor: pointer;
    transition: transform 0.4s ease;
}

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

.project-large {
    grid-row: span 2;
    height: 100%;
}

/* Project card background images */
.project-card:nth-child(1) { background: url('../images/spacebox storage apollo beach.jpg') center/cover no-repeat; }
.project-card:nth-child(2) { background: url('../images/New-HE_Beaumont_Facility_Photo.jpg') center/cover no-repeat; }
.project-card:nth-child(3) { background: url('../images/baresco.jpg') center/cover no-repeat; }
.project-card:nth-child(4) { background: url('../images/Radnet Tradition.jpg') center/cover no-repeat; }
.project-card:nth-child(5) { background: url('../images/SWA-waste-to-energy_intro.jpg') center/cover no-repeat; }

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: background 0.3s ease;
}

.project-card:hover .project-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%);
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d4a843;
    margin-bottom: 8px;
}

.project-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.project-location {
    font-size: 0.85rem;
    color: #aaa;
}

.projects-cta {
    text-align: center;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 36px;
    border: 2px solid #d4a843;
    color: #fff;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background: #d4a843;
    color: #1a1a1a;
}

.cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #d4a843;
    color: #1a1a1a;
    border-radius: 50%;
    font-size: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
    background: #1a1a1a;
    color: #d4a843;
}

/* ============================================
   Careers Section
   ============================================ */
.careers-section {
    background: #f5f5f5;
    padding: 120px 0;
    color: #1a1a1a;
}

.careers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.careers-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: #888;
    margin-bottom: 16px;
}

.careers-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.careers-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 36px;
}

.careers-section .cta-button {
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.careers-section .cta-button:hover {
    background: #1a1a1a;
    color: #fff;
}

.careers-section .cta-button .cta-arrow {
    background: #1a1a1a;
    color: #fff;
}

.careers-section .cta-button:hover .cta-arrow {
    background: #d4a843;
    color: #1a1a1a;
}

.careers-image {
    height: 500px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.careers-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* ============================================
   Testimonial Section
   ============================================ */
.testimonial-section {
    background: #f0f0f0;
    padding: 100px 0;
    color: #1a1a1a;
}

.testimonial-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 40px;
}

.testimonial-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 2px solid #d4a843;
    border-radius: 50%;
    opacity: 0.3;
}

.testimonial-quote {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    color: #333;
}

.testimonial-author {
    margin-top: 24px;
    font-size: 0.9rem;
    color: #888;
    position: relative;
    z-index: 1;
}

/* ============================================
   Contact CTA Section
   ============================================ */
.contact-cta-section {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 50%, #3a3a3a 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.contact-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(212, 168, 67, 0.1) 100%);
}

.contact-cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.contact-cta-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.contact-cta-content p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 36px;
    line-height: 1.7;
}

.cta-button-light {
    border-color: #d4a843;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #fff;
    color: #333;
    padding: 80px 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo-img {
    height: 70px;
    width: auto;
}

.logo-text-footer {
    color: #d4a843;
}

.footer-tagline {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 50%;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    background: #d4a843;
    transform: scale(1.1);
}

.footer-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 30px 0;
}

.footer-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 24px;
    color: #333;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.location-address {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

.location-phone {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-license {
    font-size: 0.8rem;
    color: #999;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #999;
}

/* ============================================
   Scroll Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .about-grid,
    .careers-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .stats-grid {
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-large {
        grid-row: span 1;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: #222;
        flex-direction: column;
        padding: 100px 40px 40px;
        transition: right 0.4s ease;
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        padding: 16px 0;
        font-size: 1rem;
        border-bottom: 1px solid #333;
    }

    .nav-social {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        padding: 0 20px;
    }

    .stats-grid {
        gap: 30px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .locations-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .about-section,
    .services-section,
    .projects-section,
    .careers-section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}
