/* Custom styles for Hotel Apple Tree website */

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

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animations to sections */
section {
  animation: fadeIn 1s ease-out;
}

/* Custom hover effects */
.hover-scale {
  transition: transform 0.3s ease;
}

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

/* Custom button styles */
.btn-primary {
  @apply bg-gray-900 text-white px-8 py-3 rounded-full hover:bg-gray-800 transition duration-300;
}

/* Custom card styles */
.card {
  @apply bg-white rounded-lg overflow-hidden shadow-lg transition duration-300;
}

.card:hover {
  @apply shadow-xl;
}

/* Custom input styles */
input,
textarea {
  @apply transition duration-300;
}

input:focus,
textarea:focus {
  @apply ring-2 ring-gray-800;
}

/* Custom font styles */
.font-serif {
  font-family: "Playfair Display", serif;
}

/* Custom spacing */
.section-padding {
  @apply py-20;
}

/* Custom container */
.container {
  @apply max-w-7xl mx-auto px-4;
}

/* Custom grid gap */
.grid-gap {
  @apply gap-8;
}

/* Custom text colors */
.text-primary {
  @apply text-gray-900;
}

.text-secondary {
  @apply text-gray-600;
}

/* Custom background colors */
.bg-primary {
  @apply bg-gray-900;
}

.bg-secondary {
  @apply bg-gray-50;
}

/* Custom border styles */
.border-custom {
  @apply border border-gray-200;
}

/* Custom shadow styles */
.shadow-custom {
  @apply shadow-lg;
}

/* Custom transition */
.transition-custom {
  @apply transition duration-300;
}

/* Custom hover effects */
.hover-lift {
  @apply transition duration-300;
}

.hover-lift:hover {
  @apply -translate-y-1;
}

/* Custom focus styles */
.focus-custom {
  @apply focus:outline-none focus:ring-2 focus:ring-gray-800;
}

/* Custom active styles */
.active-custom {
  @apply active:scale-95;
}

/* Custom disabled styles */
.disabled-custom {
  @apply opacity-50 cursor-not-allowed;
}

/* Custom loading styles */
.loading {
  @apply animate-pulse;
}

/* Custom error styles */
.error {
  @apply text-red-500;
}

/* Custom success styles */
.success {
  @apply text-green-500;
}

/* Custom warning styles */
.warning {
  @apply text-yellow-500;
}

/* Custom info styles */
.info {
  @apply text-blue-500;
}

/* Custom responsive styles */
@media (max-width: 768px) {
  .section-padding {
    @apply py-12;
  }

  .container {
    @apply px-4;
  }
}

/* Custom print styles */
@media print {
  .no-print {
    display: none;
  }

  body {
    @apply text-black;
  }
}

/* Base styles */
:root {
  /* Primary Colors */
  --primary: #b22222;
  --primary-dark: #8b0000;
  --primary-light: #d64545;

  /* Accent Colors - Updated Golden Tones */
  --accent-gold: #c0962f;
  --accent-gold-light: #ddb347;
  --accent-gold-dark: #996515;

  /* Neutral Colors */
  --neutral-dark: #2c1810;
  --neutral-medium: #8b4513;
  --neutral-light: #deb887;

  /* Background Colors */
  --bg-cream: #fff8f0;
  --bg-light: #fff8f8;
  --bg-dark: #1a0f0f;

  /* Text Colors */
  --text-dark: #2c1810;
  --text-light: #fff;
  --text-muted: #6b4423;

  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(139, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(139, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(139, 0, 0, 0.2);
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  --gradient-gold: linear-gradient(
    135deg,
    var(--accent-gold-light) 0%,
    var(--accent-gold) 100%
  );
}

/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Typography */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600&display=swap");

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 4rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

h2 {
  font-size: 3rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}

h3 {
  font-size: 2.2rem;
  color: var(--primary);
  letter-spacing: 0.01em;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 300;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(178, 34, 34, 0.95); /* B22222 with 95% opacity */
  backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav.visible {
  transform: translateY(0);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  color: var(--accent-gold-light);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #ffd700;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffd700;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

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

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 3;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1);
  display: block;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-light);
  z-index: 4;
  width: min(600px, 80%);
}

.hero-content img {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-content img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards 0.7s;
}

.hero-tagline {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 1.5rem;
  color: #b22222;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gradient-gold);
  color: var(--neutral-dark);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
  animation: fadeInUp 1s ease 0.6s;
  border: 1px solid var(--accent-gold);
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--gradient-primary);
  color: var(--accent-gold-light);
  border-color: var(--accent-gold-light);
}

/* Sections */
section {
  padding: 5rem 0;
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

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

/* Cards */
.hover-scale {
  transition: var(--transition);
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: var(--bg-light);
  box-shadow: var(--shadow-sm);
}

.hover-scale:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-cream) 100%);
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-light);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  will-change: transform;
  transform: translateZ(0);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--primary);
  color: white;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-links {
  padding: 2rem;
}

.mobile-menu-link {
  display: block;
  padding: 1rem 0;
  color: var(--text-dark);
  font-size: 1.2rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .nav {
    transform: translateY(0);
    background: var(--primary);
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* Form Styles */
input,
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--neutral-light);
  border-radius: 4px;
  transition: var(--transition);
  background: var(--bg-light);
  color: var(--text-dark);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  background: white;
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 4rem 0;
  border-top: 1px solid var(--accent-gold);
}

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

footer a:hover {
  color: var(--accent-gold-light);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Custom Classes */
.text-primary {
  color: var(--primary);
}

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

.font-serif {
  font-family: "Cormorant Garamond", serif;
}

.font-sans {
  font-family: "Montserrat", sans-serif;
}

/* Section backgrounds */
.section-light {
  background-color: var(--bg-light);
}

.section-dark {
  background-color: var(--text-dark);
  color: var(--text-light);
}

/* Hover effects */
.hover-primary:hover {
  color: var(--primary);
}

.hover-white:hover {
  color: var(--text-light);
}

.hover-black:hover {
  color: var(--text-dark);
}

/* Slider Controls */
.slider-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.slider-dots {
  display: flex;
  gap: 0.8rem;
  z-index: 4;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.5s ease;
  border: 2px solid var(--accent-gold);
  position: relative;
  overflow: hidden;
}

.dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gold);
  transform: scale(0);
  transition: transform 0.5s ease;
  border-radius: 50%;
}

.dot.active::after {
  transform: scale(1);
}

/* Room Cards */
.room-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.room-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(44, 24, 16, 0.05) 100%
  );
  pointer-events: none;
}

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

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

.room-price {
  color: var(--accent-gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Amenities Icons */
.amenity-icon {
  color: var(--primary);
  transition: var(--transition);
}

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

/* Form Styling */
.form-button {
  background: var(--accent-gold);
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.form-button:hover {
  background: var(--primary-dark);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Footer */
.footer-heading {
  color: var(--accent-gold-light);
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Social Icons */
.social-icon {
  color: var(--text-light);
  opacity: 0.8;
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--accent-gold-light);
  opacity: 1;
  transform: translateY(-2px);
}

/* Custom Decorative Elements */
.section-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, #b22222, transparent);
  width: 100px;
  margin: 1rem auto;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #b22222;
  border-radius: 50%;
}

.section-divider::before {
  left: -4px;
  transform: translateY(-50%);
}

.section-divider::after {
  right: -4px;
  transform: translateY(-50%);
}

/* Animation Enhancements */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Slider Dots Enhancement */
.slider-dot {
  width: 12px;
  height: 12px;
  background: rgba(192, 150, 47, 0.3);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 4px rgba(192, 150, 47, 0.2);
}

.slider-dot.active {
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold-light);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
    min-height: 100vh;
  }

  .hero-image {
    height: 100%;
    min-height: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  }

  .section-padding {
    padding: 4rem 1rem;
  }

  .room-card {
    margin-bottom: 2rem;
  }

  .decorative-border::before,
  .decorative-border::after {
    width: 15px;
    height: 15px;
  }

  .hero-content {
    width: 90%;
    padding: 1.5rem;
  }

  .decorative-border {
    padding: 1rem;
  }
}

/* Adjust first section after hero */
section:not(.hero) {
  position: relative;
  z-index: 2;
}

/* Ensure other sections don't affect hero */
section {
  position: relative;
  margin-top: 0;
  padding-top: 5rem;
}

section.hero {
  padding-top: 0;
  margin-top: 0;
}

#rooms,
#contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(192, 150, 47, 0.75),
    rgba(221, 179, 71, 0.65)
  );
}

#rooms::before,
#contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("assets/images/logo_trans.png");
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: overlay;
}

#rooms .container,
#contact .container {
  position: relative;
  z-index: 2;
}

#rooms h2,
#contact h2 {
  color: #b22222;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

#rooms .section-divider,
#contact .section-divider {
  background: linear-gradient(to right, transparent, #b22222, transparent);
  height: 2px;
  width: 100px;
  margin: 1rem auto;
}

.text-center.hover-scale.p-6.decorative-border {
  background: linear-gradient(
    135deg,
    rgba(221, 179, 71, 0.1),
    rgba(192, 150, 47, 0.05)
  );
  border: 1px solid rgba(221, 179, 71, 0.2);
  transition: all 0.3s ease;
}

.text-center.hover-scale.p-6.decorative-border:hover {
  background: linear-gradient(
    135deg,
    rgba(221, 179, 71, 0.15),
    rgba(192, 150, 47, 0.1)
  );
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(221, 179, 71, 0.1);
}

#about,
#amenities {
  position: relative;
  overflow: hidden;
}

#about::after,
#amenities::after {
  content: "";
  position: absolute;
  top: -200px;
  left: -200px;
  width: 45vw;
  height: 45vw;
  max-width: 800px;
  max-height: 800px;
  background-image: url("assets/images/logo_trans.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
  transform: rotate(-15deg);
}

#about .container,
#amenities .container {
  position: relative;
  z-index: 2;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  animation: none;
}

.whatsapp-float i {
  margin-top: 2px;
}

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

/* Low bandwidth optimizations */
.low-bandwidth img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.low-bandwidth .hero-image {
  max-width: 100%;
  height: auto;
}

.save-data .non-critical {
  display: none;
}

/* Add responsive image sizes */
.hero-image {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-image {
    max-height: 50vh;
  }
}

/* Optimize background images */
@media (max-width: 768px) {
  .decorative-border {
    background-size: cover;
  }
}

/* Add loading placeholder */
.img-placeholder {
  background: #f0f0f0;
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
