/* ============================================
   DENTAL INNOVA — Custom Styles
   ============================================ */

:root {
    --color-navy-900: #102a43;
    --color-teal-600: #199473;
    --color-teal-500: #27ab83;
    --color-gold-500: #f0b429;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== SMOOTH SCROLL ========== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* ========== SELECTION ========== */
::selection {
    background-color: #c6f7e2;
    color: #102a43;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #bcccdc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #829ab1;
}

/* ========== HERO GRADIENT ========== */
.hero-gradient {
    background: linear-gradient(135deg, #f0f4f8 0%, #effcf6 30%, #f0f4f8 60%, #fffbea 100%);
}

.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(16,42,67,0.05) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ========== NAVIGATION ========== */
.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334e68;
    border-radius: 0.75rem;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
}
.nav-link:hover {
    color: #199473;
    background-color: rgba(25, 148, 115, 0.06);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: #199473;
    border-radius: 1px;
    transition: all 0.3s var(--transition-smooth);
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 40%;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #334e68;
    border-radius: 0.75rem;
    transition: all 0.2s;
}
.mobile-nav-link:hover {
    color: #199473;
    background-color: rgba(25, 148, 115, 0.06);
}

/* Navbar solid state */
.navbar-solid {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(16, 42, 67, 0.06);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.05);
}

/* ========== HAMBURGER ========== */
.hamburger-lines {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-lines span {
    display: block;
    height: 2px;
    width: 100%;
    background: #334e68;
    border-radius: 2px;
    transition: all 0.3s var(--transition-smooth);
    transform-origin: center;
}
.hamburger-active .hamburger-lines span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger-active .hamburger-lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-active .hamburger-lines span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ========== SERVICE CARDS ========== */
.service-card {
    background: white;
    padding: 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid #d9e2ec;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #199473, #27ab83);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--transition-smooth);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(16, 42, 67, 0.12);
    border-color: transparent;
}
.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.4s var(--transition-smooth);
}

/* ========== TESTIMONIAL CARDS ========== */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #d9e2ec;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 4rem;
    font-family: 'Playfair Display', serif;
    color: #effcf6;
    line-height: 1;
    pointer-events: none;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(16, 42, 67, 0.1);
    border-color: #c6f7e2;
}

/* ========== GALLERY ========== */
.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #f0f4f8;
}
.gallery-item.col-span-2.row-span-2 {
    aspect-ratio: auto;
    min-height: 300px;
}
.gallery-item.col-span-2:not(.row-span-2) {
    aspect-ratio: 2/1;
}
.gallery-item img {
    transition: transform 0.7s var(--transition-smooth);
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(16, 42, 67, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-label {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

/* ========== LIGHTBOX ========== */
.lightbox-img-enter {
    animation: lightboxFadeIn 0.3s ease-out;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ========== FORM INPUTS ========== */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #d9e2ec;
    border-radius: 0.875rem;
    font-size: 0.9375rem;
    color: #102a43;
    background: #f8fafc;
    transition: all 0.3s var(--transition-smooth);
    outline: none;
    font-family: 'Inter', sans-serif;
}
.form-input::placeholder {
    color: #829ab1;
}
.form-input:focus {
    border-color: #27ab83;
    background: white;
    box-shadow: 0 0 0 4px rgba(39, 171, 131, 0.1);
}
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23829ab1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: whatsappPulse 2s ease-out infinite;
}
@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ========== FLOATING ANIMATIONS ========== */
.float-animation {
    animation: float 6s ease-in-out infinite;
}
.float-animation-delayed {
    animation: float 6s ease-in-out infinite 2s;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    animation: fadeInUp 1s ease-out 1.5s both;
}
.scroll-dot {
    animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0.3; }
}

/* ========== SCROLL REVEAL ANIMATIONS ========== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s var(--transition-smooth);
    transition-delay: var(--delay, 0s);
}
.reveal-up {
    transform: translateY(40px);
}
.reveal-left {
    transform: translateX(-40px);
}
.reveal-right {
    transform: translateX(40px);
}
.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========== INITIAL HERO ENTRANCE ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
#inicio .reveal-left {
    animation: fadeInUp 0.8s ease-out 0.2s both;
    opacity: 1;
    transform: none;
}
#inicio .reveal-right {
    animation: fadeInUp 0.8s ease-out 0.5s both;
    opacity: 1;
    transform: none;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 640px) {
    .gallery-item.col-span-2.row-span-2 {
        min-height: 200px;
    }
    .service-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== FOCUS STATES FOR ACCESSIBILITY ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #27ab83;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
