/* ============================================
   Chadivan Hideaway - Styles
   Colors: Emerald #047857, Beige #e8dcc8, White #ffffff
   Fonts: Gilda Display (headings), Cabin (body)
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --emerald: #047857;
  --emerald-dark: #065f46;
  --emerald-light: #059669;
  --beige: #e8dcc8;
  --beige-light: #f3ede2;
  --beige-dark: #d4c4a8;
  --white: #ffffff;
  --black: #1a1a1a;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

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

body {
  font-family: 'Cabin', sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Gilda Display', serif;
  font-weight: 400;
  line-height: 1.3;
  color: var(--black);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Utility Classes --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.section-padding {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--emerald-dark);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .divider {
  width: 60px;
  height: 3px;
  background: var(--emerald);
  margin: 1rem auto;
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-family: 'Cabin', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--emerald);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--emerald);
  border-color: var(--emerald);
}

.btn-outline-dark:hover {
  background: var(--emerald);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: var(--white);
  padding: 0.75rem 0;
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: 'Gilda Display', serif;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 1px;
}

.navbar.scrolled .navbar-brand {
  color: var(--emerald-dark);
}

.navbar-brand span {
  display: block;
  font-family: 'Cabin', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.navbar.scrolled .nav-links a {
  color: var(--black);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--emerald);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--emerald-light);
}

.navbar.scrolled .nav-links a.active {
  color: var(--emerald);
}

/* On non-hero pages, navbar starts dark */
.navbar-dark {
  background: var(--emerald-dark);
}

.navbar-dark.scrolled {
  background: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
  border-radius: 2px;
}

.navbar.scrolled .hamburger span {
  background: var(--black);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  background: var(--beige-light);
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 70px;
}

.breadcrumbs a {
  color: var(--emerald);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.5rem;
  color: var(--beige-dark);
}

/* --- Hero Section (Index) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--emerald-dark) 0%, #064e3b 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.hero-content .tagline {
  font-family: 'Cabin', sans-serif;
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.hero-content .hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-decorative {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
}

.hero-decorative svg {
  display: block;
  width: 100%;
}

/* --- Page Hero (Inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, #064e3b 100%);
  padding: 8rem 0 4rem;
  text-align: center;
  color: var(--white);
  position: relative;
}

.page-hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Features Grid --- */
.features {
  background: var(--beige-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: var(--emerald);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--emerald-dark);
}

.feature-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* --- About Preview (Home) --- */
.about-preview {
  background: var(--white);
}

.about-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-preview-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

.about-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-preview-text h2 {
  font-size: 2.2rem;
  color: var(--emerald-dark);
  margin-bottom: 1rem;
}

.about-preview-text p {
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* --- Rooms Preview (Home) --- */
.rooms-preview {
  background: var(--beige-light);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.room-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.room-card-image {
  aspect-ratio: 16/10;
  background: var(--beige);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

.room-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.room-card-body {
  padding: 1.5rem;
}

.room-card-body h3 {
  font-size: 1.4rem;
  color: var(--emerald-dark);
  margin-bottom: 0.5rem;
}

.room-card-body .room-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray);
}

.room-card-body .room-meta svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: middle;
}

.room-card-body p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.room-card-body .price {
  font-family: 'Gilda Display', serif;
  font-size: 1.3rem;
  color: var(--emerald);
}

.room-card-body .price small {
  font-family: 'Cabin', sans-serif;
  font-size: 0.8rem;
  color: var(--gray);
}

/* --- Room Detail (rooms.html) --- */
.room-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

.room-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.room-detail-image {
  aspect-ratio: 4/3;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

.room-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-detail-info {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.room-detail-info h3 {
  font-size: 1.8rem;
  color: var(--emerald-dark);
  margin-bottom: 0.75rem;
}

.room-detail-info p {
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.room-amenities {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.room-amenities li {
  font-size: 0.9rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.room-amenities li::before {
  content: "\2713";
  color: var(--emerald);
  font-weight: 700;
}

.room-detail-info .price {
  font-family: 'Gilda Display', serif;
  font-size: 1.5rem;
  color: var(--emerald);
  margin-bottom: 1.5rem;
}

.room-detail-info .price small {
  font-family: 'Cabin', sans-serif;
  font-size: 0.85rem;
  color: var(--gray);
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 120, 87, 0);
  transition: background var(--transition);
}

.gallery-item:hover::after {
  background: rgba(4, 120, 87, 0.2);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  transition: opacity var(--transition);
  opacity: 0.7;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* --- About Page --- */
.about-content {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-grid.reverse {
  direction: rtl;
}

.about-grid.reverse > * {
  direction: ltr;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

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

.about-text h2 {
  font-size: 2rem;
  color: var(--emerald-dark);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* --- Amenities List --- */
.amenities-section {
  background: var(--beige-light);
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.amenity-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.amenity-item .amenity-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--emerald);
}

.amenity-item h4 {
  font-size: 1.05rem;
  color: var(--emerald-dark);
  margin-bottom: 0.25rem;
}

.amenity-item p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-banner h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Contact Page --- */
.contact-section {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--emerald-dark);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item .contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--emerald);
}

.contact-item h4 {
  font-size: 0.95rem;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  font-size: 0.95rem;
  color: var(--gray);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--emerald);
  color: var(--white);
}

.contact-form {
  background: var(--beige-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.contact-form h3 {
  font-size: 1.5rem;
  color: var(--emerald-dark);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius);
  font-family: 'Cabin', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--emerald);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Map --- */
.map-section {
  background: var(--beige-light);
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 21/9;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-style: italic;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer --- */
.footer {
  background: var(--emerald-dark);
  color: var(--white);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.8;
}

.footer h4 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 1rem;
  font-family: 'Cabin', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-contact p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--emerald-dark);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.5rem;
    transition: right var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    color: var(--white) !important;
    font-size: 1.1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .about-preview-grid,
  .about-grid,
  .contact-grid,
  .room-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-grid.reverse {
    direction: ltr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .page-hero h1 {
    font-size: 2.2rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .room-amenities {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .tagline {
    font-size: 1rem;
  }

  .breadcrumbs {
    margin-top: 60px;
  }
}
