/* ═══════════════════════════════════════════════
   pages.css – Page-Specific Styles
   ═══════════════════════════════════════════════ */

/* ═══════ HERO BANNER ═══════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-tag {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(var(--theme-body-bg), 0.15);
    border: 1px solid var(--theme-body-bg);
    border-radius: var(--radius-full);
    color: var(--theme-body-bg);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: var(--theme-heading-weight);
    color: var(--theme-body-bg);
    /* Changed to turquoise-like accent */
    line-height: 1.2;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-title span {
    color: #fff;
    /* Swap: if there is a span, make it white for contrast */
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--theme-body-bg);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    padding: 0 15px;
    /* Prevent text from going too wide */
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Specific Hero Button Overrides */
.hero-actions .btn {
    width: 200px;
    padding: 14px 20px;
}

.hero-actions .btn-white {
    background: var(--theme-primary) !important;
    color: #fff !important;
    border: 1px solid var(--theme-primary);
}

.hero-actions .btn-white:hover {
    background: var(--theme-secondary) !important;
}

.hero-actions .btn-outline {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--theme-accent) !important;
    border: 2px solid var(--theme-accent) !important;
    backdrop-filter: blur(4px);
}

.hero-actions .btn-outline:hover {
    background: var(--theme-accent) !important;
    color: #fff !important;
}

/* ═══════ HERO SLIDER ═══════ */
.hero-slider-section {
    padding: 0;
    min-height: 100vh;
}

.hero-slider-section .hero-swiper {
    width: 100%;
    height: 100vh;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 6s ease;
    z-index: 0;
}

.swiper-slide-active .hero-slide-bg {
    transform: scale(1);
}




.hero-slide .hero-content {
    position: relative;
    z-index: 3;
}

.hero-swiper-prev,
.hero-swiper-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.hero-swiper-prev {
    left: 24px;
}

.hero-swiper-next {
    right: 24px;
}

.hero-swiper-prev:hover,
.hero-swiper-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-swiper-pagination {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.hero-swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s;
    opacity: 1;
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--theme-body-bg);
    width: 28px;
    border-radius: 5px;
}


/* ═══════ PAGE HERO (Inner Pages) ═══════ */
.page-hero {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--theme-body-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: #fff;
    margin-bottom: 12px;
}

.page-hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════ ABOUT SECTION ═══════ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.about-image-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: rgba(var(--theme-primary-rgb), 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 24px 32px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 15px 35px rgba(var(--theme-primary-rgb), 0.3);
    z-index: 5;
}

.about-image-badge strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.about-image-badge span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.about-text-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--theme-accent);
    margin-bottom: 10px;
    display: block;
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.about-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--theme-heading);
}

.about-checklist-item i {
    color: var(--theme-accent);
    font-size: 1rem;
}

/* ═══════ CTA SECTION ═══════ */
.inner-page .cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(var(--theme-primary-rgb), 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.inner-page .cta-section h2 {
    color: #fff;
    margin-bottom: 0;
    font-size: 2.5rem;
}

.inner-page .cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0;
    font-size: 1.15rem;
}

.inner-page .cta-section .btn {
    margin-top: 10px;
}

/* ═══════ CONTACT PAGE ═══════ */
.contact-grid {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 40px;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--theme-gray-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-info-card .icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
}

.contact-form-wrapper {
    background: var(--theme-body-bg);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-card);
    height: 100%;
}

.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
    min-height: 400px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ═══════ BLOG LIST ═══════ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--theme-body);
    opacity: 0.7;
    margin-bottom: 10px;
}

/* ═══════ REFERENCE/GALLERY ═══════ */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.ref-card .card-img {
    height: 260px;
}

/* Reference Detail Gallery (Swiper) */
.ref-gallery-side {
    position: relative;
}

.ref-gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.ref-gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.ref-gallery-thumbs .swiper-slide {
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    border: 2px solid transparent;
}

.ref-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--theme-primary);
}

.ref-gallery-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.ref-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.ref-detail-info h1 {
    margin-bottom: 16px;
}

.ref-detail-info p {
    line-height: 1.8;
}

/* ═══════ SERVICE PAGE ═══════ */
.service-content {
    line-height: 1.9;
}

.service-content h2,
.service-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.service-content img {
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.service-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
}

.service-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--theme-accent);
    border-radius: 50%;
}

/* ═══════ PAGINATION ═══════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--theme-border);
    color: var(--theme-heading);
    background: #fff;
    transition: all var(--transition-normal);
}

.pagination a:hover {
    background: var(--theme-gray-light);
    border-color: var(--theme-accent);
    color: var(--theme-primary);
}

.pagination .active {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #fff !important;
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 992px) {
    .hero {
        min-height: 70vh;
        padding: 100px 0 60px;
    }

    .hero-slider-section {
        padding: 0 !important;
        min-height: 100vh !important;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-grid.order-mobile-reverse {
        display: flex;
        flex-direction: column-reverse;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .ref-detail-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-section {
        flex-direction: column;
        text-align: center;
    }

    .cta-content-wrapper {
        margin-bottom: 2rem;
        text-align: center;
    }

    .cta-testimonials {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 5px;
        padding-right: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        width: 100%;
        scroll-padding-left: 5px;
    }

    .cta-testimonials::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

    .cta-testimonial-card {
        flex: 0 0 320px;
        scroll-snap-align: start;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
    }

    .hero-content {
        padding: 0 50px;
        /* Stronger padding to push content inwards away from arrows */
    }

    .hero-tag {
        margin-bottom: 32px;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 32px;
    }

    .hero-desc {
        font-size: 1.15rem;
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 36px;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .hero-actions .btn {
        width: 200px;
    }

    .page-hero {
        padding: 120px 0 50px;
    }

    .about-checklist {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 40px 24px;
        border-radius: var(--radius-lg);
    }

    .cta-testimonial-card {
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .ref-grid {
        grid-template-columns: 1fr;
    }

    .ref-gallery-main img {
        height: 300px;
    }
}

/* ═══════ BEFORE/AFTER COMPARISON ═══════ */
.ba-section {
    background: var(--theme-gray-light);
}

.ba-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.ba-card {
    /* Using Flexbox to center partial columns.
       Width = 100% / cols - (gap space) */
    width: calc((100% - (1.5rem * (var(--ba-cols, 2) - 1))) / var(--ba-cols, 2));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-normal);
}

.ba-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.ba-card-title {
    padding: 16px 20px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--theme-heading);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ── Slider Container ── */
.ba-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-slider-after {
    z-index: 1;
}

.ba-slider-before {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

/* ── Draggable Handle ── */
.ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #fff;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.ba-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
    cursor: col-resize;
}

.ba-slider-handle::after {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--theme-primary);
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
    z-index: 11;
    pointer-events: none;
}

/* ── Labels ── */
.ba-label {
    position: absolute;
    bottom: 12px;
    z-index: 5;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-full);
    color: #fff;
    backdrop-filter: blur(6px);
}

.ba-label-before {
    left: 12px;
    background: rgba(220, 53, 69, 0.8);
}

.ba-label-after {
    right: 12px;
    background: rgba(25, 135, 84, 0.8);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .ba-grid {
        --ba-cols: min(2, var(--ba-cols, 2)) !important;
    }
}

@media (max-width: 576px) {
    .ba-grid {
        --ba-cols: 1 !important;
    }
}