/* Modern Luxury Hotel CSS */

/* ========== ROOT VARIABLES ========== */
:root {
  --primary-color: #1a237e;
  --secondary-color: #ffd700;
  --primary-dark: #000051;
  --primary-light: #534bae;
  --secondary-dark: #c7a800;
  --secondary-light: #ffff52;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #212529;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --font-primary: 'Playfair Display', serif;
  --font-secondary: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Links */
a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

/* ========== BOOTSTRAP 5 OVERRIDES ========== */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text-light);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Form Controls */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

.form-select {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-img-top {
  transition: var(--transition);
}

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

/* Navbar */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(26, 35, 126, 0.95) !important;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.navbar-scrolled {
  background: var(--primary-color) !important;
}

.navbar-brand {
  font-family: var(--font-primary);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light) !important;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ========== CUSTOM COMPONENTS ========== */

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(26, 35, 126, 0.4), rgba(26, 35, 126, 0.4));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(26, 35, 126, 0.8), rgba(255, 215, 0, 0.1));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 2rem;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-cta {
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Section Styling */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--secondary-color);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

/* Room Cards */
.room-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

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

.room-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.room-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: var(--text-light);
}

.room-price {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Amenities */
.amenity-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.amenity-card:hover .amenity-icon {
  color: var(--secondary-color);
  transform: scale(1.1);
}

/* Gallery */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

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

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 35, 126, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Contact Form */
.contact-form {
  background: var(--bg-light);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.footer a {
  color: var(--text-light);
  transition: var(--transition);
}

.footer a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 1s ease-out;
}

.fade-in-up {
  animation: fadeInUp 1s ease-out;
}

.slide-in-left {
  animation: slideInLeft 1s ease-out;
}

.slide-in-right {
  animation: slideInRight 1s ease-out;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ========== UTILITIES ========== */
.text-primary-custom {
  color: var(--primary-color) !important;
}

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

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

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

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
}

.shadow-custom {
  box-shadow: var(--shadow-lg) !important;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Mobile First Approach */
@media (max-width: 575.98px) {
  .hero {
    height: 80vh;
    background-attachment: scroll;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .contact-form {
    padding: 2rem 1rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .hero {
    height: 85vh;
  }
  
  .room-image {
    height: 200px;
  }
}

@media (min-width: 768px) {
  .navbar-nav .nav-link {
    margin: 0 1rem;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .room-image {
    height: 280px;
  }
}

@media (min-width: 992px) {
  .section {
    padding: 6rem 0;
  }
  
  .hero {
    background-attachment: fixed;
  }
  
  .gallery-item img {
    height: 300px;
  }
}

@media (min-width: 1200px) {
  .hero-title {
    font-size: 5.5rem;
  }
  
  .contact-form {
    padding: 4rem;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero {
    background-size: cover;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .hero {
    height: auto;
    background: none;
    color: var(--text-primary);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --bg-light: #2d3436;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}