:root {
    --primary-blue: #007bff;
    --secondary-blue: #0056b3;
    --accommodation-gold: #ffc107;
    --accommodation-green: #28a745;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --box-shadow-hover: 0 4px 16px rgba(13, 110, 253, 0.15);
}

.accommodations-page {
    background: #f8f9fa;
}

.hero-accommodations {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.9), rgba(255, 193, 7, 0.8)),
                url('../img/homeimage.webp') center/cover no-repeat;
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-accommodations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.7), rgba(255, 193, 7, 0.6));
}

.hero-accommodations .container {
    position: relative;
    z-index: 2;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form .input-group {
    box-shadow: var(--box-shadow);
    border-radius: 50px;
    overflow: hidden;
}

.search-form .input-group-text {
    border: none;
    padding: 1rem 1.5rem;
}

.search-form .form-control {
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.search-form .btn {
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0 50px 50px 0;
}

.stats-section {
    background: var(--light-gray);
    margin-top: -3rem;
    padding-top: 5rem !important;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(13,110,253,0.12);
}

.stat-icon {
    background: linear-gradient(135deg, var(--primary-blue), var(--accommodation-gold));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.filters-bar {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.filters-bar .form-select,
.filters-bar .form-check-input {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.filters-bar .form-select:focus,
.filters-bar .form-check-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filters-bar .form-check-label {
    font-weight: 500;
    color: var(--medium-gray);
    cursor: pointer;
}

.filters-bar .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.results-header h3 {
    font-weight: 700;
    color: #333;
}

.active-filters .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.active-filters .badge a {
    text-decoration: none;
    opacity: 0.8;
}

.active-filters .badge a:hover {
    opacity: 1;
}

.accommodations-grid {
    margin-top: 2rem;
}

.accommodation-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    align-items: stretch;
    display: flex;
    flex-direction: column;
}

.accommodation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(13,110,253,0.15);
}

.accommodation-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.accommodation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.accommodation-card:hover .accommodation-image img {
    transform: scale(1.05);
}

.accommodation-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.accommodation-badges .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.type-badge.type-hotel {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    color: white;
}

.type-badge.type-bb {
    background: linear-gradient(135deg, #28a745, var(--accommodation-green)) !important;
    color: white;
}

.type-badge.type-casa {
    background: linear-gradient(135deg, #ffc107, var(--accommodation-gold)) !important;
    color: white;
}

.type-badge.type-ostello {
    background: linear-gradient(135deg, #6f42c1, #e83e8c) !important;
    color: white;
}

.accommodation-card .card-body {
    padding: 1.5rem;
}

.accommodation-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.accommodation-card .card-text {
    line-height: 1.5;
    margin-bottom: 1rem;
}

.accommodation-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: var(--light-gray);
    color: var(--medium-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.accommodation-card .btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.accommodation-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.empty-state,
.alert {
    border-radius: var(--border-radius);
}

.empty-state {
    padding: 4rem 2rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.empty-state i {
    color: var(--medium-gray);
}

.empty-state h4 {
    color: #333;
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .hero-accommodations {
        min-height: 50vh;
        padding: 3rem 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .filters-bar {
        padding: 1.5rem;
    }
    
    .filters-bar .row > div {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-accommodations {
        min-height: 40vh;
        padding: 2rem 0;
    }
    
    .hero-accommodations h1 {
        font-size: 2rem;
    }
    
    .stats-section {
        margin-top: -2rem;
        padding-top: 4rem !important;
    }
    
    .stat-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .accommodation-image {
        height: 180px;
    }
    
    .filters-bar {
        padding: 1rem;
    }
    
    .search-form .btn {
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .search-form .input-group {
        flex-direction: column;
        border-radius: var(--border-radius);
    }
    
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn {
        border-radius: var(--border-radius) !important;
        margin-bottom: 0.5rem;
    }
    
    .search-form .btn {
        margin-bottom: 0;
    }
    
    .filters-bar .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .accommodation-badges {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }

    .pagination-wrapper,
    .pagination-wrapper nav,
    .pagination-wrapper nav > div {
        justify-content: center;
        display: flex;
    }

    .pagination {
        justify-content: center;
    }

    .pagination .page-item {
        display: none;
    }

    .pagination .page-item:first-child,
    .pagination .page-item:last-child,
    .pagination .page-item.active,
    .pagination .page-item.active + .page-item,
    .pagination .page-item.active + .page-item + .page-item,
    .pagination .page-item:has(+ .page-item.active),
    .pagination .page-item:has(+ .page-item + .page-item.active) {
        display: block;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.service-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.service-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #495057;
    transition: all 0.3s ease;
}

.service-icon.active {
    background: #28a745;
    color: white;
}

.service-icon:hover {
    transform: scale(1.2);
}

.results-header h3 {
    color: #333;
    font-weight: 600;
}

.active-filters .badge {
    font-size: 0.875rem;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.hero-section {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('https://plus.unsplash.com/premium_photo-1661964248724-9692b487aa01?q=80&w=1652&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    background: #ff6b42;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,66,0.4);
}

.hero-cta:hover {
    background: #e55a36;
    box-shadow: 0 6px 20px rgba(255,107,66,0.5);
    color: white;
}

.main-content {
    padding: 5rem 0;
}

.info-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.info-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-text {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #e9ecef;
}

.feature-icon {
    color: #007bff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: #666;
    font-size: 0.9rem;
}

.cta-section {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.review-cta-section {
    background: #f8f9fa;
    padding: 4rem 0;
    text-align: center;
    color: #333;
}

.review-cta-section .cta-title {
    color: #333;
}

.review-cta-section .cta-text {
    color: #666;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: white;
    color: #007bff;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    color: #0056b3;
}

.map-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

#map {
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

.reviews-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0;
}

.overall-rating-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rating-number {
    font-size: 4rem;
    font-weight: 700;
    color: #ffc107;
    line-height: 1;
    margin-bottom: 1rem;
}

.rating-stars {
    color: #ffc107;
    font-size: 1.5rem;
}

.rating-stars.small {
    font-size: 1.2rem;
}

.rating-stars.mini {
    font-size: 0.9rem;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    vertical-align: baseline;
}

.rating-stars.mini i {
    line-height: 1;
}

.rating-desc {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

.rating-breakdown {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    height: 100%;
}

.rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.rating-row:last-child {
    margin-bottom: 0;
}

.rating-label {
    font-weight: 600;
    color: #333;
    min-width: 140px;
    font-size: 0.95rem;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff8c00);
    transition: width 0.3s ease;
}

.rating-value {
    font-weight: 600;
    color: #333;
    min-width: 30px;
    text-align: right;
}

.btn-review {
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-review:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
    color: white;
}

.reviews-list {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

.review-item {
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-item:first-child {
    padding-top: 0;
}

.review-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-rating {
    flex-shrink: 0;
}

.review-content {
    margin-bottom: 1.5rem;
}

.review-content p {
    color: #555;
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

.review-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-rating {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
}

.category-name {
    color: #666;
    font-weight: 500;
    line-height: 1;
}

.modal-content {
    border-radius: 15px;
    border: none;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.rating-categories {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.rating-category {
    margin-bottom: 1rem;
}

.rating-category:last-child {
    margin-bottom: 0;
}

.category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.rating-input {
    display: flex;
    gap: 0.25rem;
    font-size: 1.8rem;
}

.rating-input i {
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

.rating-input i:hover {
    transform: scale(1.2);
    color: #ffc107 !important;
}

.rating-input i.fas {
    color: #ffc107;
}

.modal-footer {
    background: #f8f9fa;
    border-top: none;
    padding: 1.5rem;
}

#accommodationReviewForm {
    background-color: wheat;
}

/* Favorite Button Styles */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover {
    transform: scale(1.15);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.favorite-btn i {
    font-size: 20px;
    color: #e74c3c;
    transition: all 0.3s ease;
}

.favorite-btn .fas.fa-heart {
    animation: heartbeat 0.5s ease;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
}

.favorite-btn:active {
    transform: scale(0.95);
}

/* Loading state per favorite button */
.favorite-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.favorite-btn.loading i {
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .rating-number {
        font-size: 3rem;
    }

    .rating-breakdown {
        margin-top: 2rem;
    }

    .rating-label {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .review-categories {
        flex-direction: column;
        gap: 0.5rem;
    }

    .category-rating {
        justify-content: space-between;
    }

    .reviewer-info {
        gap: 0.75rem;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .review-item:hover {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .rating-input {
        font-size: 1.5rem;
    }

    .modal-dialog {
        margin: 1rem;
    }
}