/* Service Pages CSS - Maple Shunt Service */

/* Fix loader overflow on mobile */
.site-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #fff, #fdf5f6);
    display: grid;
    place-items: center;
    z-index: 200;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    overflow: hidden;
}

.loader-mark {
    text-align: center;
    max-width: 90%;
}

.loader-mark img {
    width: min(220px, 70vw);
    height: auto;
    margin: 0 auto 22px;
    max-width: 100%;
}

.spinner-ring {
    width: min(58px, 15vw);
    height: min(58px, 15vw);
    border: 4px solid rgba(209, 13, 20, 0.15);
    border-top-color: var(--red);
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 1s linear infinite;
}

@media (max-width: 480px) {
    .loader-mark img {
        width: min(180px, 60vw);
    }
    
    .spinner-ring {
        width: min(40px, 12vw);
        height: min(40px, 12vw);
    }
}

/* Hero Section */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(100deg, rgba(255,255,255,0.96) 0% 48%, rgba(255,255,255,0.85) 67%, transparent 100%), 
                url('../images/services-hero-full.png') right center/cover no-repeat;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.20) 48%, transparent 66%);
    transform: translateX(-120%);
    animation: heroSweep 1.25s ease 0.35s both;
    width: 100%;
    max-width: 100%;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.05;
    margin: 0 0 20px;
    color: var(--ink);
    font-weight: 800;
    animation: heroIn 0.8s cubic-bezier(0.2,0.7,0.2,1) both;
}

.hero-subtitle {
    font-size: 1.6rem;
    line-height: 1.25;
    margin: 0 0 20px;
    color: var(--red);
    font-weight: 700;
    animation: heroIn 0.8s cubic-bezier(0.2,0.7,0.2,1) 0.1s both;
}

/* Contact Form Card */
.contact-form-card {
    background: rgba(255,255,255,0.96);
    border: 2px solid #e4e6e8;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

.contact-form-card h3 {
    margin: 0 0 24px;
    font-size: 1.4rem;
    color: var(--ink);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(209,13,20,0.1);
}

.btn-block {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* Content Sections */
.content-section {
    padding: 50px 0; /* Reduced from 70px */
}

.content-section.bg-light {
    background: rgba(247,248,249,0.6);
}

.content-section h2 {
    font-size: 2.2rem;
    margin: 0 0 20px;
    color: var(--ink);
    font-weight: 700;
}

.content-section p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.content-section h3 {
    font-size: 1.4rem;
    margin: 24px 0 16px;
    color: var(--ink);
    font-weight: 600;
}

/* Image Sections - Desktop: Match content height, Mobile: Fixed height */
.content-section .row {
    align-items: stretch;
    min-height: 400px;
}

.content-section .col-lg-6 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Image column should fill available height */
.content-section .col-lg-6:has(img) {
    display: block;
}

/* Section Styling */
.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.4rem;
    margin: 0 0 20px;
    color: var(--ink);
    font-weight: 700;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services Overview Section */
.services-overview {
    padding: 50px 0; /* Reduced from 70px */
    background: rgba(247,248,249,0.4);
}

.service-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
    height: 100%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-color: #f0b5b8;
}

.service-card h4 {
    font-size: 1.25rem;
    margin: 0 0 16px;
    color: var(--ink);
    font-weight: 700;
}

.service-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Step Numbers for How It Works Cards */
.step-number {
    width: 40px;
    height: 40px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(209,13,20,0.25);
}

/* Handle odd number of cards - Center last card when it's alone */
.services-overview .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Style for full-width single cards */
.services-overview .col-lg-12 {
    flex: 0 0 50%;
    max-width: 50%;
    margin: 0 auto;
}

/* Center the last card if it's the 5th card (odd number) */
.services-overview .row:has(.col-lg-12:only-child) .col-lg-12,
.services-overview .row .col-lg-12:nth-child(5):last-child {
    margin: 0 auto;
}

/* Feature List with Custom Bullets */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    font-weight: 500;
    line-height: 1.6;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    color: var(--red);
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 12px;
    width: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list li i {
    display: none; /* Hide FontAwesome if present */
}

/* Rounded CTA Section - Centered Content */
.cta-section-rounded {
    padding: 60px 0; /* Reduced from 80px */
    background: #f8f9fa;
}

.cta-section-rounded .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-card {
    background: linear-gradient(135deg, var(--red) 0%, #c90a11 100%);
    color: #fff;
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: none;
    margin: 0;
}

.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cta-card .row {
    margin: 0;
}

.cta-card .col-lg-8 {
    padding: 0;
}

.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cta-card h2 {
    font-size: 2.4rem;
    margin: 0 0 20px;
    color: #fff;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.cta-card p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cta-card .lead {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.cta-buttons {
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.cta-card .btn {
    background: #fff;
    color: var(--red);
    font-weight: 800;
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.cta-card .btn:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* FAQ Section - Fixed Styling */
.faq-section {
    padding: 50px 0; /* Reduced from 70px */
    background: #fff;
}

.faq-section .section-header h2 {
    font-size: 2.4rem;
    margin-bottom: 50px;
}

.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
    flex: 1;
    padding-right: 20px;
}

.faq-toggle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--red);
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
        background: linear-gradient(rgba(255,255,255,0.94), rgba(255,255,255,0.94)), 
                    url('../images/services-hero-full.png') center/cover no-repeat;
        overflow: hidden;
    }
    
    .hero-section::after {
        display: none; /* Disable sweep animation on mobile to prevent overflow */
    }
    
    .hero-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .hero-section p {
        text-align: center;
    }
    
    .contact-form-card {
        padding: 24px;
        margin-top: 30px;
    }
    
    .content-section {
        padding: 30px 0; /* Reduced further */
        text-align: center; /* Center all content */
    }
    
    .content-section .row {
        min-height: auto; /* Remove min-height on mobile */
    }
    
    .content-section .col-lg-6 {
        display: block; /* Reset flex on mobile */
        justify-content: initial;
        text-align: center; /* Center all content */
        margin-bottom: 15px;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 16px;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
        text-align: center;
        margin: 16px 0 12px;
    }
    
    .content-section p {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 12px;
    }
    
    /* Mobile: Fixed height images */
    .content-section img {
        height: 250px;
        min-height: 250px;
        margin-bottom: 20px;
    }
    
    .feature-list {
        text-align: left;
        max-width: 300px;
        margin: 16px auto;
    }
    
    .services-overview {
        padding: 35px 0; /* Reduced further */
        text-align: center;
    }
    
    .section-header {
        margin-bottom: 25px; /* Reduced further */
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .section-header p {
        text-align: center;
    }
    
    .cta-section-rounded {
        padding: 40px 0; /* Reduced further */
    }
    
    .cta-card {
        border-radius: 20px;
        margin: 0 15px;
        padding: 40px 25px;
        text-align: center;
    }
    
    .cta-card h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .cta-card p {
        text-align: center;
    }
    
    .service-card {
        margin-bottom: 16px;
        text-align: center;
    }
    
    .service-card .step-number {
        margin: 0 auto 16px auto;
    }
    
    .faq-section {
        padding: 40px 0; /* Reduced further */
    }
    
    .faq-section .section-header {
        text-align: center;
    }
    
    .faq-question {
        padding: 18px 20px;
    }
    
    .faq-question h4 {
        font-size: 1rem;
        padding-right: 15px;
        text-align: left; /* Keep FAQ questions left-aligned for readability */
    }
    
    .faq-answer {
        padding: 0 20px;
        text-align: left; /* Keep FAQ answers left-aligned for readability */
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.9rem;
    }
    
    .hero-section p {
        text-align: center;
    }
    
    .contact-form-card {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
    }
    
    .content-section {
        padding: 25px 0; /* Reduced further */
        text-align: center;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
        text-align: center;
    }
    
    .content-section p {
        font-size: 0.95rem;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .content-section .col-lg-6 {
        margin-bottom: 12px;
        text-align: center;
    }
    
    /* Smaller images on very small screens */
    .content-section img {
        height: 220px;
        min-height: 220px;
        margin-bottom: 16px;
    }
    
    .services-overview {
        padding: 25px 0; /* Reduced further */
        text-align: center;
    }
    
    .section-header {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .section-header h2 {
        text-align: center;
    }
    
    .service-card {
        text-align: center;
    }
    
    .service-card .step-number {
        margin: 0 auto 16px auto;
    }
    
    .cta-section-rounded {
        padding: 35px 0; /* Reduced further */
    }
    
    .cta-card {
        margin: 0 10px;
        padding: 30px 20px;
        text-align: center;
    }
    
    .cta-card h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .cta-card p {
        text-align: center;
    }
    
    .faq-section {
        padding: 35px 0; /* Reduced further */
    }
    
    .faq-question {
        padding: 16px 18px;
    }
    
    .faq-answer {
        padding: 0 18px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 18px 18px;
    }
}

/* Animation keyframes */
@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSweep {
    to {
        transform: translateX(120%);
    }
}

/* Bootstrap-like responsive utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.col-lg-6,
.col-lg-8,
.col-lg-7,
.col-lg-5,
.col-lg-4,
.col-md-6,
.col-12 {
    padding-left: 15px;
    padding-right: 15px;
}

.col-lg-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.col-lg-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

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

.align-items-center {
    align-items: center;
}

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

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
}

.btn-lg {
    padding: 18px 32px;
    font-size: 1.1rem;
}

@media (max-width: 991px) {
    .col-lg-6,
    .col-lg-8,
    .col-lg-7,
    .col-lg-5,
    .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}