/**
 * SEO and Accessibility Improvements
 * Enhancements for better structure, balance, and SEO
 */

/* ===========================
   Improved Typography Hierarchy
   =========================== */

/* H1 - Main Page Title (Only one per page) */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--heading-color, #1a1a1a);
  letter-spacing: -0.02em;
}

/* H2 - Section Headings */
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--heading-color, #1a1a1a);
}

/* H3 - Subsection Headings */
h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.875rem;
  color: var(--heading-color, #1a1a1a);
}

/* H4 - Minor Headings */
h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--heading-color, #1a1a1a);
}

/* Improved Paragraph Spacing */
p {
  margin-bottom: 1rem;
  line-height: 1.8;
  max-width: 75ch;
}

/* Section Subtitles - Use <p> not <span> */
.section-subtitle,
.hero-subtitle {
  display: block;
  font-size: clamp(0.875rem, 2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* ===========================
   Balanced Layout Proportions
   =========================== */

/* Consistent Section Spacing */
section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

/* Hero Sections */
.hero-section,
.page-hero,
.dining-hero,
.facilities-hero,
.contact-hero {
  min-height: clamp(400px, 60vh, 700px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Container Max-Width Improvements */
.container {
  max-width: min(1200px, 90vw);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* Grid Systems - Better Balance */
.about-grid,
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.rooms-grid,
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}

.restaurants-grid {
  display: block;
  margin-bottom: 50px;
}

/* ===========================
   Image Optimization for SEO
   =========================== */

/* Lazy Loading Support */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src]) {
  opacity: 1;
}

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

/* Aspect Ratio Containers */
.room-image,
.promo-image,
.restaurant-image,
.facility-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.room-image img,
.promo-image img,
.restaurant-image img,
.facility-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===========================
   Accessibility Improvements
   =========================== */

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color, #2c5f5d);
  color: white;
  padding: 1rem 2rem;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus Visible Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent-color, #c19b76);
  outline-offset: 2px;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===========================
   Card Components Balance
   =========================== */

.room-card,
.promotion-card,
.restaurant-card,
.facility-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-card:hover,
.promotion-card:hover,
.restaurant-card:hover,
.facility-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.room-content,
.promo-content,
.restaurant-content,
.facility-content {
  padding: clamp(1.25rem, 3vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===========================
   Button Consistency
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary-color, #2c5f5d);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-color, #c19b76);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color, #2c5f5d);
  color: var(--primary-color, #2c5f5d);
}

.btn-outline:hover {
  background: var(--primary-color, #2c5f5d);
  color: white;
}

/* ===========================
   Responsive Breakpoints
   =========================== */

@media (max-width: 768px) {
  /* Adjust section padding for mobile */
  section {
    padding: clamp(2rem, 6vw, 4rem) 0;
  }

  /* Stack grids on mobile */
  .about-grid,
  .eco-grid {
    grid-template-columns: 1fr;
  }

  /* Adjust hero heights */
  .hero-section,
  .page-hero,
  .dining-hero,
  .facilities-hero,
  .contact-hero {
    min-height: clamp(300px, 50vh, 500px);
  }

  /* Smaller typography on mobile */
  h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet adjustments */
  .rooms-grid,
  .facilities-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .restaurants-grid {
    display: block;
  }
}

/* ===========================
   Performance Optimizations
   =========================== */

/* GPU Acceleration for Animations */
.room-card,
.promotion-card,
.restaurant-card,
.facility-card,
.btn {
  will-change: transform;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
  .site-header,
  .sticky-header,
  footer,
  .btn,
  .language-switcher {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 20pt;
  }

  h3 {
    font-size: 16pt;
  }

  a {
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
  }
}
