/* ============================================
   DENTAL EL TRÓPICO — Custom Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --tropical-500: #56d33e;
    --tropical-600: #3ab52a;
    --palm-600: #16a34a;
    --palm-800: #166534;
    --palm-900: #14532d;
    --sand-400: #f2d054;
}

/* ---------- Smooth scroll ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* ---------- Selection ---------- */
::selection {
    background-color: rgba(86, 211, 62, 0.2);
    color: #14532d;
}

/* ---------- Hero pattern (subtle topographic) ---------- */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .nav-link:hover {
    color: #14532d;
    background: rgba(86, 211, 62, 0.08);
}

#navbar.scrolled .nav-scrolled-text {
    color: #14532d !important;
}

#navbar.scrolled .nav-scrolled-subtext {
    color: #6b7280 !important;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: rgba(86, 211, 62, 0.08);
    color: #14532d;
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ---------- Scroll reveal animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
}

.animate-on-scroll.visible {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Service cards ---------- */
.service-card {
    background: white;
    padding: 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid #f3f4f6;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #56d33e, #16a34a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(86, 211, 62, 0.06);
    border-color: rgba(86, 211, 62, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon-wrap {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(86, 211, 62, 0.1), rgba(22, 163, 74, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #16a34a;
    transition: all 0.4s;
}

.service-card:hover .service-icon-wrap {
    background: linear-gradient(135deg, #56d33e, #16a34a);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

/* ---------- Testimonial cards ---------- */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #f3f4f6;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: rgba(86, 211, 62, 0.15);
}

/* ---------- Gallery cards ---------- */
.gallery-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover {
    transform: translateY(-4px);
}

/* ---------- WhatsApp FAB pulse ---------- */
.whatsapp-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    border: 2px solid #25D366;
    animation: whatsappPulse 2s ease-out infinite;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ---------- Lightbox ---------- */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox.fade-in {
    animation: lightboxIn 0.3s ease forwards;
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#lightbox-img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Form select arrow ---------- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* ---------- Focus states for accessibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #56d33e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 640px) {
    .service-card {
        padding: 1.25rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* ---------- Print styles ---------- */
@media print {
    #navbar, #whatsapp-fab, #lightbox {
        display: none !important;
    }
}