/**
 * Custom Pages CSS
 * Page-specific styles extracted from inline <style> blocks
 * Organized by page/component
 */

/* =============================================================================
   INDEX PAGE - Welcome Loader
   ============================================================================= */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8e9d0;
    /* Warm desert-like background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid #d4a762;
    /* Golden desert color */
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1.5s linear infinite;
    margin-bottom: 30px;
}

.welcome-message {
    text-align: center;
    max-width: 80%;
    color: #5a3921;
    /* Dark brown for text */
}

.welcome-message h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #8b4513;
    /* Saddle brown */
}

.welcome-message p {
    font-size: 1.2rem;
    line-height: 1.6;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.content {
    padding: 20px;
    display: none;
    /* Hidden until loader disappears */
}

/* =============================================================================
   INDEX PAGE - Rooms Section
   ============================================================================= */
/* Improve room image layout: use object-fit to avoid empty spaces and ensure consistent heights */
.rooms-section .image-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.rooms-section .image-box figure.image-2 {
    margin: 0;
    height: 220px;
    display: block;
}

.rooms-section .image-box figure.image-2 img,
.rooms-section .image-box figure.image-2 .cover-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Layout spacing between room cards */
.rooms-section .row {
    margin-left: -12px;
    margin-right: -12px;
}

.rooms-section .room-block {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
}

/* desktop: slightly larger horizontal gutters and vertical rhythm */
@media (min-width: 992px) {
    .rooms-section .row {
        margin-left: -18px;
        margin-right: -18px;
    }

    .rooms-section .room-block {
        padding-left: 18px;
        padding-right: 18px;
        margin-bottom: 30px;
    }

    .rooms-section .image-box figure.image-2 {
        height: 240px;
    }
}

/* small screens: reduce image height to save vertical space and tighten gutters */
@media (max-width:767px) {
    .rooms-section .image-box figure.image-2 {
        height: 150px;
    }

    .rooms-section .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .rooms-section .room-block {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 18px;
    }
}

/* ensure placeholder figure doesn't collapse if image missing */
.rooms-section .image-box figure.image-2:empty {
    background: #efefef;
    height: 160px;
}

/* =============================================================================
   BOOKING PAGE
   ============================================================================= */
/* Small responsive tweaks for booking page */
@media (max-width: 767px) {

    .booking-details,
    .booking-summary {
        padding: 10px;
    }

    .file-upload-container {
        min-height: 120px;
    }

    .small {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {

    .booking-details,
    .booking-summary {
        padding: 18px;
    }
}

#promo-area .small {
    max-width: 220px;
}

#price-breakdown .total {
    font-weight: 700;
    color: #8B4513;
}

/* File upload styling */
.file-upload-container {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-container:hover {
    border-color: #8B4513;
    background-color: #f9f9f9;
}

.file-upload-container.drag-over {
    border-color: #4CAF50;
    background-color: #e8f5e9;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 10px;
}

.upload-text {
    color: #666;
    margin-bottom: 5px;
}

.upload-subtext {
    color: #999;
    font-size: 12px;
}

.file-preview {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-preview.active {
    display: flex;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-info {
    text-align: center;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.file-size {
    font-size: 12px;
    color: #999;
}

.remove-file {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-file:hover {
    background-color: #c82333;
}

.upload-progress {
    display: none;
    width: 100%;
    max-width: 300px;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.upload-status {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.upload-error {
    display: none;
    color: #dc3545;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-top: 10px;
}

.upload-error.active {
    display: block;
}

.retry-upload {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
}

.retry-upload:hover {
    background-color: #0056b3;
}

/* =============================================================================
   ROOM RESULTS PAGE
   ============================================================================= */
.room-results-page .search-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.room-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   ROOM DETAILS PAGE
   ============================================================================= */
.room-details-page .main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.room-details-page .thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.room-details-page .thumbnail {
    flex: 0 0 auto;
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.room-details-page .thumbnail:hover {
    opacity: 0.7;
}

/* =============================================================================
   TESTIMONIALS PAGE
   ============================================================================= */
.testimonials-page .review-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.testimonials-page .review-rating {
    color: #f39c12;
    font-size: 18px;
    margin-bottom: 10px;
}

/* =============================================================================
   GALLERY PAGE
   ============================================================================= */
.gallery-page .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-page .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.gallery-page .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-page .gallery-item:hover img {
    transform: scale(1.1);
}

/* =============================================================================
   BOOKING CONFIRMATION PAGE
   ============================================================================= */
.confirmation-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 40px 0;
}

.confirmation-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-icon {
    font-size: 80px;
    color: #28a745;
    text-align: center;
    margin-bottom: 20px;
}

.booking-reference {
    background: #f8f9fa;
    border-left: 4px solid #8B4513;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.booking-reference strong {
    color: #8B4513;
    font-size: 1.2em;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.text-brand {
    color: #8B4513 !important;
}

.bg-brand {
    background-color: #8B4513 !important;
}

.btn-brand {
    background-color: #8B4513;
    border-color: #8B4513;
    color: #fff;
}

.btn-brand:hover {
    background-color: #704010;
    border-color: #704010;
    color: #fff;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */
@media (max-width: 768px) {
    .welcome-message h1 {
        font-size: 1.8rem;
    }

    .welcome-message p {
        font-size: 1rem;
    }

    .confirmation-card {
        padding: 20px;
    }

    .gallery-page .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .loader {
        width: 60px;
        height: 60px;
    }

    .welcome-message h1 {
        font-size: 1.5rem;
    }

    .booking-reference {
        font-size: 0.9em;
    }
}
