/* Main CSS - ID Real Villas Theme */

/* Header menu styling */
.primary-menu-desktop,
.primary-menu-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu-desktop > li > a {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.625rem 0.95rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.primary-menu-desktop > li > a:hover {
    background-color: #f8fafc;
    color: #8F9779;
}

.primary-menu-desktop .current-menu-item > a,
.primary-menu-desktop .current_page_item > a,
.primary-menu-desktop .current-menu-ancestor > a {
    background-color: #f1f5f9;
    color: #8F9779;
    font-weight: 700;
}

.primary-menu-mobile > li > a {
    border-radius: 0.75rem;
    color: #374151;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.primary-menu-mobile > li > a:hover {
    background-color: #f3f4f6;
    color: #8F9779;
}

.primary-menu-mobile .current-menu-item > a,
.primary-menu-mobile .current_page_item > a,
.primary-menu-mobile .current-menu-ancestor > a {
    background-color: #eef2ff;
    color: #8F9779;
    font-weight: 700;
}

.dark .primary-menu-desktop > li > a {
    color: #d1d5db;
}

.dark .primary-menu-desktop > li > a:hover {
    background-color: #1f2937;
}

.dark .primary-menu-desktop .current-menu-item > a,
.dark .primary-menu-desktop .current_page_item > a,
.dark .primary-menu-desktop .current-menu-ancestor > a {
    background-color: #1f2937;
}

.dark .primary-menu-mobile > li > a {
    color: #e5e7eb;
}

.dark .primary-menu-mobile > li > a:hover {
    background-color: #1f2937;
}

.dark .primary-menu-mobile .current-menu-item > a,
.dark .primary-menu-mobile .current_page_item > a,
.dark .primary-menu-mobile .current-menu-ancestor > a {
    background-color: #1f2937;
}

/* Footer menu styling */
footer .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .menu-item {
    margin-bottom: 0.75rem;
}

footer .menu-item a {
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

footer .menu-item a:hover {
    color: #8F9779;
}

/* Form input styling for WordPress defaults */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}

/* Fix for range slider in archive filter */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

/* Pagination styling */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

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

.nav-links a:hover {
    background-color: #8F9779;
    border-color: #8F9779;
    color: #ffffff;
}

.nav-links .current {
    background-color: #8F9779;
    border: 1px solid #8F9779;
    color: #ffffff;
}

.dark .nav-links a {
    background-color: #1e293b;
    border-color: #374151;
    color: #e5e7eb;
}

.dark .nav-links a:hover {
    background-color: #8F9779;
    border-color: #8F9779;
}

/* Smooth page transitions */
body {
    opacity: 1;
    transition: opacity 0.15s ease-in-out;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8F9779;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #8F9779;
    outline-offset: 2px;
}

/* Animation for favorite button */
.favorite-btn:active .material-symbols-outlined {
    transform: scale(1.3);
}

/* Loading state for buttons */
button.loading {
    position: relative;
    color: transparent !important;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Single villa gallery */
.villa-gallery-thumbnails {
    scroll-snap-type: x proximity;
}

.villa-gallery-thumb {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    line-height: 0;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
}

.villa-gallery-thumb img {
    display: block;
}

/* 3D tour modal */
.villa-3d-modal-panel {
    height: 100dvh;
    transform: translateY(0);
    width: 100vw;
}

.villa-3d-modal.flex .villa-3d-modal-panel {
    transform: translateY(0);
}

.villa-3d-viewer-wrap {
    background: radial-gradient(circle at 50% 20%, #1f2937 0%, #030712 65%);
    height: 100%;
    min-height: 0;
    position: relative;
    width: 100%;
}

.villa-3d-viewer-wrap model-viewer {
    display: block;
    height: 100%;
    width: 100%;
}

.villa-3d-error {
    align-items: center;
    background: rgba(3, 7, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    color: #e5e7eb;
    display: flex;
    font-size: 0.875rem;
    left: 50%;
    max-width: calc(100% - 2rem);
    min-height: 2.5rem;
    padding: 0.5rem 0.875rem;
    position: absolute;
    top: 1rem;
    transform: translateX(-50%);
    z-index: 2;
    justify-content: center;
    text-align: center;
}

@media (min-width: 1024px) {
    .villa-gallery-thumbnails {
        scroll-snap-type: y proximity;
    }
}

@media (max-width: 767px) {
    .villa-3d-viewer-wrap {
        height: 100%;
        min-height: 0;
    }
}
