/* Estilos personalizados para TusDientesBonitos */

/* Variables CSS para colores dentales */
:root {
    --dental-blue: #2563eb;
    --dental-blue-light: #60a5fa;
    --dental-green: #10b981;
    --dental-white: #ffffff;
    --dental-gray: #6b7280;
    --tooth-color: #f8fafc;
}

/* Animaciones */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.whatsapp-float {
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    animation: none;
    transform: scale(1.1);
}

.dental-shine {
    position: relative;
    overflow: hidden;
}

.dental-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.3) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

html {
    scroll-behavior: smooth;
}

.before-after-container {
    position: relative;
    overflow: hidden;
}

.before-after-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(239,68,68,0.1) 0%, rgba(34,197,94,0.1) 100%);
    pointer-events: none;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
    }
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dental-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: var(--dental-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.review-card {
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Estilos para estrellas de calificación */
.star-rating {
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Efecto de gradiente dental */
.dental-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animación para iconos */
.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Efecto de parallax */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Estilos para loader de página */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.tooth-loader {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--dental-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Efectos de tooltips */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-size: 12px;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Efecto de zoom para imágenes */
.image-zoom {
    overflow: hidden;
    cursor: zoom-in;
}

.image-zoom img {
    transition: transform 0.3s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Estilos para modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1a202c;
        color: #e2e8f0;
    }
}

/* Efectos de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Efectos de impresión */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}
