/* static/css/styles.css */

/* Custom styles for the apartment booking site */

/* Hero section styles */
.hero {
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  backdrop-filter: blur(2px);
}

/* Navbar enhancements */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Gallery carousel enhancements */
.carousel-item img:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease;
  cursor: pointer;
}

/* HTMX indicator styles */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: flex;
}

/* Calendar styles */
.calendar-table {
  font-size: 0.85rem;
}

.calendar-table th,
.calendar-table td {
  padding: 0.4rem 0.25rem;
  text-align: center;
  min-width: 2rem;
}

.calendar-table th:first-child,
.calendar-table td:first-child {
  position: sticky;
  left: 0;
  background-color: white;
  z-index: 10;
  min-width: 6rem;
  max-width: 8rem;
  text-align: left;
  padding-left: 0.5rem;
}

.calendar-table tr:nth-child(even) td:first-child {
  background-color: #f8f8f8;
}

.calendar-cell {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.calendar-cell:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.calendar-available {
  background-color: rgba(46, 204, 113, 0.2);
}

.calendar-booked {
  background-color: rgba(231, 76, 60, 0.2);
}

.availability-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  white-space: nowrap;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    background-color: white;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.navigation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}


/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card {
  animation: fadeIn 0.5s ease-in-out;
}

/* Improve responsive layout */
@media (max-width: 768px) {
  .hero-content {
    padding: 1rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

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

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Gallery styles */
.gallery-section {
    padding: 40px 0;
    background-color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Loading indicators */
.loading {
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
    color: #666;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.map-button {
  padding: 12px 20px;
}

.map-icon {
  height: 24px;
  width: 24px;
}

.map-button-text {
  font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .map-button {
    padding: 8px 12px;
  }

  .map-button-text {
    font-size: 14px;
  }

  .map-icon {
    height: 18px;
    width: 18px;
  }
}

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


/* Custom theme colors - can be adjusted as needed */
:root {
  --primary: #6419E6;
  --primary-focus: #5011c3;
  --primary-content: #ffffff;
}