/**
 * Estilos Personalizados - Dr. Walter Segovia
 * Este archivo contiene SOLO estilos personalizados.
 * Bootstrap maneja los estilos base.
 */

/* --- Variables CSS Personalizadas --- */
:root {
    --primary-blue: #333399;
    --primary-red: #ff3333;
    --accent-light: #eef2f5;
}

/* --- Tipografía Personalizada --- */
body {
    font-family: 'Open Sans', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* --- Navbar Personalizado --- */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.navbar-brand img.navbar-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.navbar-brand span {
    color: var(--primary-red);
}

.nav-link {
    color: var(--primary-blue) !important;
    font-weight: 600;
    margin-left: 15px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-red) !important;
}

/* --- Botón WhatsApp Navbar --- */
.btn-whatsapp {
    background: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128C7E !important;
    border-color: #128C7E !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* --- Hero Section --- */
#inicio {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(11, 37, 69, 0.9), rgba(201, 42, 42, 0.8));
    background-size: cover;
    background-position: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0.4) 80%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary-blue);
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-red);
    animation: fadeInUp 1.3s ease-out;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    font-weight: 300;
    animation: fadeInUp 1.5s ease-out;
}

/* --- Botón Personalizado --- */
.btn-custom {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-custom:hover {
    background-color: #a01e1e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(201, 42, 42, 0.4);
    color: white;
}

/* Botón Secundario Azul */
.btn-secondary-custom {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 30px;
    border: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.btn-secondary-custom:hover {
    background-color: #1a1a6e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(51, 51, 153, 0.4);
    color: white;
}

/* --- Botón Scroll Down --- */
.scroll-down-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.scroll-down-btn:hover {
    color: var(--primary-red);
}

.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-blue);
    border-radius: 25px;
    position: relative;
    margin-bottom: 8px;
    transition: border-color 0.3s ease;
}

.scroll-down-btn:hover .scroll-indicator {
    border-color: var(--primary-red);
}

.scroll-arrow {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s infinite;
    transition: background-color 0.3s ease;
}

.scroll-down-btn:hover .scroll-arrow {
    background-color: var(--primary-red);
}

.scroll-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        top: 10px;
        opacity: 1;
    }
    40% {
        top: 24px;
        opacity: 0.6;
    }
    60% {
        top: 18px;
        opacity: 0.8;
    }
}

/* --- SVG Wave Divider --- */
.wave-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    display: flex;
    margin: 0;
    padding: 0;
}

.wave-bottom svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 120px;
    margin: 0;
    padding: 0;
}

.wave-bottom .shape-fill {
    fill: #ffffff;
}

/* --- Secciones Generales --- */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Sobre el Doctor --- */
#sobre-mi {
    background-color: white;
}

.doctor-img-container {
    position: relative;
    z-index: 1;
}

.doctor-img-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 5px solid var(--primary-red);
    z-index: -1;
    border-radius: 10px;
}

.doctor-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* --- Servicios --- */
#servicios {
    background-color: var(--accent-light);
    position: relative;
}

/* Decorative background */
#servicios::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23c92a2a' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.6;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 12px 10px;
    text-align: center;
    transition: padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-bottom: 5px solid var(--primary-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--primary-red);
    padding: 25px 15px;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 6px;
    transition: color 0.3s;
    flex-shrink: 0;
}

.service-card:hover .service-icon {
    color: var(--primary-red);
}

.service-title {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--primary-blue);
    font-weight: 600;
    line-height: 1.1;
}

.service-arrow {
    font-size: 0.65rem;
    color: var(--primary-red);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 0;
}

.service-card:hover .service-arrow {
    transform: rotate(180deg);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease 0.1s, max-height 0.3s ease;
}

.service-card:hover .service-list {
    opacity: 1;
    max-height: 500px;
    margin-top: 15px;
}

.service-list li {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 5px;
    padding-left: 16px;
    position: relative;
}

.service-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
}

/* --- Credenciales --- */
#credentials {
    background-color: white;
    position: relative;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
    align-items: stretch;
}

.credential-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.credential-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.credential-icon {
    min-width: 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.credential-content {
    flex: 1;
    overflow: hidden;
}

.credential-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 5px;
    line-height: 1.3;
}

.credential-institution {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    line-height: 1.3;
}

.credential-accent {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: var(--primary-red);
    transition: background-color 0.3s ease;
}

.credential-card:hover .credential-accent {
    background: var(--primary-blue);
}

#credentials::after {
    content: '\f5b2';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    color: rgba(11, 37, 69, 0.08);
    z-index: 0;
    pointer-events: none;
}

#credentials .container {
    position: relative;
}

#credentials .text-center,
#credentials .credentials-grid {
    position: relative;
    z-index: 1;
}

/* --- Contacto --- */
#contacto {
    background: white;
    position: relative;
}

.info-box {
    background: var(--primary-blue);
    color: white;
    padding: 40px;
    border-radius: 15px;
    height: 100%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-right: 15px;
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-item p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 400px;
}

/* --- Footer --- */
footer {
    background: #05162b;
    color: white;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-logo {
    max-height: 70px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

/* --- Sección Mapa Reutilizable --- */
.map-section {
    width: 100%;
    background: #e9ecef;
}

.map-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.map-container iframe:hover {
    filter: grayscale(0%);
}

/* --- WhatsApp Flotante --- */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.float-wa:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.reveal {
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: 1s all ease;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* --- Galería --- */
#galeria {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 37, 69, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-text {
    text-align: center;
    color: white;
    font-size: 2rem;
}

/* Modal Gallery */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

#modalCaption {
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 500;
}

/* --- Reels --- */
#reels {
    background-color: var(--accent-light);
}

.reels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.reel-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.reel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.reel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.reel-wrapper iframe {
    display: block;
    width: 100%;
    height: 600px;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .reels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .credentials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .reels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .reel-wrapper iframe {
        height: 500px;
    }
    #reels {
        padding: 60px 0;
    }
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    #galeria {
        padding: 60px 0;
    }
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    .doctor-img-container::before {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .info-box {
        padding: 30px 20px;
    }
    #inicio {
        background-position: right center;
    }
    .scroll-down-btn {
        bottom: 20px;
    }
    .scroll-indicator {
        width: 24px;
        height: 40px;
    }
    .scroll-text {
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .reels-grid {
        grid-template-columns: 1fr;
    }
    .reel-wrapper iframe {
        height: 450px;
    }
    #reels {
        padding: 40px 0;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    #galeria {
        padding: 40px 0;
    }
}