/* ============================================
   Guardería Valdefierro — Custom Styles
   Classic & Elegant · Charcoal + Coral
   ============================================ */

/* --- Custom properties --- */
:root {
    --color-charcoal-900: #141414;
    --color-charcoal-800: #1f1f1f;
    --color-charcoal-700: #2d2d2d;
    --color-charcoal-600: #3a3a3a;
    --color-charcoal-500: #4a4a4a;
    --color-charcoal-400: #666666;
    --color-charcoal-300: #888888;
    --color-charcoal-200: #b0b0b0;
    --color-charcoal-100: #e0e0e0;
    --color-coral-400: #e8735a;
    --color-coral-500: #d95a40;
}

/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* --- Selection --- */
::selection {
    background: rgba(232, 115, 90, 0.3);
    color: #f5f5f5;
}

/* --- Section labels --- */
.section-label {
    display: inline-block;
    letter-spacing: 0.15em;
}

/* --- Section titles --- */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
}

/* --- Smooth scroll offset for fixed nav --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.3s ease;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-coral-400);
    transition: width 0.3s ease;
}

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

/* --- Hero animations --- */
.hero-badge {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.5s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.9s;
}

.hero-stats {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 1.1s;
}

.stat-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 1.3s; }
.stat-item:nth-child(2) { animation-delay: 1.4s; }
.stat-item:nth-child(3) { animation-delay: 1.5s; }
.stat-item:nth-child(4) { animation-delay: 1.6s; }

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

/* --- Service cards --- */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, background-color 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Project cards --- */
.project-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Testimonial cards --- */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile menu --- */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Form inputs --- */
select option {
    background: #1f1f1f;
    color: #b0b0b0;
}

/* --- Parallax-like subtle effect on hero bg --- */
#hero-bg {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #e8735a;
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }

    section[id] {
        scroll-margin-top: 70px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 4px 0;
    }

    .stat-item {
        border-top: none !important;
        border-bottom: 1px solid rgba(102, 102, 102, 0.3) !important;
        padding-top: 0 !important;
        padding-bottom: 1rem !important;
    }

    .stat-item:last-child {
        border-bottom: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* --- Print styles --- */
@media print {
    #navbar, #mobile-menu, .hero-badge, .scroll-indicator {
        display: none !important;
    }

    body {
        background: white;
        color: #1a1a1a;
    }

    section {
        page-break-inside: avoid;
    }
}
