/* ===== Glenwood Farmhouse B&B — Design System ===== */

/* --- Fonts (loaded via <link> in HTML for performance, @import kept as fallback) --- */
/* @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap'); */

/* --- Variables --- */
:root {
  --green: #2D5016;
  --green-light: #3D6B22;
  --green-dark: #1E3A0E;
  --cream: #FAF3E0;
  --cream-dark: #F0E6CC;
  --gold: #C8A96E;
  --gold-light: #D4BC8A;
  --brown: #5C4033;
  --white: #FFFFFF;
  --gray-100: #F7F7F5;
  --gray-200: #E8E5DE;
  --gray-500: #8A8578;
  --gray-700: #4A463E;
  --gray-900: #2A2622;
  --red: #B44040;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--green-dark); line-height: 1.2; }
h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p { margin-bottom: 1rem; }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--green { background: var(--green); color: var(--cream); }
.section--green h2, .section--green h3 { color: var(--cream); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(250, 243, 224, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cream-dark);
  transition: box-shadow 0.3s;
}
.nav--scrolled { box-shadow: var(--shadow-md); }
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
}
.nav__logo span { color: var(--gold); }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: color 0.2s;
  position: relative;
}
.nav__links a:hover, .nav__links a.active { color: var(--green); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}
.nav__cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}
.nav__cta:hover { background: var(--green-light) !important; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 12px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}
.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 900px) {
  .nav__hamburger { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--cream-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s;
  }
  .nav__links--open { transform: translateY(0); }
  .nav__links {
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-light); color: var(--white); }
.btn--secondary { background: var(--gold); color: var(--white); }
.btn--secondary:hover { background: var(--gold-light); color: var(--white); }
.btn--outline { background: transparent; border: 2px solid var(--green); color: var(--green); }
.btn--outline:hover { background: var(--green); color: var(--white); }
.btn--large { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn--white { background: var(--white); color: var(--green); }
.btn--white:hover { background: var(--cream); color: var(--green); }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(30,58,14,0.7), rgba(45,80,22,0.5)),
    url('/images/02-farmhouse-exterior.jpg') center/cover no-repeat;
  margin-top: var(--nav-height);
}
.hero__content {
  max-width: 640px;
  color: var(--white);
  padding: 2rem 0;
}
.hero__content h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: 1rem;
}
.hero__content p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { min-height: 70vh; }
  .hero__content { padding: 1.5rem 0; }
  .hero__content h1 { font-size: 2.25rem; }
  .hero__content p { font-size: 0.95rem; }
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card__image {
  height: 240px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  overflow: hidden;
}
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.5rem; }
.card__body h3 { margin-bottom: 0.5rem; }
.card__price {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.card__price span { font-size: 0.85rem; font-weight: 400; color: var(--gray-500); }

/* --- Room Grid --- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2rem; }

/* --- Amenities --- */
.amenities { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.amenity-tag {
  padding: 0.3rem 0.75rem;
  background: var(--cream);
  color: var(--green);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Room Detail (rooms page) --- */
.room-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 4rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.room-detail:nth-child(even) { direction: rtl; }
.room-detail:nth-child(even) > * { direction: ltr; }
.room-detail__gallery {
  border-radius: var(--radius);
  overflow: hidden;
  height: 350px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.room-detail__gallery img { width: 100%; height: 100%; object-fit: cover; }
.room-detail__info h2 { margin-bottom: 0.5rem; }
.room-detail__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}
.room-detail__price span { font-size: 0.9rem; font-weight: 400; color: var(--gray-500); }
.room-detail__desc { color: var(--gray-700); margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .room-detail { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem; }
  .room-detail:nth-child(even) { direction: ltr; }
  .room-detail__gallery { height: 250px; }
}

/* --- Booking Page --- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .booking-layout { grid-template-columns: 1fr; }
  .booking-panel { position: static; }
}
.booking-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}
.booking-panel h3 { margin-bottom: 1.5rem; }

/* --- Calendar Overrides (FullCalendar) --- */
.calendar-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.fc { font-family: var(--font-body); }
.fc .fc-toolbar-title { font-family: var(--font-heading); color: var(--green-dark); font-size: 1.25rem; }
.fc .fc-button-primary {
  background: var(--green);
  border-color: var(--green);
}
.fc .fc-button-primary:hover { background: var(--green-light); border-color: var(--green-light); }
.fc .fc-day-today { background: rgba(200, 169, 110, 0.08) !important; }
.fc .fc-daygrid-day.unavailable { background: var(--gray-200); cursor: not-allowed; }
.fc .fc-daygrid-day.unavailable .fc-daygrid-day-number { color: var(--gray-500); text-decoration: line-through; }
.fc .fc-daygrid-day.selected-range { background: rgba(45, 80, 22, 0.12) !important; }
.fc .fc-daygrid-day.selected-start,
.fc .fc-daygrid-day.selected-end { background: var(--green) !important; }
.fc .fc-daygrid-day.selected-start .fc-daygrid-day-number,
.fc .fc-daygrid-day.selected-end .fc-daygrid-day-number { color: var(--white) !important; }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,80,22,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* --- Room Selector --- */
.room-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.room-selector__btn {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.room-selector__btn:hover { border-color: var(--green-light); }
.room-selector__btn.active {
  border-color: var(--green);
  background: rgba(45,80,22,0.05);
}
.room-selector__btn .name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
}
.room-selector__btn .price {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
}

/* --- Booking Summary --- */
.booking-summary {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.booking-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.35rem 0;
}
.booking-summary__row.total {
  border-top: 1px solid var(--cream-dark);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info__item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.contact-info__text h4 { margin-bottom: 0.25rem; }
.contact-info__text p { color: var(--gray-700); margin-bottom: 0; font-size: 0.9rem; }
.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 400px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* --- Footer --- */
.footer {
  background: var(--green-dark);
  color: rgba(250,243,224,0.8);
  padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: var(--cream); margin-bottom: 1rem; font-family: var(--font-heading); }
.footer p { font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer a { color: var(--gold-light); }
.footer a:hover { color: var(--gold); }
.footer__links a { display: block; font-size: 0.85rem; padding: 0.25rem 0; }
.footer__bottom {
  border-top: 1px solid rgba(250,243,224,0.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* --- Intro Section --- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.intro__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.intro__image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
  .intro { grid-template-columns: 1fr; }
  .intro__image { height: 250px; }
}

/* --- Page Header --- */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--cream);
  text-align: center;
}
.page-header h1 { color: var(--cream); margin-bottom: 0.5rem; }
.page-header p { opacity: 0.85; font-size: 1.1rem; max-width: 500px; margin: 0 auto; }

/* --- Success / Error Messages --- */
.message {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.message--success { background: rgba(45,80,22,0.1); color: var(--green-dark); border: 1px solid rgba(45,80,22,0.2); }
.message--error { background: rgba(180,64,64,0.1); color: var(--red); border: 1px solid rgba(180,64,64,0.2); }

/* --- Utilities --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* --- Loading Spinner --- */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Mobile Responsive Fixes --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .section { padding: 3rem 0; }
  .page-header { padding: 5rem 0 2rem; }
  .page-header p { font-size: 0.95rem; }
  .btn { padding: 0.85rem 1.75rem; min-height: 44px; }
  .room-selector { flex-direction: column; gap: 0.5rem; }
  .room-selector__btn { flex: none; width: 100%; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .fc .fc-daygrid-day-number { font-size: 0.8rem; }
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; }
  .map-embed { height: 280px; }
  .contact-info__icon { width: 40px; height: 40px; font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .room-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .intro__image { height: 200px; }
  .booking-summary__row { font-size: 0.85rem; }
}
