/* ================================
   SEABREEZE COASTAL RETREAT - CSS
   Assessment 2 - Dynamic Web App
   ================================ */

/* === GLOBAL RESET === */
/* Remove default browser margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Include padding and border in element width */
}

/* === CSS VARIABLES === */
/* Define reusable color scheme and spacing variables */
:root {
  --primary-white: #FFFFFF;
  --soft-blue: #4A90E2;
  --sandy-beige: #D4B896;
  --navy-blue: #2C3E50;
  --light-gray: #F5F5F5;
  --text-dark: #333333;
  --text-light: #666666;
  --section-padding: 80px 20px;
  --container-width: 1200px;
}

/* === BASE STYLES === */
/* Set default font and color scheme for entire site */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--primary-white);
}

/* Ensure images are responsive and don't overflow */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove underline from links and add smooth transitions */
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* === CONTAINER === */
/* Center content and set maximum width for readability */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === NAVIGATION BAR === */
/* Sticky header that stays at top when scrolling */
header {
  background-color: var(--primary-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensure header stays above other content */
}

/* Navigation container layout */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
  min-height: 90px;
}

/* Logo styling */
.logo h1 {
  font-size: 28px;
  color: var(--soft-blue);
  font-weight: 600;
}

/* Logo tagline styling */
.logo .tagline {
  font-size: 12px;
  color: var(--sandy-beige);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -5px;
}

/* Navigation links container - centered using absolute positioning */
.nav-link {
  display: flex;
  list-style: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); /* Center navigation links */
  gap: 20px;
}

/* Individual navigation link styling */
.nav-link a {
  display: block;
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  background-color: var(--light-gray);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Navigation link hover and active states */
.nav-link a:hover,
.nav-link a.active {
  background-color: var(--soft-blue);
  color: white;
  transform: translateY(-2px); /* Lift effect on hover */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === BANNER/HERO SECTION === */
/* Full-width banner with background image */
.banner {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Banner background image container */
.banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Ensure banner image covers entire area */
.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark overlay on banner image for text readability */
.banner-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

/* Banner text content styling */
.banner-content {
  position: relative;
  z-index: 2; /* Place content above banner image */
  text-align: center;
  color: var(--primary-white);
  max-width: 85%;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px); /* Blur effect for better readability */
  border-radius: 20px;
}

/* Banner headings */
.banner-content h1,
.banner-content h2 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
}

/* Banner paragraph text */
.banner-content p {
  font-size: 22px;
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* === BUTTONS === */
/* Primary and secondary button base styles */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  padding: 15px 40px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Primary button - used for main CTAs */
.btn-primary {
  background-color: var(--soft-blue);
  color: var(--primary-white);
  border: 2px solid var(--soft-blue);
}

/* Primary button hover effect */
.btn-primary:hover {
  background-color: transparent;
  border-color: var(--primary-white);
  transform: translateY(-3px); /* Lift effect */
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* Secondary button - used for less prominent CTAs */
.btn-secondary {
  display: inline-flex;
  padding: 12px 30px;
  background-color: transparent;
  color: var(--soft-blue);
  border: 2px solid var(--soft-blue);
  border-radius: 50px;
  font-weight: 600;
  margin-top: 20px;
  transition: all 0.3s ease;
}

/* Secondary button hover effect */
.btn-secondary:hover {
  background-color: var(--soft-blue);
  color: var(--primary-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* === UTILITY CLASSES === */
/* Center align utility class */
.text-center {
  text-align: center;
  width: 100%;
  display: block;
  margin-top: 30px;
}

/* === SECTION STYLES === */
/* Common padding for content sections */
.introduction, .about-story, .feature, .rooms-preview {
  padding: var(--section-padding);
}

/* Light gray background for alternating sections */
.introduction, .about-story {
  background-color: var(--light-gray);
  text-align: center;
}

/* Section heading styles */
.introduction h2, .about-story h2, .feature h2, .rooms-preview h2 {
  font-size: 42px;
  color: var(--navy-blue);
  margin-bottom: 30px;
}

/* Section paragraph styles */
.introduction p, .about-story p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 900px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

/* === FEATURES SECTION === */
/* Features section background */
.feature {
  padding: var(--section-padding);
  background-color: var(--primary-white);
}

/* Features section heading */
.feature h2 {
  text-align: center;
  font-size: 42px;
  color: var(--navy-blue);
  margin-bottom: 60px;
  font-weight: 600;
}

/* Features grid layout - responsive with auto-fit */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

/* Individual feature card styling */
.feature-card {
  text-align: center;
  padding: 40px 30px;
  background-color: var(--light-gray);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smooth bounce effect */
}

/* Feature card hover effect - changes to blue */
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background-color: var(--soft-blue);
  color: var(--primary-white);
}

/* Feature list items */
.feature-card ul li {
  list-style: none;
  color: var(--text-light);
  padding: 8px 0;
  transition: color 0.3s ease;
}

/* Remove border from last list item */
.feature-card li:last-child {
  border-bottom: none;
}

/* Feature card heading */
.feature-card h3 {
  margin-bottom: 10px;
  color: var(--navy-blue);
}

/* Change text color to white on hover */
.feature-card:hover h3,
.feature-card:hover p,
.feature-card:hover li {
  color: var(--primary-white);
}

/* Feature card paragraph */
.feature-card p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  text-align: center;
}

/* Feature icon (emoji) styling */
.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* === ROOMS PREVIEW SECTION === */
/* Rooms section with light gray background */
.rooms-preview {
  padding: var(--section-padding);
  background-color: var(--light-gray);
}

/* Rooms section heading */
.rooms-preview h2 {
  text-align: center;
  font-size: 42px;
  color: var(--navy-blue);
  margin-bottom: 60px;
  font-weight: 600;
}

/* Rooms grid layout - responsive */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Individual room card styling */
.room-card {
  background-color: var(--primary-white);
  border-radius: 10px;
  overflow: hidden; /* Ensure images don't overflow rounded corners */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Room card lift effect on hover */
.room-card:hover {
  transform: translateY(-10px);
}

/* Room card image - fixed height with cover fit */
.room-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Room card heading */
.room-info h3 {
  font-size: 24px;
  color: var(--navy-blue);
  margin-bottom: 10px;
  text-align: center;
}

/* Room card description */
.room-info p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  text-align: center;
}

/* === AMENITIES & GALLERY SECTIONS === */
/* Amenities section heading */
.amenities h2 {
  margin-top: 0;
  margin-bottom: 40px;
  text-align: center;
}

/* Amenities section padding */
.amenities {
  padding: 20px 20px 20px 20px;
}

/* Gallery section padding */
.gallery {
  padding: 80px 20px 20px 20px;
  text-align: center;
}

/* === CALL TO ACTION SECTION === */
/* CTA section with gradient background */
.cta {
  padding: var(--section-padding);
  background: linear-gradient(135deg, var(--soft-blue) 0%, var(--navy-blue) 100%);
  text-align: center;
  color: var(--primary-white);
}

/* CTA heading */
.cta h2 {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* CTA paragraph */
.cta p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* CTA button - inverted colors for gradient background */
.cta .btn-primary {
  background-color: var(--primary-white);
  color: var(--soft-blue);
  border-color: var(--primary-white);
}

/* CTA button hover - transparent with white border */
.cta .btn-primary:hover {
  background-color: transparent;
  border-color: var(--primary-white);
  color: var(--primary-white);
}

/* === FOOTER === */
/* Footer with dark navy background */
footer {
  background-color: var(--navy-blue);
  color: var(--primary-white);
  padding: 60px 20px 20px;
}

/* Footer content grid layout */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

/* Footer section headings */
.footer-section h3,
.footer-section h4 {
  margin-bottom: 15px;
  color: var(--sandy-beige);
}

/* Footer text and links */
.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

/* Remove list bullets from footer */
.footer-section ul {
  list-style: none;
}

/* Footer list items */
.footer-section ul li {
  margin-bottom: 10px;
}

/* Footer link hover effect */
.footer-section a:hover {
  color: var(--soft-blue);
}

/* Footer bottom section - copyright */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
}

/* === CONTACT PAGE STYLES === */
/* Contact page wrapper - two column layout */
.contact-wrapper {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding: 60px 0;
}

/* Contact information section */
.contact-info {
  flex: 1;
  text-align: left;
}

/* Contact info heading */
.contact-info h2 {
  font-size: 36px;
  color: var(--navy-blue);
  margin-bottom: 20px;
}

/* Contact details container */
.contact-details {
  margin-top: 40px;
}

/* Individual contact item (icon + text) */
.contact-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

/* Contact item text container */
.contact-item div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Contact icon styling */
.contact-icon {
  font-size: 24px;
  background: var(--light-gray);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* Contact form wrapper - dark blue background */
.contact-form-wrapper {
  flex: 1;
  background-color: var(--navy-blue);
  padding: 40px;
  border-radius: 20px;
  color: var(--primary-white);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  margin-bottom: 50px;
}

/* Contact form heading */
.contact-form-wrapper h2 {
  color: var(--primary-white);
  margin-bottom: 30px;
  font-size: 28px;
}

/* Contact form submit button */
.contact-form .btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 20px;
  background-color: var(--soft-blue);
  color: var(--primary-white);
  border: none;
  padding: 15px;
}

/* Remove default button styling */
.contact-form button {
  -webkit-appearance: none;
  appearance: none;
}

/* Form group container */
.form-group {
  margin-bottom: 20px;
  text-align: left;
  border: none !important;
  box-shadow: none !important;
}

/* Form labels */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

/* Form inputs - styled for dark background */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  outline: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
  transition: all 0.3s ease;
  background-clip: padding-box;
}

/* Form input focus state */
.form-group input:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: 2px solid var(--soft-blue);
}

/* Page header styling */
.page-header {
  padding: var(--section-padding);
  background-color: var(--light-gray);
}

/* === MAP SECTION === */
/* Map section container */
.map-section {
  padding: 60px 0 0 0;
  text-align: center;
}

/* Map section heading */
.map-section h2 {
  font-size: 42px;
  color: var(--navy-blue);
  margin-bottom: 15px;
}

/* Map intro text */
.map-intro {
  font-size: 18px;
  color: var(--navy-blue);
  margin-bottom: 15px;
}

/* Map iframe container */
.map-container {
  width: 100%;
  margin-top: 30px;
}

/* === FORM FEEDBACK MESSAGES === */
/* Success message styling */
.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin-top: 20px;
}

/* Error message styling */
.error-message {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-top: 5px;
  display: block;
}

/* Form note (required fields) */
.form-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* === ADMIN PAGE === */
.admin-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-color: var(--primary-white);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.admin-input:focus {
  border-color: var(--soft-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.admin-form-group {
  margin-bottom: 20px;
  text-align: left;
}

.admin-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 14px;
}

/* === ADMIN FORM OVERRIDES === */
.admin-form-group input,
.admin-form-group textarea {
  text-align: left;
  background-color: var(--primary-white);
  color: var(--text-dark);
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-clip: unset;
}

.admin-form-group p {
  font-size: inherit;
  color: inherit;
  max-width: none;
  margin: 0;
}

/* === GALLERY CAROUSEL === */
.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.carousel-slide {
  display: none;
  position: relative;
}

.carousel-slide.active {
  display: block;
}

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

.carousel-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(44, 62, 80, 0.7);
  color: white;
  padding: 8px 24px;
  text-align: center;
  font-size: 16px;
  border-radius: 50px;
  white-space: nowrap;
  display: none;
}

.carousel-caption:not(:empty) {
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: var(--soft-blue);
  color: white;
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

.carousel-dots {
  text-align: center;
  margin-top: 15px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: var(--soft-blue);
}

.gallery-intro {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Logout Button */
.nav-logout-btn {
  display: block;
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  background-color: var(--primary-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-logout-btn:hover {
  background-color: #e74c3c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === PLACEHOLDER CONTRAST FIX === */
.form-group input::placeholder,
.form-group textarea::placeholder,
.form-group select::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

/* === RESPONSIVE DESIGN === */
/* Media query for mobile devices */
@media (max-width: 768px) {
  /* Stack contact wrapper vertically on mobile */
  .contact-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
  }

  /* Stack contact items vertically */
  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  /* Center contact info on mobile */
  .contact-info {
    text-align: center;
  }

  /* Center contact details */
  .contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Full width form on mobile */
  .contact-form-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Remove sticky header on mobile */
  header {
    position: relative;
  }

  /* Stack navigation vertically on mobile */
  .nav-link {
    position: static;
    transform: none;
    margin-top: 10px;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Smaller nav links on mobile */
  .nav-link a {
    padding: 8px 18px;
    font-size: 14px;
  }

  /* Stack navbar content vertically */
  .navbar .container {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    text-align: center;
    min-height: auto;
  }

  /* Shorter banner on mobile */
  .banner {
    height: 400px;
  }

  /* Smaller banner heading on mobile */
  .banner-content h2 {
    font-size: 36px;
  }

  /* Smaller banner text on mobile */
  .banner-content p {
    font-size: 18px;
  }

  /* Smaller section headings on mobile */
  .introduction h2,
  .feature h2,
  .rooms-preview h2,
  .cta h2 {
    font-size: 32px;
  }

  /* Single column feature grid on mobile */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  /* Single column rooms grid on mobile */
  .rooms-grid {
    grid-template-columns: 1fr;
  }
}