/**
 * Updated Main Stylesheet for Two Time Heating and Cooling LLC
 * Version: 2.0.0
 */

/* ======= VARIABLES ======= */
:root {
    /* Primary Colors - Updated based on logo */
    --primary-dark: #1A2A3A; /* Dark navy/blue for backgrounds */
    --primary: #149A9E; /* Teal green from logo */
    --primary-light: #32B8BD; /* Lighter teal */
    
    /* Secondary Colors */
    --secondary: #CD2C47; /* Red from logo for heating elements */
    --secondary-light: #F8E8E9; /* Light red */
    
    /* Neutral Colors */
    --dark: #1E293B; /* Dark text */
    --gray: #64748B; /* Gray text */
    --light-gray: #F1F0E8; /* Light cream/gray backgrounds - matches logo backdrop */
    --white: #FFFFFF; /* White */
    
    /* Utility Colors */
    --success: #10B981; /* Green for success */
    --warning: #F59E0B; /* Amber for warnings */
    --error: #EF4444; /* Red for errors */
    
    /* Font Families */
    --heading-font: 'Oswald', 'Montserrat', sans-serif; /* More aligned with logo style */
    --body-font: 'Open Sans', sans-serif;
}

/* ======= BASE STYLES ======= */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header */
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 0.025em; /* Slightly expanded letter spacing for headers */
    text-transform: uppercase; /* More aligned with the logo typography */
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    position: relative;
    margin-bottom: 2rem;
}

h2:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.75rem;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    border-radius: 2px;
}

.text-center h2:after {
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* ======= BUTTONS ======= */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--heading-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 154, 158, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #b52239; /* Darker red */
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(205, 44, 71, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ======= HEADER & NAVIGATION ======= */
.nav-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: relative;
    min-height: 80px; /* Ensure consistent header height */
}

/* Improved logo container */
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
    flex-shrink: 0; /* Prevent logo from shrinking */
    max-width: 80%; /* Prevent logo from taking too much space */
    text-decoration: none;
}

/* Responsive logo image */
.logo-image {
    height: 100px;
    width: auto;
    max-width: 600px;
    margin-right: 0.5rem;
    object-fit: contain; /* Maintain aspect ratio */
    flex-shrink: 0;
}

.logo span {
    color: var(--secondary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-right: 1.5rem;
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    color: var(--dark);
    font-weight: 600;
    position: relative;
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

nav ul li a:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    transition: width 0.3s ease;
}

nav ul li a.active {
    color: var(--primary); /* Change text color for active link */
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.header-cta {
    margin-left: 1.5rem;
}

/* ======= HERO SECTION ======= */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(to right, rgba(26, 42, 58, 0.9), rgba(26, 42, 58, 0.8)), url('../img/hero/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 700px;
    height: 500px;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--secondary);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-cta .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.hero-image {
    position: absolute;
    right: 5%;
    bottom: 2%;
    max-width: 40%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero-badges {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.hero-badge {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.hero-badge i {
    margin-right: 0.5rem;
    color: var(--secondary);
}

/* ======= ABOUT SECTION ======= */
.about {
    background-color: var(--light-gray);
}

.about-image {
    flex: 1;
    margin-right: 3rem;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.about-image img {
    border-radius: 10px;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-content {
    flex: 1;
}

.about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.about-badge {
    background-color: var(--secondary-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
}

.about-badge i {
    margin-right: 0.5rem;
}

/* ======= SERVICES SECTION ======= */
.services {
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 15px 15px 0 0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--white) 0%, #f8fffe 100%);
}

.service-content {
    display: flex;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-content p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.6;
    flex-grow: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    font-size: 2rem;
    border-radius: 20px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(20, 154, 158, 0.3);
    transition: all 0.3s ease;
}

/* Heating service icon */
.service-card:nth-child(1) .service-icon {
    background: linear-gradient(135deg, var(--secondary), #e63946);
    box-shadow: 0 4px 15px rgba(205, 44, 71, 0.3);
}

/* Cooling service icon */
.service-card:nth-child(2) .service-icon {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    box-shadow: 0 4px 15px rgba(20, 154, 158, 0.3);
}

/* Air quality service icon */
.service-card:nth-child(3) .service-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(20, 154, 158, 0.4);
}

.service-content p {
    flex-grow: 1;
}

.service-card .btn {
    margin-top: auto;
    align-self: center;
    min-width: 140px;
}

.service-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 154, 158, 0.3);
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 0;
    color: var(--primary-dark);
    text-align: center;
}

.service-features {
    margin-top: 0;
    margin-bottom: 2rem;
    padding-left: 2rem;
    list-style: none;
    text-align: left;
}

.service-features li {
    margin-bottom: 0.5rem;
    position: relative;
}

/* .service-features li:before {
    content: '✓';
    position: absolute;
    left: -1.5rem;
    color: var(--success);
    font-weight: bold;
} */

/* ======= PROJECTS GALLERY ======= */
.projects {
    background-color: var(--light-gray);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-filter {
    padding: 0.5rem 1rem;
    background-color: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.project-filter.active,
.project-filter:hover {
    background-color: var(--primary);
    color: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 250px;
    cursor: pointer;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-title {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.project-category {
    font-size: 0.9rem;
    color: var(--secondary-light);
    margin-bottom: 1rem;
}

.project-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary);
    color: var(--white);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: fit-content;
    font-family: var(--heading-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-btn:hover {
    background-color: #b52239;
    color: var(--white);
}

/* ======= TESTIMONIALS SECTION ======= */
.testimonials {
    background-color: var(--primary-dark);
    color: var(--white);
    overflow: hidden;
}

.testimonials h2:after {
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

.testimonials-wrapper {
    position: relative;
    padding: 3rem 0;
}

.testimonial-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    margin: 1rem;
    color: var(--dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: none; /* Initially hidden, controlled by JS */
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-content:before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -2rem;
    left: -1rem;
    color: var(--light-gray);
    opacity: 0.5;
    font-family: serif;
}

.testimonial-rating {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.testimonial-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-control:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

/* ======= CTA SECTION ======= */
.cta {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta h2 {
    margin-bottom: 1.5rem;
}

.cta h2:after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
}

.cta p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.cta-inner {
    background-color: var(--white);
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.cta-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: -2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cta-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
}

.cta-step:not(:last-child):after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 20px;
    color: var(--gray);
    font-size: 1.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: a.2rem;
    margin: 0 auto 1rem;
}

.step-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

/* ======= CONTACT FORM ======= */
.contact {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 2px solid var(--secondary);
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.contact-details p {
    margin-bottom: 0;
    color: var(--gray);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    min-width: unset;
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: var(--body-font);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 154, 158, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Success message after form submission */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

/* ======= FOOTER ======= */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-logo-section {
    text-align: center;
    margin-bottom: 0rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    justify-content: center;
    transition: all 0.3s ease;
    font-family: var(--heading-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
}

.footer-logo img {
    height: 50px;
    margin-right: 1rem;
    transition: all 0.3s ease;
    object-fit: contain;
}

.footer-logo span {
    color: var(--secondary);
    transition: all 0.3s ease;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    font-family: var(--heading-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-heading:after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.footer-contact li {
    display: flex;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
    justify-content: center;
    flex-shrink: 0;
}

.footer-contact i {
    margin-right: 1rem;
    color: var(--secondary);
    flex-shrink: 0;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ======= ANIMATIONS ======= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-delay-1 {
    animation: fadeIn 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

/* Add active class for fade elements when in viewport */
.fade-in.active,
.fade-in-delay-1.active,
.fade-in-delay-2.active,
.fade-in-delay-3.active {
    opacity: 1;
    transform: translateY(0);
}

/* ======= PAGE HEADER ======= */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(to right, rgba(26, 42, 58, 0.9), rgba(26, 42, 58, 0.8)), url('../img/hero/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.breadcrumbs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumbs a:hover {
    color: var(--white);
}

.breadcrumbs i {
    font-size: 0.7rem;
}

/* Logo-specific styling for circular emblem */
.circular-emblem {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Enhanced styling for value cards to match certifications aesthetic */
.value-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Gradient top border using pseudo-element for better browser support */
.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

/* Logo-inspired accent elements */
.logo-accent {
    position: relative;
}

.logo-accent:before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(var(--secondary) 0deg 180deg, var(--primary) 180deg 360deg);
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
    opacity: 0.2;
}

/* Service section enhancements */
.service-section {
    position: relative;
}

.service-section:nth-child(odd):before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: var(--secondary);
    opacity: 0.5;
}

.service-section:nth-child(even):before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: var(--primary);
    opacity: 0.5;
}

/* Enhanced hover states to match logo vibrance */
.enhanced-hover {
    transition: all 0.3s ease;
}

.enhanced-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Custom badges inspired by logo */
.split-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border-radius: 50px;
}

.split-badge:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--secondary);
    opacity: 0.1;
    z-index: -1;
}

.split-badge:after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.1;
    z-index: -1;
}

/* ======= CERTIFICATIONS SECTION STYLES ======= */

/* Main certifications section container */
.certifications {
    background-color: var(--light-gray);
    padding: 5rem 0;
}

/* Certifications section intro text */
.certifications .text-center {
    margin-bottom: 3rem;
}

.certifications .text-center h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.certifications .text-center p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Grid layout for certification cards */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin-top: 3rem;
}

/* Individual certification card */
.certification-card {
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 300px;
    height: 375px;
}

/* Hover effects for certification cards */
.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Subtle background accent for cards */
.certification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

/* Certification logo/icon styling */
.certification-logo {
    height: 80px;
    width: auto;
    margin: 1rem auto 1.5rem;
    display: block;
    transition: transform 0.3s ease;
}

/* Logo hover effect */
.certification-card:hover .certification-logo {
    transform: scale(1.05);
}

/* Specific scaling for different logos */
.certification-logo.nate-logo {
    transform: scale(1.7);
}

.certification-logo.epa-logo {
    transform: scale(1.7);
}

.certification-logo.energy-star-logo {
    transform: scale(1.6);
}

.certification-logo.bbb-logo {
    transform: scale(1.6);
}

/* Hover states for scaled logos */
.certification-card:hover .certification-logo.nate-logo {
    transform: scale(1.8);
}

.certification-card:hover .certification-logo.epa-logo {
    transform: scale(1.8);
}

.certification-card:hover .certification-logo.energy-star-logo {
    transform: scale(1.7);
}

.certification-card:hover .certification-logo.bbb-logo {
    transform: scale(1.7);
}

/* Certification title styling */
.certification-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Certification description */
.certification-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .certifications {
        padding: 4rem 0;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .certification-card {
        padding: 1.5rem 1rem;
    }
    
    .certification-logo {
        height: 60px;
        margin: 0.75rem auto 1rem;
    }
    
    /* Adjust scaling for mobile */
    .certification-logo.nate-logo,
    .certification-logo.epa-logo {
        transform: scale(1.4);
    }
    
    .certification-logo.energy-star-logo,
    .certification-logo.bbb-logo {
        transform: scale(1.3);
    }
    
    .certification-title {
        font-size: 1.1rem;
    }
    
    .certification-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .certification-card {
        padding: 1.25rem 1rem;
    }
    
    .certification-logo {
        height: 50px;
    }
    
    /* Further adjust scaling for small screens */
    .certification-logo.nate-logo,
    .certification-logo.epa-logo,
    .certification-logo.energy-star-logo,
    .certification-logo.bbb-logo {
        transform: scale(1.2);
    }
}

/* Print styles for certifications */
@media print {
    .certifications {
        background: none !important;
        padding: 2rem 0;
    }
    
    .certification-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: none !important;
        break-inside: avoid;
    }
    
    .certification-logo {
        height: 40px !important;
        transform: none !important;
    }
}

/* ======= MOBILE-ONLY STYLES - ADD TO BOTTOM OF main.css ======= */
/* These styles ONLY affect screens 768px and below */

/* ======= MOBILE TOUCH FIXES (ALL MOBILE DEVICES) ======= */
@media (max-width: 768px) {
    
    /* Prevent iOS zoom on form inputs */
    input[type="text"],
    input[type="email"], 
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* Critical: Prevents iOS zoom */
        -webkit-appearance: none;
    }
    
    /* Better touch targets */
    .btn, 
    nav a, 
    .mobile-toggle,
    .project-filter,
    .testimonial-control {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better touch feedback */
    * {
        -webkit-tap-highlight-color: rgba(20, 154, 158, 0.3);
        -webkit-overflow-scrolling: touch;
    }
}

/* ======= MOBILE ACTION BAR (PHONES ONLY) ======= */
@media (max-width: 576px) {
    
    /* Add bottom padding for action bar */
    body {
        padding-bottom: 80px;
    }
    
    /* Mobile action bar */
    .mobile-action-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--light-gray);
        display: flex;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 0.5rem;
    }
    
    .action-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.75rem 0.5rem;
        text-decoration: none;
        color: var(--primary-dark);
        font-size: 0.8rem;
        font-weight: 600;
        transition: all 0.3s ease;
        border-radius: 8px;
        min-height: 60px;
    }
    
    .action-btn i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
        color: var(--primary);
    }
    
    .action-btn:hover {
        background-color: var(--light-gray);
        color: var(--primary);
    }
    
    .action-btn.call-action i {
        color: var(--secondary);
    }
}

/* ======= ENHANCED MOBILE NAVIGATION ======= */
@media (max-width: 768px) {
    
    /* Better hamburger menu */
    .mobile-toggle {
        position: relative;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
    }
    
    .hamburger-line {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary-dark);
        margin: 4px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    /* Animated hamburger to X */
    .mobile-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Mobile menu contact section */
    .mobile-menu-contact {
        padding: 2rem 0 1rem;
        border-top: 1px solid var(--light-gray);
        margin-top: 2rem;
    }
    
    .mobile-call-btn,
    .mobile-email-btn {
        display: block;
        width: 100%;
        padding: 1rem;
        margin-bottom: 1rem;
        background-color: var(--primary);
        color: var(--white);
        text-decoration: none;
        border-radius: 8px;
        text-align: center;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .mobile-call-btn {
        background-color: var(--secondary);
    }
    
    .mobile-call-btn:hover,
    .mobile-email-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        color: var(--white);
    }
}

/* ======= MOBILE HERO CONTACT BUTTONS ======= */
@media (max-width: 576px) {
    
    .mobile-contact-buttons {
        display: flex;
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .mobile-contact-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        border-radius: 12px;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        transition: all 0.3s ease;
        min-height: 60px;
    }
    
    .mobile-contact-btn i {
        margin-right: 0.75rem;
        font-size: 1.25rem;
    }
    
    .call-btn {
        background: linear-gradient(135deg, var(--secondary), #e63946);
        color: var(--white);
    }
    
    .text-btn {
        background: linear-gradient(135deg, var(--primary), var(--primary-light));
        color: var(--white);
    }
    
    .mobile-contact-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        color: var(--white);
    }
}

/* ======= MOBILE FORM IMPROVEMENTS ======= */
@media (max-width: 768px) {
    
    /* Better mobile error messages */
    .error-message {
        background-color: #fef2f2;
        color: #dc2626;
        padding: 0.75rem;
        border-radius: 6px;
        margin-top: 0.5rem;
        font-size: 0.875rem;
        border-left: 4px solid #dc2626;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .form-control.error {
        border-color: #dc2626;
        box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
    }
    
    /* Mobile form focus enhancement */
    .form-control:focus {
        transform: scale(1.02);
        box-shadow: 0 0 0 3px rgba(20, 154, 158, 0.15);
    }
}

/* ======= HIDE MOBILE ELEMENTS ON DESKTOP ======= */
@media (min-width: 769px) {
    .mobile-action-bar,
    .mobile-contact-buttons,
    .mobile-menu-contact {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}