/* Global Theme Variables and Dark Mode Support */

:root {
  /* Teal Color Palette */
  --primary-teal: #008080;
  --secondary-teal: #00cec9;
  --dark-teal: #1a535c;
  --light-mint: #e6f7f7;
  --accent-blue: #00bfff;
  
  /* Light Mode Colors */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --text-primary: #2c3e50;
  --text-secondary: #5f6368;
  --text-tertiary: #6c757d;
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.12);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
  --overlay-bg: rgba(0, 0, 0, 0.5);
}

/* Dark Mode Colors */
.dark {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-color: #374151;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
  --overlay-bg: rgba(0, 0, 0, 0.7);
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar transparency helpers over hero */
.navbar-transparent .main-header {
  background: transparent;
  box-shadow: none;
}
.navbar-transparent .main-header:not(.scrolled) .logo-text h1,
.navbar-transparent .main-header:not(.scrolled) .nav-menu li a,
.navbar-transparent .main-header:not(.scrolled) .mobile-menu-btn,
.navbar-transparent .main-header:not(.scrolled) .theme-toggle-desktop,
.navbar-transparent .main-header:not(.scrolled) .user-icon-btn {
  color: #ffffff;
}

/* Hero overlay to ensure readability under transparent navbar */
.hero-section { position: relative; }
.hero-overlay { background: rgba(0,0,0,0.15); }
.dark .hero-overlay { background: rgba(0,0,0,0.25); }

/* Cards and Sections */
.card,
.section-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 2px 15px var(--shadow-light);
  transition: all 0.3s ease;
}

.card:hover,
.section-card:hover {
  box-shadow: 0 8px 30px var(--shadow-medium);
}

/* Text Colors */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

/* Background Colors */
.bg-primary {
  background-color: var(--bg-primary);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.bg-tertiary {
  background-color: var(--bg-tertiary);
}

/* Teal Gradients */
.teal-gradient {
  background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
}

.teal-gradient-reverse {
  background: linear-gradient(135deg, var(--secondary-teal), var(--primary-teal));
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 128, 128, 0.3);
}

/* Form Elements */
input,
textarea,
select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
}

.dark input,
.dark textarea,
.dark select {
  background: var(--bg-tertiary);
}

/* Icons and Icon Circles */
.icon-circle {
  background: var(--light-mint);
  color: var(--primary-teal);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.dark .icon-circle {
  background: var(--bg-tertiary);
  color: var(--secondary-teal);
}

/* Responsive Design Utilities */
@media (max-width: 768px) {
  .container-responsive {
    padding: 1rem;
  }
  
  .text-responsive-lg {
    font-size: 1.5rem;
  }
  
  .text-responsive-xl {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container-responsive {
    padding: 0.75rem;
  }
  
  .text-responsive-lg {
    font-size: 1.25rem;
  }
  
  .text-responsive-xl {
    font-size: 1.5rem;
  }
}

/* Smooth Transitions */
* {
  transition-property: background-color, color, border-color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Override for specific elements that shouldn't transition */
.no-transition,
.no-transition * {
  transition: none !important;
}

/* Feature Section Dark Mode */
.dark .feature-bar {
  background: linear-gradient(135deg, rgba(0, 128, 128, 0.9), rgba(0, 206, 201, 0.9));
}

/* Room/Package Cards Dark Mode */
.dark .room-card,
.dark .amenity-card {
  background: var(--bg-secondary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark .room-card:hover,
.dark .amenity-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Contact Section Dark Mode */
.dark .contact-section {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.dark .contact-form-container {
  background: var(--bg-secondary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Price Badge Dark Mode */
.dark .room-price {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Help Button Dark Mode */
.dark .help-button {
  background: var(--dark-teal);
}

.dark .help-button:hover {
  background: var(--primary-teal);
}

/* Hero Overlay Dark Mode - Slightly darker for better contrast */
.dark .hero-overlay {
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive Image Optimization */
img {
  max-width: 100%;
  height: auto;
}

/* Mobile-first responsive containers */
.responsive-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .responsive-container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .responsive-container {
    padding: 0 3rem;
  }
}

/* Responsive Grid System */
.grid-responsive {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .grid-responsive {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* Responsive Typography */
.heading-responsive {
  font-size: 1.5rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .heading-responsive {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .heading-responsive {
    font-size: 2.5rem;
  }
}

/* Accessibility - Focus States */
:focus-visible {
  outline: 2px solid var(--primary-teal);
  outline-offset: 2px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animation for theme toggle */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}
