/* ============================================
   CUIDATHI - Custom Styles (Tailwind complement)
   ============================================ */

/* ---------- Base ---------- */
.font-titulos { font-family: 'Playfair Display', Georgia, serif; }
.font-cuerpo { font-family: 'Lato', system-ui, sans-serif; }
.scroll-smooth { scroll-behavior: smooth; }

/* ---------- Selection ---------- */
::selection {
    background: rgba(124, 144, 130, 0.25);
    color: #3E2C23;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F0E8; }
::-webkit-scrollbar-thumb {
    background: rgba(124, 144, 130, 0.35);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124, 144, 130, 0.55); }

/* ---------- Focus ---------- */
*:focus-visible {
    outline: 2px solid #7C9082;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Fade-in animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for children */
.fade-in-stagger > *:nth-child(1) { transition-delay: 0ms; }
.fade-in-stagger > *:nth-child(2) { transition-delay: 100ms; }
.fade-in-stagger > *:nth-child(3) { transition-delay: 200ms; }
.fade-in-stagger > *:nth-child(4) { transition-delay: 300ms; }
.fade-in-stagger > *:nth-child(5) { transition-delay: 400ms; }
.fade-in-stagger > *:nth-child(6) { transition-delay: 500ms; }

/* Scale-in variant */
.scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Slide from left */
.slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Header shadow on scroll ---------- */
#site-header.scrolled {
    box-shadow: 0 1px 12px rgba(62, 44, 35, 0.06);
}

/* ---------- Form styles ---------- */
.form-cuidathi input[type="text"],
.form-cuidathi input[type="email"],
.form-cuidathi input[type="tel"],
.form-cuidathi select,
.form-cuidathi textarea {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 0.92rem;
    color: #3E2C23;
    background: #FAF8F5;
    border: 1.5px solid rgba(62,44,35,0.12);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    appearance: none;
    -webkit-appearance: none;
}
.form-cuidathi input:focus,
.form-cuidathi select:focus,
.form-cuidathi textarea:focus {
    outline: none;
    border-color: #7C9082;
    box-shadow: 0 0 0 4px rgba(124,144,130,0.12);
    background: #fff;
}
.form-cuidathi textarea { resize: vertical; min-height: 100px; }
.form-cuidathi select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C9082' 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.9rem center;
    padding-right: 2.5rem;
}
.form-response {
    margin-top: 0.8rem;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    display: none;
    animation: formFadeIn 0.35s ease-out;
}
.form-response.success {
    display: block;
    background: rgba(107,142,111,0.1);
    color: #4A5D4E;
    border: 1px solid rgba(107,142,111,0.25);
}
.form-response.error {
    display: block;
    background: rgba(198,123,92,0.08);
    color: #A86045;
    border: 1px solid rgba(198,123,92,0.25);
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Card hover effect ---------- */
.hover-card {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(62,44,35,0.08);
}

/* ---------- Testimonial styling ---------- */
.testimonio {
    border-left: 4px solid #D4A853;
    position: relative;
    transition: box-shadow 0.3s ease;
}
.testimonio:hover {
    box-shadow: 0 4px 20px rgba(62,44,35,0.06);
}
.testimonio::before {
    content: '"';
    position: absolute;
    top: -6px;
    left: 14px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4rem;
    color: #D4A853;
    opacity: 0.15;
    line-height: 1;
}

/* ---------- FAQ Details ---------- */
details.cuidathi-details {
    background: #FAF8F5;
    border: 1px solid rgba(62,44,35,0.06);
    border-radius: 14px;
    margin-bottom: 0.35rem;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
details.cuidathi-details[open] {
    border-color: #9BAFA0;
    box-shadow: 0 2px 8px rgba(62,44,35,0.04);
}
details.cuidathi-details summary {
    padding: 0.9rem 1.3rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}
details.cuidathi-details summary:hover {
    background: rgba(124, 144, 130, 0.04);
}
details.cuidathi-details summary::-webkit-details-marker { display: none; }
details.cuidathi-details summary::after {
    content: '+';
    font-size: 1.3rem;
    color: #7C9082;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
details.cuidathi-details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
details.cuidathi-details > *:not(summary) {
    padding: 0 1.3rem 1.1rem;
    color: #7A6B60;
}

/* ---------- Timeline dot ---------- */
.timeline-dot::before {
    content: '';
    position: absolute;
    left: -1.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #7C9082;
    border: 2.5px solid #FAF8F5;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(62,44,35,0.08);
    transition: transform 0.3s ease, background 0.3s ease;
}
.timeline-dot:hover::before {
    transform: translateY(-50%) scale(1.35);
    background: #4A5D4E;
}

/* ---------- Section divider ---------- */
.section-divider {
    border-bottom: 1px solid rgba(62,44,35,0.06);
}

/* ---------- Responsive image ---------- */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ---------- Smooth number counter emphasis ---------- */
.stat-number {
    font-feature-settings: "tnum";
}

/* ---------- Gradient text utility ---------- */
.text-gradient {
    background: linear-gradient(135deg, #7C9082, #4A5D4E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Subtle pulsing dot for live indicators ---------- */
.pulse-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #7C9082;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ---------- Backdrop blur for safari ---------- */
@supports (-webkit-backdrop-filter: blur(20px)) {
    .bg-blanco\/95 {
        -webkit-backdrop-filter: blur(20px);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .hero-min-h {
        min-height: 60vh;
    }
}