/* ===== CSS VARIABLES ===== */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --bg-color: #f5f5f7;
  --section-bg: #e8e8ed;
  --text-color: #1d1d1f;
  --card-bg: #ffffff;
  --accent-color: #0071e3;
  --accent-hover: #0077ed;
  --border-color: #d2d2d7;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-dramatic: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode - Explicit */
[data-theme="dark"] {
  --bg-color: #1d1d1f;
  --section-bg: #141414;
  --text-color: #f5f5f7;
  --card-bg: #2c2c2e;
  --border-color: #3a3a3c;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* System Dark Mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg-color: #1d1d1f;
    --section-bg: #141414;
    --text-color: #f5f5f7;
    --card-bg: #2c2c2e;
    --border-color: #3a3a3c;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  }
}

/* Force dark class for JS switching */
body.force-dark {
  --bg-color: #1d1d1f !important;
  --section-bg: #141414 !important;
  --text-color: #f5f5f7 !important;
  --card-bg: #2c2c2e !important;
  --border-color: #3a3a3c !important;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2) !important;
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3) !important;
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4) !important;
}

body.force-light {
  --bg-color: #f5f5f7 !important;
  --section-bg: #e8e8ed !important;
  --text-color: #1d1d1f !important;
  --card-bg: #ffffff !important;
  --border-color: #d2d2d7 !important;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04) !important;
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08) !important;
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12) !important;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

/* ===== SETTINGS BUTTON ===== */
.settings-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.settings-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.settings-btn svg {
  width: 22px;
  height: 22px;
}

/* ===== SETTINGS PANEL (iPhone-style modal) ===== */
.settings-panel {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 280px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.95);
  transition: opacity var(--transition-smooth), 
              transform var(--transition-spring),
              visibility var(--transition-smooth);
}

.settings-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.settings-content {
  padding: 1.5rem;
}

.settings-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-color);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.theme-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 1rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.theme-btn.active {
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.theme-btn:hover:not(.active) {
  background: rgba(0,0,0,0.05);
}

/* Dropdown */
.dropdown-container {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.dropdown-trigger:hover {
  border-color: var(--accent-color);
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-smooth);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 140px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: opacity var(--transition-smooth),
              transform var(--transition-spring),
              visibility var(--transition-smooth);
  z-index: 101;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-color);
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== MAIN TITLE ===== */
.main-title {
  text-align: center;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  color: var(--text-color);
}

/* ===== HERO SECTION - THREE COLUMNS ===== */
.hero-section {
  margin-bottom: 4rem;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 1.5rem;
  align-items: center;
  position: relative;
}

.info-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-spring);
  position: relative;
  z-index: 2;
}

.info-card:hover {
  transform: scale(1.5);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.info-card p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.9;
}

.info-card strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Contact Info Left */
.contact-info {
  order: 1;
  position: relative;
  z-index: 2;
}

/* Hero Image Center */
.hero-image {
  order: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-dramatic);
}

.hero-image:hover img {
  transform: scale(1.03);
}

/* Breakfast Info Right */
.breakfast-info {
  order: 3;
  position: relative;
  z-index: 2;
}

/* ===== ROOMS SECTION - FULL WIDTH ===== */
.rooms-section-full {
  margin: 0 calc(-50vw + 50%);
  padding: 4rem 2rem;
  background: var(--section-bg);
  width: 100vw;
  max-width: 100vw;
}

.rooms-section-full h2 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.rooms-grid-full {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.room-card {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.room-image {
  height: 300px;
  overflow: hidden;
}

.room-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

.room-info {
  padding: 1.5rem;
}

.room-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.room-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.room-details {
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.7;
}

.bed-size-full {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.bed-size-full strong {
  font-weight: 600;
}

/* ===== GALLERY - COLLAPSIBLE ===== */
.gallery-section-collapsible {
  margin: 4rem calc(-50vw + 50%);
  padding: 2rem 0 4rem;
  width: 100vw;
  max-width: 100vw;
  background: var(--section-bg);
}

.gallery-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.gallery-trigger:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: scale(1.02);
}

.gallery-arrow {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-spring);
}

.gallery-arrow.active {
  transform: rotate(180deg);
}

.gallery-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-dramatic);
  margin-top: 2rem;
}

.gallery-content.active {
  grid-template-rows: 1fr;
}

.gallery-inner {
  overflow: hidden;
}

/* Gallery Section Headers */
.gallery-section-header {
  text-align: center;
  margin: 2.5rem 0 1rem;
  padding: 0 2rem;
}

.gallery-section-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.gallery-section-header h3::before,
.gallery-section-header h3::after {
  content: '';
  display: inline-block;
  width: 60px;
  height: 1px;
  background: var(--border-color);
  vertical-align: middle;
}

/* 2 Column Gallery Grid - Full Width */
.gallery-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 100%;
}

.gallery-item-large {
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.gallery-item-large:hover {
  z-index: 2;
}

.gallery-item-large::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.gallery-item-large:hover::after {
  opacity: 1;
}

.gallery-item-large img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform var(--transition-dramatic);
}

.gallery-item-large:hover img {
  transform: scale(1.08);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.98);
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-container {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  transform: translateY(20px);
  transition: transform var(--transition-spring);
}

.lightbox.active .lightbox-container {
  transform: translateY(0);
}

/* Room Info Panel (Left Side) */
.lightbox-room-info {
  width: 300px;
  max-width: 30%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: #fff;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-30px);
  transition: all var(--transition-spring);
}

.lightbox.active .lightbox-room-info {
  opacity: 1;
  transform: translateX(0);
}

.room-info-type {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.room-info-desc {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* Main Lightbox Area */
.lightbox-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 70%;
}

.lightbox-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  transition: transform var(--transition-spring);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #fff;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.8;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 1001;
  transition: color var(--transition-fast), transform var(--transition-fast);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.lightbox-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  padding: 15px;
  z-index: 1001;
  transition: all var(--transition-fast);
  user-select: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
  background: rgba(255,255,255,0.25);
  transform: scale(1.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .hero-container {
    grid-template-columns: 260px 1fr 260px;
  }
  
  .lightbox-room-info {
    width: 250px;
    padding: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .hero-image {
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    order: 1;
  }
  
  .contact-info {
    order: 2;
  }
  
  .breakfast-info {
    order: 3;
  }
  
  .info-card {
    padding: 1.25rem;
  }
  
  /* Overlap effect for mobile - vertical */
  .contact-info .info-card:hover,
  .breakfast-info .info-card:hover {
    transform: translateY(-4px) scale(1.02);
  }
  
  .room-image {
    height: 280px;
  }
  
  .gallery-grid-2col {
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .gallery-item-large img {
    height: 350px;
  }
  
  /* Lightbox tablet */
  .lightbox-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .lightbox-room-info {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    order: 2;
  }
  
  .lightbox-room-info h3 {
    font-size: 1.2rem;
  }
  
  .lightbox-main {
    max-width: 100%;
    order: 1;
  }
}

@media (max-width: 768px) {
  #app {
    padding: 1rem;
  }
  
  .main-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .rooms-section-full {
    padding: 3rem 1rem;
  }
  
  .rooms-grid-full {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .room-image {
    height: 240px;
  }
  
  .room-info {
    padding: 1.25rem;
  }
  
  .room-info h3 {
    font-size: 1.1rem;
  }
  
  .room-count {
    font-size: 1.5rem;
  }
  
  .settings-btn {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .settings-panel {
    top: 60px;
    right: 10px;
    left: 10px;
    width: auto;
  }
  
  .gallery-section-collapsible {
    padding: 0 1rem 3rem;
  }
  
  .gallery-grid-2col {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
  }
  
  .gallery-item-large img {
    height: 280px;
  }
  
  .gallery-section-header h3 {
    font-size: 1.2rem;
  }
  
  /* Lightbox mobile */
  .lightbox-container {
    padding: 0.5rem;
    padding-top: 60px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 32px;
  }
  
  .lightbox-main {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 24px;
    padding: 10px;
  }
  
  .lightbox-content img {
    max-height: 60vh;
  }
  
  .lightbox-caption {
    font-size: 0.9rem;
    margin-top: 1rem;
  }
  
  .lightbox-room-info {
    padding: 0.75rem;
  }
  
  .room-info-type {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .room-info-desc {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-image {
    border-radius: var(--radius-md);
  }
  
  .info-card {
    padding: 1rem;
  }
  
  .info-card h3 {
    font-size: 1rem;
  }
  
  .room-image {
    height: 200px;
  }
  
  .gallery-item-large img {
    height: 220px;
  }
  
  .gallery-trigger {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .lightbox-content img {
    max-height: 50vh;
  }
}
