/**
 * AI-CAZARE.RO - Stylesheet Principal
 * Fișier: assets/css/style.css
 */

/* ============================================
   VARIABILE CSS
   ============================================ */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 50%, #084298 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-card {
    border-radius: 1rem;
    overflow: hidden;
}

.search-card .form-control,
.search-card .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.search-card .form-control:focus,
.search-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.search-card .btn-primary {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.card.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.card-img-top {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Property Card */
.property-card {
    height: 100%;
}

.property-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.property-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.property-card .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.property-card .favorite-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.property-card .favorite-btn.active i {
    color: var(--danger-color);
}

.property-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.property-card .price small {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--secondary-color);
}

/* ============================================
   PROPERTY TYPE ICONS
   ============================================ */
.property-type-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

.property-type-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.property-type-card:hover i {
    transform: scale(1.1);
}

/* ============================================
   RATING STARS
   ============================================ */
.rating {
    color: var(--warning-color);
}

.rating .bi-star-fill {
    color: var(--warning-color);
}

.rating .bi-star {
    color: #ddd;
}

.rating-number {
    background: var(--primary-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   AMENITIES
   ============================================ */
.amenity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--light-bg);
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    color: var(--secondary-color);
}

.amenity-badge i {
    color: var(--primary-color);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 0.125rem;
    border: none;
    color: var(--secondary-color);
}

.pagination .page-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   FILTERS SIDEBAR
   ============================================ */
.filters-sidebar {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.filters-sidebar h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* Price Range Slider */
.price-range {
    padding: 0.5rem 0;
}

.price-range input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

/* ============================================
   PROPERTY DETAIL PAGE
   ============================================ */
.property-gallery {
    position: relative;
}

.property-gallery .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.property-gallery .thumbnail-list {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}

.property-gallery .thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.property-gallery .thumbnail:hover,
.property-gallery .thumbnail.active {
    opacity: 1;
}

/* Booking Widget */
.booking-widget {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-lg);
    position: sticky;
    top: 100px;
}

.booking-widget .price-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.booking-widget .price-display small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--secondary-color);
}

/* ============================================
   CALENDAR
   ============================================ */
.availability-calendar {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--light-bg);
}

.calendar-day.available {
    background: #d1e7dd;
    color: var(--success-color);
}

.calendar-day.booked {
    background: #f8d7da;
    color: var(--danger-color);
    cursor: not-allowed;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   FORMS
   ============================================ */
.form-floating > label {
    color: var(--secondary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark-bg);
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MAP
   ============================================ */
.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .booking-widget {
        position: relative;
        top: 0;
        margin-top: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .search-card .row > div {
        margin-bottom: 0.5rem;
    }
    
    .property-card .card-img-top {
        height: 180px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.object-fit-cover {
    object-fit: cover;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: var(--box-shadow-lg);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: #fff;
}