@tailwind base;
@tailwind components;
@tailwind utilities;
@import './icomoon/style.css';

/* Product Gallery Premium Styles */
.product-hero {
    background-color: #fff;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    /* 48px */
    align-items: center;
}

@media (min-width: 1024px) {

    /* lg breakpoint */
    .hero-grid {
        flex-direction: row;
        gap: 6rem;
        /* 96px */
    }

    .hero-gallery-col {
        width: 55%;
    }

    .hero-info-col {
        width: 45%;
    }
}


.gallery-container {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .gallery-container {
        flex-direction: column;
    }
}

.thumbnail-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .thumbnail-column {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.75rem;
    }

    .thumbnail-column .gallery-thumb {
        width: 60px;
        flex-shrink: 0;
    }
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: contain;
    background-color: #f9f9f9;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.main-image-wrapper {
    flex-grow: 1;
    border-radius: 24px;
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
    aspect-ratio: 3/4;
}

#main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
    transition: opacity 0.4s ease-in-out;
}

.main-image-wrapper.loading #main-product-image {
    opacity: 0;
}

/* Custom Scrollbar for Thumbnails on Mobile */
.custom-scrollbar::-webkit-scrollbar {
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Product Info Alignment */
.product-info-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Product Size Selector */
.size-selector {
    margin-top: 2.5rem;
}

.size-selector-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 1rem;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.size-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    background-color: transparent;
    transition: all 0.3s ease;
}

.size-option:hover {
    border-color: #000;
    color: #000;
}

.size-option.active {
    border-color: #000;
    background-color: #000;
    color: #fff;
}

/* Product Accordion */
.product-accordion {
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
}

.accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #555;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.accordion-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out;
}

.accordion-item.active .accordion-content-wrapper {
    grid-template-rows: 1fr;
}

.accordion-content {
    overflow: hidden;
}

.accordion-content-inner {
    padding-bottom: 1.5rem;
    color: #666;
    line-height: 1.8;
}

.accordion-content-inner ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.accordion-content-inner li {
    margin-bottom: 0.5rem;
}

/* Clinical Results Section Layout */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    /* 48px */
}

@media (min-width: 1024px) {

    /* lg breakpoint */
    .results-grid {
        flex-direction: row;
        gap: 6rem;
        /* 96px */
        align-items: center;
        /* keep them vertically centered */
    }

    .results-gallery-col {
        width: 55%;
    }

    .results-stats-col {
        width: 45%;
    }
}

/* Clinical Statistics Grid */
.results-stats-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem;
}

@media (max-width: 640px) {

    /* sm breakpoint */
    .results-stats-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.stat-block {
    text-align: left;
}

.stat-number {
    font-size: 4rem;
    /* large percentage number */
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: #111;
    letter-spacing: -0.02em;
}

.stat-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Before/After Comparison Slider */
.image-comparison__slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    /* Balanced clinical aspect ratio */
    overflow: hidden;
    background-color: #f0f0f0;
}

.image-comparison__image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* The After image is the overlay that gets clipped */
.image-comparison__image-wrapper--overlay {
    z-index: 2;
    width: 50%;
    /* Initial state */
    border-right: 2px solid #fff;
    overflow: hidden;
}

.image-comparison__figure,
.image-comparison__picture,
.image-comparison__image {
    width: 100% !important;
    height: 100% !important;
    display: block;
    margin: 0;
    padding: 0;
}

.image-comparison__image {
    object-fit: cover;
    object-position: center;
}

/* Labels */
.image-comparison__caption {
    position: absolute;
    top: 20px;
    pointer-events: none;
    z-index: 3;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.image-comparison__caption--before {
    left: 20px;
}

.image-comparison__caption--after {
    right: 20px;
}

/* Invisible Range Input Overlay */
.image-comparison__range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
    appearance: none;
    -webkit-appearance: none;
}

/* Visible Handle (Vertical Divider) */
.image-comparison__slider {
    position: absolute;
    top: 0;
    left: 50%;
    /* JS updates this value */
    width: 2px;
    height: 100%;
    background-color: #fff;
    z-index: 5;
    transform: translateX(-50%);
    /* Center the 2px line on the current percentage */
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Draggable Blue Handle */
.image-comparison__thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Perfectly center the circle on the line */
    width: 44px;
    height: 44px;
    background-color: #3b82f6;
    /* Premium Blue */
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-comparison__thumb-icon {
    height: 18px;
}

/* Premium Blog Grid Styles */
.blog-section {
    padding: 80px 0;
    background-color: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 30px;
    /* Increased row gap */
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 40px 0;
    }
}

.blog-card {
    display: none;
    /* Fixed: Don't reserve space */
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 16px;
    border: 1px solid transparent;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
}

.blog-card.is-visible {
    display: flex;
}

.blog-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.06);
    border-color: #f0f0f0;
}

.blog-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    /* More consistent portrait/landscape feel */
    overflow: hidden;
    border-radius: 20px;
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.blog-card:hover .blog-card__image {
    transform: scale(1.06);
}

.blog-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.blog-card__content {
    padding: 24px 4px 0;
    /* Added slight horizontal padding for better alignment */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__title {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.4;
    color: #111;
    margin-bottom: 16px;
    transition: color 0.4s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-card__title {
    color: #777;
}

.blog-card__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
    letter-spacing: 0.03em;
}

.blog-card__author {
    font-weight: 500;
    color: #777;
}

.blog-card__dot {
    width: 4px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 50%;
}

/* Load More Button */
.load-more-container {
    margin-top: 80px;
    text-align: center;
}

.btn-load-more {
    padding: 18px 48px;
    background-color: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.btn-load-more:hover {
    background-color: #fff;
    color: #111;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-load-more.hidden {
    display: none;
}

/* Contact Branches Section */
.branches-section {
    background-color: #fff;
    padding-bottom: 160px;
    position: relative;
}

.branches-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .branches-container {
        padding: 0 20px;
    }
}

.branches-section .heading3 {
    margin-bottom: 40px;
}

.branches-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@media (max-width: 1024px) {
    .branches-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .branches-list {
        grid-template-columns: 1fr;
    }
}

.branches-list .branch-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: translateY(40px);
    transition: all .35s ease;
    margin-bottom: 0;
}

.branches-list .branch-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.branches-list .branch-card.visible:hover {
    transform: translateY(-8px);
}

.branch-card__image-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.branch-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.branches-list .branch-card:hover .branch-card__image {
    transform: scale(1.05);
}

.branch-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background .35s ease;
}

.branches-list .branch-card:hover .branch-card__overlay {
    background: rgba(0, 0, 0, 0.55);
}

.branch-card__title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    margin: 0;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    font-size: 1.25rem;
    z-index: 10;
    transition: transform .35s ease;
}

.branches-list .branch-card:hover .branch-card__title {
    transform: translate(-50%, -50%) scale(1.05);
}

.branch-card__content {
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: auto;
    min-height: 110px;
    flex-grow: 1;
    background-color: #fff;
}

.branch-card__info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.branch-card__info-item:first-child {
    font-size: 13px;
}

.branch-card__info-item i {
    font-size: 14px;
    color: #333;
    display: inline-flex;
    align-items: center;
}

/* Doctors Section Redesign */
.doctors-section {
    background-color: #fff;
    position: relative;
}

.doctors-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

.doctor-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.doctor-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.doctor-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.doctor-card:hover .doctor-card__image {
    transform: scale(1.05);
}

.doctor-card__name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #111;
}

.doctor-card__specialty {
    font-size: 0.9rem;
    font-weight: 400;
    color: #555;
    letter-spacing: 0.02em;
}

.doctor-card__info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    flex-grow: 1;
}

.doctor-card__social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.doctor-card__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.doctor-card__social a:hover {
    background: #111;
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .doctors-container {
        padding: 0 20px;
    }

    .doctors-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: whatsappPulse 2s infinite;
    opacity: 0.6;
}

.whatsapp-icon-wrapper {
    width: 100%;
    height: 100%;
    background: rgba(37, 211, 102, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    z-index: 2;
}

.whatsapp-icon-wrapper i {
    color: #fff;
    font-size: 34px;
    transition: all 0.4s ease;
}

.whatsapp-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.whatsapp-float-btn:hover .whatsapp-icon-wrapper {
    background: rgba(37, 211, 102, 1);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.6);
        opacity: 0;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .whatsapp-float-btn {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-icon-wrapper i {
        font-size: 30px;
    }
}

/* Treatment Banners */
.treatment-banner {
    min-height: 320px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.treatment-banner:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.treatment-banner-lg {
    min-height: 360px;
}

@media (min-width: 768px) {
    .treatment-banner-lg {
        min-height: 420px;
    }
}

.treatment-card-content {
    justify-content: flex-end;
    padding-bottom: 48px;
}

.treatment-card-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .treatment-card-title {
        font-size: 30px;
    }
}

.treatment-card-title-lg {
    font-size: 32px;
}

@media (min-width: 768px) {
    .treatment-card-title-lg {
        font-size: 40px;
    }
}

/* Treatment Sections Spacing */
.treatment-section+.treatment-section {
    margin-top: 80px;
}

@media (min-width: 768px) {
    .treatment-section+.treatment-section {
        margin-top: 40px;
    }
}

/* Treatment Titles */
.treatment-section-title {
    font-size: 28px;
}

@media (min-width: 768px) {
    .treatment-section-title {
        font-size: 32px;
    }
}

.award .benefit-item .body1 {
    font-size: 15px !important;
}

.award .list-benefit {
    align-items: flex-start !important;
}

.award .benefit-item {
    justify-content: flex-start !important;
}

.award-img-wrapper {
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .award-img-wrapper {
        height: 112px;
    }
}

.award-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.testimonial-stars {
    color: #c2a362;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Home Page - Follow ZO Social Media Section */
.social-media .follow-zo-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 24px;
}

.social-media .social-link {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-media .social-link:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

/* Override any default background gradients for a solid minimal look */
.social-media .social-link.instagram .icon-instagram {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #000;
}

/* Results Before/After Overrides - Preserve aspect ratio and orientation */
.results.image-comparison .grid {
    grid-template-columns: 1fr !important; /* Stack vertically on mobile */
    align-items: start !important; /* Prevent stretching to equal heights */
}

@media (min-width: 768px) {
    .results.image-comparison .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* Side-by-side on desktop */
    }
}

.results.image-comparison .group {
    height: auto !important; /* Override Tailwind fixed heights like h-[200px] */
    aspect-ratio: auto !important;
}

.results.image-comparison .group img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Ensure image is fully visible without cropping */
}