/* Harbor Cleaning & Maintenance - Shared Styles */
/* Custom animations and transitions */

/* ===== DARK MODE THEME ===== */
/* Dark mode uses the dark-logo color palette: deep red, silver, white on dark */
html.dark body {
    background-color: #111111;
    color: #e2e2e2;
}
html.dark .bg-white { background-color: #161616 !important; }
html.dark .bg-surface-cream { background-color: #1c1c1c !important; }
html.dark .bg-surface-warm { background-color: #1a1a1a !important; }

/* Nav & header */
html.dark #navbar { background-color: #111111 !important; }
html.dark .nav-scrolled {
    background: rgba(17, 17, 17, 0.95) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}
html.dark .top-info-bar {
    background: linear-gradient(to right, #5c1222, #8B1A2B) !important;
}

/* Text */
html.dark .text-obsidian { color: #f0f0f0 !important; }
html.dark .text-text-secondary { color: #999999 !important; }
html.dark .text-harbor-blue { color: #E04B64 !important; }
html.dark .text-harbor-green { color: #d4d4d4 !important; }
html.dark .text-harbor-dark { color: #F06080 !important; }

/* Dark mode filled backgrounds = deep red from dark logo */
html.dark .bg-harbor-blue { background-color: #B91C3C !important; }
html.dark .bg-harbor-dark { background-color: #8B1A2B !important; }
html.dark .bg-harbor-green { background-color: #9B1B33 !important; }
html.dark .from-harbor-blue { --tw-gradient-from: #B91C3C !important; }
html.dark .to-harbor-blue { --tw-gradient-to: #B91C3C !important; }
html.dark .from-harbor-dark { --tw-gradient-from: #8B1A2B !important; }
html.dark .to-harbor-dark { --tw-gradient-to: #8B1A2B !important; }

/* Gradient text for dark mode */
html.dark .gradient-text {
    background: linear-gradient(135deg, #F06080, #E04B64, #d4d4d4) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Borders & surfaces - red for decorative outlines */
html.dark .border-outline-light { border-color: #2a2a2a !important; }
html.dark .border-harbor-blue { border-color: #B91C3C !important; }
html.dark .border-harbor-blue\/5 { border-color: rgba(185, 28, 60, 0.05) !important; }
html.dark .border-harbor-blue\/10 { border-color: rgba(185, 28, 60, 0.1) !important; }
html.dark .border-harbor-blue\/20 { border-color: rgba(185, 28, 60, 0.2) !important; }

/* Cards & containers */
html.dark .service-card { border-color: #2a2a2a !important; }
html.dark .service-card:hover {
    box-shadow: 0 12px 40px -8px rgba(185, 28, 60, 0.15);
}
html.dark .ambient-shadow {
    box-shadow: 0 4px 20px -2px rgba(185, 28, 60, 0.06);
}

/* Colored backgrounds with opacity - red tint for decorative icon circles */
html.dark .bg-harbor-blue\/10 { background-color: rgba(185, 28, 60, 0.12) !important; }
html.dark .bg-harbor-green\/10 { background-color: rgba(185, 28, 60, 0.08) !important; }
html.dark .bg-harbor-blue\/5 { background-color: rgba(185, 28, 60, 0.06) !important; }
html.dark .bg-harbor-green\/5 { background-color: rgba(185, 28, 60, 0.04) !important; }
html.dark .bg-surface-cream\/30 { background-color: rgba(30, 30, 30, 0.5) !important; }

/* Step number shadows - red glow */
html.dark .shadow-harbor-blue\/20 { --tw-shadow-color: rgba(185, 28, 60, 0.25) !important; }
html.dark .shadow-harbor-green\/20 { --tw-shadow-color: rgba(185, 28, 60, 0.2) !important; }
html.dark .shadow-harbor-dark\/20 { --tw-shadow-color: rgba(139, 26, 43, 0.25) !important; }

/* Footer */
html.dark footer { background-color: #0a0a0a !important; }
html.dark .border-slate-800 { border-color: #1f1f1f !important; }

/* FAQ in dark */
html.dark .faq-answer p { color: #999 !important; }

/* Form elements */
html.dark input, html.dark select, html.dark textarea {
    background-color: #1c1c1c;
    border-color: #2a2a2a;
    color: #e2e2e2;
}
html.dark input:focus, html.dark select:focus, html.dark textarea:focus {
    border-color: #E04B64;
    box-shadow: 0 0 0 3px rgba(185, 28, 60, 0.15);
}

/* Nav link underlines */
html.dark .nav-link::after { background: #E04B64; }

/* Dot pattern */
html.dark .dot-pattern {
    background-image: radial-gradient(circle, #B91C3C 1px, transparent 1px) !important;
}

/* Scroll progress */
html.dark .scroll-progress {
    background: linear-gradient(90deg, #8B1A2B, #E04B64) !important;
}

/* Mobile menu */
html.dark .mobile-menu { background-color: #161616 !important; }

/* Obsidian testimonial block stays dark */
html.dark .bg-obsidian { background-color: #0a0a0a !important; }

/* Theme toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    background: transparent;
}
.theme-toggle:hover {
    border-color: #0284C7;
    background: rgba(2, 132, 199, 0.05);
}
html.dark .theme-toggle {
    border-color: #3a3a3a;
}
html.dark .theme-toggle:hover {
    border-color: #B91C3C;
    background: rgba(185, 28, 60, 0.08);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* Logo switching */
.logo-light { display: block; }
.logo-dark { display: none; }
html.dark .logo-light { display: none; }
html.dark .logo-dark { display: block; }

/* Smooth theme transition */
html { transition: background-color 0.3s ease; }
html * { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
/* Exclude animations that already have transitions */
html .reveal, html .reveal-left, html .reveal-right, html .reveal-scale,
html .hero-title, html .hero-subtitle, html .hero-cta, html .hero-stats, html .hero-image, html .hero-badge {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== CTA BUTTON - Always vibrant, never dark ===== */
.btn-cta {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}
.btn-cta:hover {
    background: linear-gradient(135deg, #16A34A, #15803D) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45) !important;
    transform: translateY(-1px);
}
.btn-cta:active {
    transform: scale(0.97);
}
.btn-cta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}
.btn-cta:hover::after {
    width: 300px;
    height: 300px;
}
/* Dark mode - keep CTA vibrant */
html.dark .btn-cta {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}
html.dark .btn-cta:hover {
    background: linear-gradient(135deg, #16A34A, #15803D) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
}

/* Nav CTA pill - always vibrant */
.btn-nav-cta {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease !important;
}
.btn-nav-cta:hover {
    background: linear-gradient(135deg, #16A34A, #15803D) !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4) !important;
    transform: translateY(-1px);
}
html.dark .btn-nav-cta {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25);
}
html.dark .btn-nav-cta:hover {
    background: linear-gradient(135deg, #16A34A, #15803D) !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35) !important;
}

/* ===== DISPLAY FONT (matches logo) ===== */
.font-display {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 120ms; }
.stagger > *:nth-child(3) { transition-delay: 240ms; }
.stagger > *:nth-child(4) { transition-delay: 360ms; }
.stagger > *:nth-child(5) { transition-delay: 480ms; }
.stagger > *:nth-child(6) { transition-delay: 600ms; }

/* ===== HERO ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.2); }
    50% { box-shadow: 0 0 30px 10px rgba(14, 165, 233, 0.1); }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-title { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.hero-subtitle { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.hero-cta { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }
.hero-stats { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both; }
.hero-image { animation: scaleIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.hero-badge { animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.nav-animate { animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #0284C7, #075985, #5A9A1F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== AMBIENT SHADOWS ===== */
.ambient-shadow {
    box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.08);
}
.ambient-shadow-hover:hover {
    box-shadow: 0 8px 40px -4px rgba(2, 132, 199, 0.15);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-menu-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ===== SMOOTH SCROLL & VIEWPORT FIX ===== */
html {
    scroll-behavior: smooth;
    overflow-x: clip;
}
body {
    width: 100%;
    min-height: 100vh;
}
*, *::before, *::after {
    box-sizing: border-box;
}
img, video, iframe {
    max-width: 100%;
    height: auto;
}
iframe {
    height: 100%;
}
section, footer {
    max-width: 100vw;
}

/* ===== BUTTON EFFECTS (global) ===== */
/* All buttons and link-buttons get smooth transitions */
a[href], button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
a[href]:active, button:active {
    transform: scale(0.96);
}

/* Secondary / outline buttons */
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid currentColor;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn-secondary:active {
    transform: scale(0.96);
}
html.dark .btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Any remaining inline-styled buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-primary:active {
    transform: scale(0.96);
}

/* ===== CARD HOVER EFFECTS ===== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px -8px rgba(2, 132, 199, 0.18);
}

/* ===== COUNTER ANIMATION ===== */
.counter { font-variant-numeric: tabular-nums; }

/* ===== DECORATIVE ELEMENTS ===== */
.blob {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-morph 8s ease-in-out infinite;
    pointer-events: none;
    max-width: 100%;
}
@keyframes blob-morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ===== PARALLAX DOTS ===== */
.dot-pattern {
    background-image: radial-gradient(circle, #0284C7 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.06;
}

/* ===== FORM STYLES ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ===== FAQ ACCORDION ===== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}
.faq-answer.open {
    max-height: 300px;
}
.faq-icon {
    transition: transform 0.3s ease;
}
.faq-icon.open {
    transform: rotate(180deg);
}

/* ===== LOADING SHIMMER ===== */
.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(14, 165, 233, 0.05) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===== NAVBAR SCROLL EFFECT ===== */
.nav-scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
    z-index: 50;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 640px) {
    .hero-title-text { font-size: 2rem !important; line-height: 2.5rem !important; }
    .top-info-bar { display: none !important; }
    footer .grid { gap: 2rem !important; }
}
@media (max-width: 380px) {
    .hero-title-text { font-size: 1.75rem !important; line-height: 2.25rem !important; }
    .hero-stats .counter { font-size: 1.25rem !important; }
}

/* ===== IMAGE HOVER ZOOM ===== */
.img-zoom { transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.group:hover .img-zoom { transform: scale(1.07); }

/* ===== STEP NUMBER ANIMATION ===== */
.step-number {
    transition: all 0.4s ease;
}
.step-number:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(2, 132, 199, 0.1);
}

/* ===== LEARN MORE LINKS ===== */
a[href].text-harbor-blue:not(.btn-cta):not(.btn-nav-cta):not(.btn-secondary) {
    transition: all 0.25s ease;
}
a[href].text-harbor-blue:not(.btn-cta):not(.btn-nav-cta):not(.btn-secondary):hover {
    opacity: 0.8;
}

/* ===== ACTIVE NAV INDICATOR ===== */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0284C7;
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    animation: whatsapp-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.5s both;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}
.whatsapp-float:active {
    transform: scale(0.95);
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}
.whatsapp-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: wa-pulse 2s ease-out infinite;
}
@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}
@keyframes whatsapp-entrance {
    from { opacity: 0; transform: scale(0.5) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== MAP THEME ===== */
/* Light mode: show light map, hide dark */
#mapDark { display: none; }
#mapLight { display: block; }
html.dark #mapDark { display: block; }
html.dark #mapLight { display: none; }

/* Top fade matches bg */
.map-top-fade {
    background: linear-gradient(to bottom, white, transparent) !important;
}
html.dark .map-top-fade {
    background: linear-gradient(to bottom, #161616, transparent) !important;
}

/* Red tint border in dark mode */
html.dark #mapContainer {
    border-top: 2px solid rgba(185, 28, 60, 0.3);
}
#mapContainer {
    border-top: 2px solid rgba(2, 132, 199, 0.15);
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 79px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0284C7, #5A9A1F);
    z-index: 49;
    transition: width 0.1s linear;
    pointer-events: none;
}
