/* ============================================
   Finques RBJ - Global Styles
   ============================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glass panel effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}
.dark .glass-panel {
    background: rgba(15, 23, 42, 0.85);
}

/* Property image height for listings */
.property-image-height {
    height: 280px;
}
@media (min-width: 1024px) {
    .property-image-height {
        height: 100%;
        min-height: 280px;
    }
}

/* Animations - Faster and more responsive */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInDelay {
    0%, 20% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}

.animate-fade-in-delay {
    animation: fadeInDelay 0.7s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out 0.15s both;
}

/* Scroll reveal animation - Faster */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Header scroll effect */
header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 23, 23, 0.15);
}

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

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

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

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

/* Page transitions */
body {
    opacity: 0;
    animation: pageLoad 0.5s ease-out forwards;
}

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

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1b0e0e;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Hover underline effect for nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e81717;
    transition: width 0.3s ease;
}

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

/* Card hover glow effect */
.group:hover {
    box-shadow: 0 10px 30px rgba(232, 23, 23, 0.08);
}

/* Vender: Valor anadido section */
.seccion-valor-anadido {
    background: #ffffff;
    padding: 6.5rem 0 5.5rem;
}

.valor-anadido-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.titulo-valor-anadido {
    margin: 0;
    text-align: center;
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: #1b0e0e;
}

.grilla-servicios {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.servicio-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.75rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fdf9f8 100%);
    box-shadow: 0 14px 30px rgba(27, 14, 14, 0.08);
}

.servicio-icono {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8b0000;
    background: rgba(139, 0, 0, 0.1);
    font-size: 1.25rem;
}

.servicio-titulo {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 1.35rem;
    line-height: 1.25;
    color: #1b0e0e;
}

.servicio-texto {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #5c5050;
}

.servicio-texto strong {
    color: #8b0000;
}

.banda-estadisticas {
    width: 100%;
    margin-top: 3.5rem;
    padding-top: 2.25rem;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.estadistica-item {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    max-width: 420px;
}

.estadistica-icono {
    color: #8b0000;
    font-size: 1.55rem;
    line-height: 1;
}

.estadistica-item p {
    margin: 0;
    color: #2b1c1c;
    font-size: 1.05rem;
    line-height: 1.6;
}

.estadistica-item strong {
    color: #8b0000;
    font-weight: 700;
}

@media (min-width: 768px) {
    .valor-anadido-contenedor {
        padding: 0 1.5rem;
    }

    .grilla-servicios {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grilla-servicios {
        grid-template-columns: repeat(3, 1fr);
    }

    .grilla-servicios .servicio-card:nth-child(2) {
        transform: translateY(26px);
    }

    .grilla-servicios .servicio-card:nth-child(3) {
        transform: translateY(-8px);
    }
}

@media (max-width: 767px) {
    .seccion-valor-anadido {
        padding: 5rem 0 4.5rem;
    }

    .banda-estadisticas {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .estadistica-item {
        max-width: none;
        justify-content: center;
        text-align: center;
    }
}

/* Responsive fixes */
@media (max-width: 640px) {
    .glass-panel {
        padding: 1rem;
    }
}

/* Footer logo contrast on red background */
footer.bg-primary img[src*='logo.png'] {
    display: inline-block;
    background-color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
