/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors (Default) */
    --bg-primary: #020617;
    --bg-secondary: #020617;
    --border-color: #1e293b;
    --primary-accent: #38bdf8;
    --secondary-accent: #22c55e;
    --text-primary: #e5e7eb;
    --text-muted: #94a3b8;
    --card-bg: #020617;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    /* Light Theme Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --border-color: #e5e7eb;
    --primary-accent: #2563eb;
    --secondary-accent: #16a34a;
    --text-primary: #0f172a;
    --text-muted: #475569;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-accent);
    border: 2px solid var(--primary-accent);
}

.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: white;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--primary-accent);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-link.active {
    color: var(--primary-accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-accent);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.theme-toggle i {
    position: absolute;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle .fa-moon {
    color: #fbbf24;
}

.theme-toggle .fa-sun {
    color: #f59e0b;
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    animation: fadeInUp 0.8s ease-out;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-color);
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

/* Room Cards */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.room-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.room-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-color),
        0 0 0 1px var(--primary-accent);
}

.room-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.room-card:hover .room-image img {
    transform: scale(1.1);
}

.availability-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.availability-badge.available {
    background-color: var(--secondary-accent);
}

.availability-badge.limited {
    background-color: #f59e0b;
}

.availability-badge.unavailable {
    background-color: #ef4444;
}

.room-info {
    padding: 1.5rem;
}

.room-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.room-meta i {
    margin-right: 5px;
    color: var(--primary-accent);
}

.room-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
    background-color: var(--bg-secondary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.testimonial-rating {
    color: #fbbf24;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.testimonial-author strong {
    display: block;
    color: var(--text-primary);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Ratings */
.ratings {
    padding: 4rem 0;
}

.ratings-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.ratings-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.rating-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.rating-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
}

.rating-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.rating-icon {
    font-size: 2rem;
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
}

.rating-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li i {
    margin-right: 10px;
    color: var(--primary-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .ratings-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .ratings-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .btn {
        width: 100%;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Room Details Page Styles
   ========================================= */

/* Layout & Breadcrumb */
.room-details-page {
    padding: 2rem 0 4rem;
}

.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb i {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.room-details-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Left: Gallery/Info, Right: Contact/Actions */
    gap: 2rem;
    align-items: start;
}

/* Left Column */
.room-details-left {
    min-width: 0;
    /* Prevents grid blowout */
}

/* Image Gallery (Hero Slider) - CRITICAL FIX */
.room-gallery {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    /* Ensures images don't overflow */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.gallery-main {
    position: relative;
    width: 100%;
    /* Hero height - adjustable */
    height: 500px;
    background: #000;
}

.roomSwiper {
    width: 100%;
    height: 100%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    /* 'contain' shows full image (no crop), 'cover' fills area (crops). 
       User asked for "normal image" and "sari image dekha sake", 
       but also "hero slider". 'contain' with black bg is safest for varying aspect ratios, 
       but 'cover' looks more "hero".
       Let's go with 'contain' to ensure the user sees the *whole* image as requested ("normal image dikhe"), 
       but make the container look premium. */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    /* Ensure above images */
    cursor: pointer;
    transition: background 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Thumbnails */
.gallery-thumbs {
    padding: 10px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.roomThumbs {
    height: 80px;
    box-sizing: border-box;
}

.roomThumbs .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.5;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.roomThumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--primary-accent);
    transform: translateY(-2px);
}

.gallery-thumb {
    width: 100%;
    height: 100%;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================
   Admin Dashboard Styles
   ========================================= */

/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
    color: var(--text-primary);
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background-color: rgba(56, 189, 248, 0.05);
    /* Very light primary accent hover */
}

/* User Info in Table */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background-color: var(--primary-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Buttons */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-muted);
    transition: color 0.2s;
    font-size: 1rem;
}

.btn-icon:hover {
    color: var(--primary-accent);
}

.btn-icon.success {
    color: var(--secondary-accent);
}

.btn-icon.success:hover {
    opacity: 0.8;
}

.btn-icon.danger {
    color: #ef4444;
}

.btn-icon.danger:hover {
    opacity: 0.8;
}

/* Search Input */
.header-actions-small {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Modal Specifics */
.document-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.document-card {
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    background-color: var(--bg-primary);
}


.document-preview-box {
    height: 150px;
    background-color: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: var(--text-muted);
}

.document-preview-box:hover {
    border-color: var(--primary-accent);
    background-color: rgba(56, 189, 248, 0.05);
    /* Light blue tint */
}

.document-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-preview-icon {
    font-size: 3rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.document-preview-icon span {
    font-size: 0.9rem;
}

.room-info-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.room-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.room-location {
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-price-large {
    text-align: right;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.price-amount {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-accent);
}

.price-period {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Meta Grid */
.room-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item i {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 1.2rem;
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-value {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

/* Amenities */
.amenities-section,
.rules-section,
.description-section,
.location-section {
    margin-bottom: 2.5rem;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.amenity-item i {
    color: var(--secondary-accent);
}

/* Rules List */
.rules-list {
    list-style: none;
    margin-top: 1rem;
}

.rules-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.rules-list li:before {
    content: "•";
    color: var(--primary-accent);
    font-weight: bold;
}

/* Right Column: Owner Card & Actions */
.room-details-right {
    position: sticky;
    top: 100px;
    /* Sticky sidebar */
}

.owner-contact-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.owner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.owner-avatar {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.owner-details h4 {
    margin: 0 0 5px 0;
}

.owner-stats {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Phone Contact Section */
.phone-contact-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.phone-number-display {
    margin: 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.phone-masked,
.phone-revealed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.masked-text,
.verified-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.verified-text {
    color: var(--secondary-accent);
}

.phone-actions .btn {
    width: 100%;
}

.contact-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: left;
}

.contact-notes p {
    margin-bottom: 5px;
}

.additional-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.additional-actions .btn {
    width: 100%;
    font-size: 0.9rem;
}

.additional-actions #reportBtn {
    grid-column: 1 / -1;
    color: #ef4444;
    border-color: #ef4444;
}

.additional-actions #reportBtn:hover {
    background: #ef4444;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .room-details-content {
        grid-template-columns: 1fr;
    }

    .room-details-right {
        position: static;
        margin-top: 2rem;
    }

    .gallery-main {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .gallery-main {
        height: 300px;
        /* Smaller height for mobile */
    }

    .room-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .room-price-large {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Logout Button Styles */
#logoutBtn,
#adminLogout {
    color: #ef4444 !important;
}

#logoutBtn:hover,
#adminLogout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}