/* Rincón Inmobiliario - Custom Styles */

/* ===== Global ===== */
html {
    scroll-behavior: smooth;
}

::selection {
    background: #c5c8ff;
    color: #1e1f66;
}

/* Remove WordPress admin bar margin on frontend */
html[lang] { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Stagger cards */
.grid > article:nth-child(1) { animation-delay: 0.05s; }
.grid > article:nth-child(2) { animation-delay: 0.1s; }
.grid > article:nth-child(3) { animation-delay: 0.15s; }
.grid > article:nth-child(4) { animation-delay: 0.2s; }
.grid > article:nth-child(5) { animation-delay: 0.25s; }
.grid > article:nth-child(6) { animation-delay: 0.3s; }

.grid > article {
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
}

/* ===== Pagination ===== */
.nav-links {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-links a {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.nav-links a:hover {
    background: #eef0ff;
    border-color: #525AFF;
    color: #525AFF;
}

.nav-links .current {
    background: #525AFF;
    color: white;
    border: 1px solid #525AFF;
}

/* ===== Line clamp ===== */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ===== Swiper Gallery ===== */
.gallery-main .swiper-button-next,
.gallery-main .swiper-button-prev {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0.5rem;
    backdrop-filter: blur(4px);
}

.gallery-main .swiper-button-next::after,
.gallery-main .swiper-button-prev::after {
    font-size: 1rem;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1 !important;
    border: 2px solid #525AFF;
    border-radius: 0.5rem;
}

/* ===== Forms ===== */
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
textarea {
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* ===== Property Card hover ===== */
article.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== WordPress Block Editor content ===== */
.prose h2 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.25rem; }
.prose a { color: #525AFF; text-decoration: underline; }
.prose a:hover { color: #1d4ed8; }

/* ===== Aspect ratio fallback ===== */
.aspect-\[4\/3\] {
    aspect-ratio: 4/3;
}

/* ===== Print ===== */
@media print {
    header, footer, aside, .no-print { display: none !important; }
    main { padding: 0 !important; }
}
