/* ========== CSS VARIABLES ========== */
:root {
  /* Colors - Ocean Blue theme from logo */
  --color-primary: #2b6a94;
  --color-primary-dark: #1e4d6b;
  --color-primary-light: #4a8ab8;
  --color-accent: #e8a87c;
  --color-accent-dark: #d4956a;

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #f8f9fa;
  --color-sand: #f5f0e8;
  --color-sand-dark: #e8e0d5;
  --color-gray-light: #e9ecef;
  --color-gray: #6c757d;
  --color-gray-dark: #343a40;
  --color-text: #2c3e50;
  --color-text-light: #5a6c7d;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Header height */
  --header-height: 80px;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-off-white);
  overflow-x: hidden;
}

/* Beach Background */
.beach-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(248, 249, 250, 0.95) 0%,
      rgba(248, 249, 250, 0.9) 30%,
      rgba(245, 240, 232, 0.92) 70%,
      rgba(232, 168, 124, 0.15) 100%
    ),
    linear-gradient(
      135deg,
      rgba(43, 106, 148, 0.08) 0%,
      transparent 50%
    );
}

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

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

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

ul {
  list-style: none;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  margin: var(--space-sm) auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  font-size: 1.1rem;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) 0;
  position: relative;
}

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

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

.nav-link:hover,
.nav-link:focus {
  color: var(--color-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-normal);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger {
  background: transparent;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ========== HERO SECTION ========== */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + var(--space-sm));
  padding-bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Beach sunset background image */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: url('assets/images/Background2.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  text-align: center;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  margin-top: -20px;
}

.hero-logo {
  height: 80px;
  width: auto;
  margin: 0 auto var(--space-xs);
}

.hero-title {
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-primary-dark);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* ========== SLIDESHOW ========== */
.slideshow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 0 var(--space-md);
}

.slideshow-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-gray-light);
  aspect-ratio: 16 / 10;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform var(--transition-slow);
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--color-white);
  font-size: 0.9rem;
}

/* Slideshow Navigation */
.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  z-index: 10;
}

.slideshow-btn:hover {
  background: var(--color-white);
  transform: translateY(-50%) scale(1.1);
}

.slideshow-btn.prev {
  left: var(--space-lg);
}

.slideshow-btn.next {
  right: var(--space-lg);
}

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.slideshow-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.slideshow-dot:hover,
.slideshow-dot.active {
  background: var(--color-primary);
}

/* ========== ABOUT SECTION ========== */
.about {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.7));
}

.about-content {
  display: grid;
  gap: var(--space-xl);
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}

.about-text strong {
  color: var(--color-primary-dark);
}

.about-details {
  display: grid;
  gap: var(--space-md);
}

.detail-card {
  background: var(--color-white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.detail-card h3 {
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
  border-bottom: 2px solid var(--color-sand-dark);
  padding-bottom: var(--space-xs);
}

.details-list li,
.amenities-list li {
  padding: var(--space-xs) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.detail-icon {
  font-size: 1.2rem;
}

.amenities-list {
  columns: 1;
  gap: var(--space-md);
}

.amenities-list li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: bold;
}

/* ========== BOOKING SECTION ========== */
.booking {
  background: linear-gradient(180deg, rgba(43, 106, 148, 0.05), rgba(43, 106, 148, 0.1));
}

.booking-cards {
  display: grid;
  gap: var(--space-md);
}

.booking-card {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.booking-card.featured {
  border: 2px solid var(--color-primary);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.booking-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sand);
  border-radius: var(--radius-full);
  color: var(--color-primary);
}

.booking-card h3 {
  margin-bottom: var(--space-sm);
}

.booking-card p {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.booking-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--color-sand);
  color: var(--color-primary-dark);
  transition: all var(--transition-fast);
}

.booking-btn:hover {
  background: var(--color-sand-dark);
  color: var(--color-primary-dark);
}

.booking-btn.primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.booking-btn.primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

/* ========== AVAILABILITY SECTION ========== */
.availability {
  background: var(--color-white);
}

.widget-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.widget-box {
  background: var(--color-off-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.widget-box h3 {
  margin-bottom: var(--space-sm);
  text-align: center;
}

.widget-embed {
  width: 100%;
}

.widget-embed .ownerrez-widget {
  width: 100%;
}

/* Allow OwnerRez iframes to show full content */
.widget-embed iframe {
  width: 100%;
  border: none;
}

.calendar-widget .widget-embed iframe {
  min-height: 340px;
}

.booking-widget .widget-embed iframe {
  min-height: 600px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand {
  text-align: center;
}

.footer-logo {
  height: 60px;
  margin: 0 auto var(--space-sm);
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

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

.footer-contact {
  text-align: center;
}

.footer-contact a {
  color: var(--color-accent);
}

.footer-contact a:hover {
  color: var(--color-accent-dark);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== MEDIA QUERIES ========== */

/* Tablet */
@media (min-width: 768px) {
  .about-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .amenities-list {
    columns: 1;
  }

  .booking-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .widget-container {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
  }

  .footer-brand {
    text-align: left;
  }

  .footer-logo {
    margin: 0 0 var(--space-sm);
  }

  .footer-contact {
    text-align: right;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .about-content {
    grid-template-columns: 2fr 3fr;
    align-items: start;
  }

  .slideshow-btn.prev {
    left: calc(-1 * var(--space-xl));
  }

  .slideshow-btn.next {
    right: calc(-1 * var(--space-xl));
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --header-height: 70px;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    padding: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-gray-light);
  }

  .nav-link::after {
    display: none;
  }

  .slideshow-btn {
    width: 40px;
    height: 40px;
  }

  .slideshow-btn.prev {
    left: var(--space-sm);
  }

  .slideshow-btn.next {
    right: var(--space-sm);
  }

  .booking-card {
    padding: var(--space-lg);
  }

  .widget-container {
    grid-template-columns: 1fr;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
