:root {
    --blue-primary: #004a99;
    --blue-secondary: #0072bc;
    --gray-light: #f4f7f9;
    --text-color: #4a4a4a;
    --green-success: #22c55e;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    overflow: auto;
}

/* Forzar desplazamiento si algún script pone overflow:hidden */
html, body { overflow: auto !important; }
.bg-primary { background-color: var(--blue-primary); }
.bg-secondary { background-color: var(--blue-secondary); }
.text-primary { color: var(--blue-primary); }

.hero-section {
    background: linear-gradient(rgba(0, 74, 153, 0.1), rgba(0, 74, 153, 0.1)), url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&q=80&w=1600') center/cover;
    height: 400px;
}

/* Hero variante para página dental */
.hero-dental {
    background: linear-gradient(rgba(0, 74, 153, 0.12), rgba(0, 74, 153, 0.12)), url('https://images.unsplash.com/photo-1603398938378-8d3f6d6a4c6f?auto=format&fit=crop&q=80&w=1600') center/cover;
    height: 400px;
}

/* Hero variante para página medicina */
.hero-medicine {
    background: linear-gradient(rgba(0, 74, 153, 0.12), rgba(0, 74, 153, 0.12)), url('https://images.unsplash.com/photo-1583947582887-1d5f7f3a0e65?auto=format&fit=crop&q=80&w=1600') center/cover;
    height: 400px;
}

#welcome-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 74, 153, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.btn-branch {
    background-color: var(--green-success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.btn-branch:hover {
    transform: scale(1.1);
    background-color: #16a34a;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.online-services-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}
.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    border-right: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.service-item:last-child { border-right: none; }
.service-item:hover { background-color: #f8fafc; }
.service-item i { font-size: 2.8rem; color: var(--blue-secondary); margin-bottom: 1.25rem; }
.service-item span { font-weight: 600; font-size: 1rem; text-align: center; line-height: 1.2; color: var(--blue-primary); text-transform: uppercase; }

.product-card { transition: all 0.4s ease; overflow: hidden; }
.product-card img { transition: transform 0.6s ease; }
.product-card:hover img { transform: scale(1.1) rotate(2deg); }
.product-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.video-playlist-item.active { background-color: #ebf5ff; border-left: 4px solid var(--blue-secondary); }

#instagram-slider-wrapper { overflow: hidden; width: 100%; }
/* Slider track */
#instagram-slider { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); align-items: stretch; }
/* Each frame is one full-width slide containing 3 posts laid out in a row */
.slide-frame { min-width: 100%; display: flex; gap: 1.5rem; padding: 1rem; flex: 0 0 100%; box-sizing: border-box; align-items: stretch; }
.slide-frame .insta-post { flex: 1 1 0; display: flex; flex-direction: column; background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; transition: transform 0.3s ease; overflow: hidden; }
.slide-frame .insta-post:hover { transform: translateY(-5px); }
.insta-img { display: block; margin: 0 auto; }

/* Logo styling: contain and centered for convenio posts */
.convenio-post img.insta-img { object-fit: contain; max-height: 160px; max-width: 100%; }


@media (max-width: 768px) {
    .service-item { border-right: none; border-bottom: 1px solid #e5e7eb; }
    .online-services-container { grid-template-columns: 1fr 1fr; }
    .slide-frame { display: block; }
    .slide-frame .insta-post { width: 100%; margin-bottom: 1rem; }
}

/* Botón de reserva verde */
.btn-reserve {
    background-color: var(--green-success);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(34,197,94,0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-reserve:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(34,197,94,0.2); }

.banner-image {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    min-height: 400px;
    box-shadow: inset 0 0 0 1000px rgba(0,74,153,0.06);
}

/* Ajustes para que el banner y su texto tengan presencia similar al hero-dental */
.banner-image + div h1 { font-size: 2rem; }
.banner-image + div p { color: #374151; }


