/* Global Styles */
:root {
    --bg-color: #F1EFF0;
    --text-primary: #8B5A44;
    --text-secondary: #5a5f73;
    --card-bg: #ffffff;
    --card-shadow: rgba(139, 90, 68, 0.08);
    --icon-bg: #F6EDE9;
    --accent-color: #8B5A44;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Onest', sans-serif;
}

body {
    background-color: #EAEAEA;
    /* Light grey desktop background */
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.mobile-wrapper {
    width: 100%;
    max-width: 560px;
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
    /* Soft shadow for depth */
}

@media (min-width: 561px) {
    body {
        padding: 40px 0;
        /* Add space around on desktop */
        align-items: flex-start;
        /* Ensure scrolling works if taller than screen */
    }

    .mobile-wrapper {
        min-height: calc(100vh - 80px);
        /* Fit within desktop padding */
        border-radius: 40px;
        /* Rounded corners like a phone */
        overflow: hidden;
        /* Clips the background slider perfectly to the corners */
        margin: 0 auto;
    }
}

/* Background Shapes for Premium Look */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -150px;
    right: -150px;
}

/* Container */
.container {
    width: 100%;
    max-width: 560px;
    padding: 25vh 20px 40px;
    /* Reduced from 45vh to 25vh so image isn't too high */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    position: relative;
}

/* Slider Background */
.slider-container {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 35vh;
    /* Reduced height to fix the issue on mobile */
    z-index: 0;
    overflow: hidden;

    /* Apply mask here instead of wrapper so it stays fixed and doesn't scroll */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 95%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 95%);
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    scroll-snap-align: start;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
    width: 100%;
}

.logo-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 24px;
    background: var(--card-bg);
    box-shadow: 0 10px 25px var(--card-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 8px;
    /* Optional, depending on if the logo needs breathing room */
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.description {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 20px;
}

.doctors-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 24px;
}

.doctor-line {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.doctor-line i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.doctor-line strong {
    color: var(--text-primary);
    font-weight: 600;
}

.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--text-primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Links Section */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    text-align: left;
    cursor: pointer;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 90, 68, 0.15);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    background: var(--icon-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
}

.icon-wrapper .ph {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.link-content {
    display: flex;
    flex-direction: column;
}

.link-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.link-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Reviews Section */
.reviews-section {
    width: 100%;
    margin-top: 40px;
    margin-bottom: 20px;
}

.reviews-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-align: center;
}

.reviews-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.reviews-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 16px;
    /* space for drop shadows */
    padding-top: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.reviews-wrapper::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 280px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px var(--card-shadow);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.review-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-google-icon {
    width: 24px;
    height: 24px;
    opacity: 0.6;
    /* discreto */
    flex-shrink: 0;
}

.review-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.stars {
    color: #fbbc04;
    /* Google star color */
    display: flex;
    gap: 2px;
    font-size: 0.9rem;
}

.review-text {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Contact Section */
.contact-section {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.contact-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    text-align: center;
}

.contact-section p i {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Footer Section */
.footer-section {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.footer-section p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-link {
    font-weight: 700;
    text-decoration: underline;
    color: inherit;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 16px;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
    color: white;
}

.panorama-container {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

#panorama {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .modal-content {
        height: 70vh;
        width: 95%;
    }

    .close-btn {
        top: 10px;
        right: 10px;
    }
}
