/* HVAC Preventive Maintenance Page Styles */
/* =========================================== */

@import url('design-tokens.css');

/* ============================================
   1. WHY PREVENTIVE MAINTENANCE MATTERS SECTION
   ============================================ */

.pm-why-maintenance {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.pm-why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.pm-why-image {
    position: relative;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.pm-why-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-why-content h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-why-intro {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.pm-why-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.pm-benefit-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.pm-benefit-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 10px;
    flex-shrink: 0;
}

.pm-benefit-icon svg {
    width: 26px;
    height: 26px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pm-benefit-content h3 {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.pm-benefit-content p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   2. MAINTENANCE PROGRAM SECTION
   ============================================ */

.pm-program {
    padding: 5rem 0;
    background-color: #F9FAFB;
}

.pm-program h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-program-intro {
    text-align: center;
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.pm-program-image-container {
    max-width: 900px;
    margin: 0 auto 4rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(199, 5, 50, 0.1);
}

.pm-program-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.pm-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.pm-program-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    border: 1px solid #E5E7EB;
}

.pm-program-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(199, 5, 50, 0.15);
    border-color: var(--color-primary);
}

.pm-program-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 14px;
    transition: var(--transition-smooth);
}

.pm-program-item:hover .pm-program-icon {
    transform: scale(1.1) rotate(-5deg);
}

.pm-program-icon svg {
    width: 42px;
    height: 42px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.pm-program-item h3 {
    font-size: 1rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-program-item p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   3. MAINTENANCE PROCESS TIMELINE SECTION
   ============================================ */

.pm-process {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.pm-process h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-timeline-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: flex-start;
}

.pm-timeline-images {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.pm-process-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.pm-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pm-timeline-item {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.pm-timeline-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-left-color: var(--color-secondary);
}

.pm-timeline-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.pm-timeline-icon svg {
    width: 26px;
    height: 26px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pm-timeline-content h3 {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.pm-timeline-content p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   4. MAINTENANCE GALLERY SECTION
   ============================================ */

.pm-gallery {
    padding: 5rem 0;
    background-color: #F9FAFB;
}

.pm-gallery h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: 280px;
}

.pm-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.pm-gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
}

.pm-gallery-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 1;
}

.pm-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.pm-gallery-item:hover .pm-gallery-image {
    transform: scale(1.08);
}

.pm-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.pm-gallery-item:hover .pm-gallery-overlay {
    opacity: 1;
}

.pm-gallery-label {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

/* ============================================
   5. CALL TO ACTION SECTION
   ============================================ */

.pm-cta {
    position: relative;
    padding: 6rem 2rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.pm-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.pm-cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 700px;
}

.pm-cta h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pm-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .pm-why-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pm-why-image {
        height: 350px;
    }

    .pm-program-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pm-timeline-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .pm-timeline-images {
        position: static;
    }

    .pm-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .pm-gallery-item:nth-child(1) {
        grid-column: span 1;
    }

    .pm-gallery-item:nth-child(5) {
        grid-column: span 1;
    }

    .pm-timeline {
        grid-template-columns: 1fr;
    }

    .pm-cta {
        padding: 4rem 2rem;
        min-height: 350px;
    }

    .pm-cta-buttons {
        flex-direction: column;
    }

    .pm-cta-buttons .btn {
        width: 100%;
    }

    .pm-program {
        padding: 3rem 0;
    }

    .pm-process {
        padding: 3rem 0;
    }

    .pm-gallery {
        padding: 3rem 0;
    }

    .pm-why-maintenance {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .pm-program-grid {
        grid-template-columns: 1fr;
    }

    .pm-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .pm-benefit-item {
        gap: 1rem;
    }

    .pm-program-icon {
        width: 70px;
        height: 70px;
    }

    .pm-program-icon svg {
        width: 36px;
        height: 36px;
    }

    .pm-cta {
        padding: 3rem 1.5rem;
        min-height: 300px;
    }

    .pm-cta h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}
