/* static/css/main.css - Tailwind Compatible Custom Styles */

/* ===== CSS VARIABLES - UNDERSUN ESTATE BRAND ===== */
:root {
    --primary-color: #474B57;
    --secondary-color: #f8f9fa;
    --accent-color: #F1B400;
    --tertiary-color: #616677;
    --text-dark: #474B57;
    --text-muted: #616677;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(71, 75, 87, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(71, 75, 87, 0.175);
}

/* Ensure interactive elements show the hand cursor consistently */
button,
[role="button"],
a[role="button"],
.nav-menu-item,
.cta-button {
    cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
    cursor: not-allowed;
}

/* ===== ОСНОВНЫЕ СТИЛИ ===== */
body {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.grecaptcha-badge {
    right: auto !important;
    left: 0 !important;
    bottom: 16px !important;
    width: 70px !important;
    overflow: hidden;
    transform-origin: left bottom;
    transition: width 0.3s ease;
}

.grecaptcha-badge:hover {
    width: 256px !important;
}

h1:not([class*="text-"]),
h2:not([class*="text-"]),
h3:not([class*="text-"]),
h4:not([class*="text-"]),
h5:not([class*="text-"]),
h6:not([class*="text-"]) {
    color: var(--primary-color);
}

.properties-container input[type="radio"],
.properties-container input[type="checkbox"] {
    accent-color: var(--primary-color);
}

/* ===== HERO СЕКЦИЯ ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: relative;
}

.hero-search::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    z-index: -1;
}

/* Hero search form styling */
.hero-search select,
.hero-search input {
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.hero-search select:focus,
.hero-search input:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(241, 180, 0, 0.15);
}

.hero-search button:hover {
    box-shadow: 0 12px 35px rgba(241, 180, 0, 0.3);
}

/* ===== КАРТОЧКИ НЕДВИЖИМОСТИ ===== */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== ИЗБРАННОЕ ===== */
.favorite-btn {
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

/* ===== КАРТА ===== */
.leaflet-container {
    border-radius: 15px;
    overflow: hidden;
}

.property-popup {
    font-size: 14px;
}

.property-popup .popup-image {
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.property-popup .popup-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.property-popup .popup-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
}

/* ===== ДЕТАЛЬНАЯ СТРАНИЦА НЕДВИЖИМОСТИ ===== */
.property-gallery {
    margin-bottom: 2rem;
}

.main-image {
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
}

.thumbnail-images {
    margin-top: 1rem;
}

.thumbnail {
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    transform: scale(1.05);
}

.property-info {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.property-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.feature-item i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 20px;
}

/* ===== ФИЛЬТРЫ ===== */
.filters-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h6 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* ===== WHATSAPP КНОПКА ===== */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .property-features {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .main-image {
        height: 300px;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 85px; /* Поднимаем выше мобильной контактной панели */
        right: 15px;
    }

    .grecaptcha-badge {
        bottom: 85px !important;
        left: 0 !important;
    }

    #cookie-consent-overlay {
        bottom: 90px !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #cookie-consent-overlay > div {
        max-height: none;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@media (max-width: 768px) {
    .property-card.fade-in-up {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===== УТИЛИТЫ ===== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== UNDERSUN ESTATE BRAND EFFECTS ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(71, 75, 87, 0.25);
}

.fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.border-radius-lg {
    border-radius: 15px !important;
}

.shadow-custom {
    box-shadow: var(--shadow-lg) !important;
}

/* ===== КАСТОМНЫЕ СКРОЛЛБАРЫ ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a5f;
}
