/* ==========================================
   B&B MANAGER — Public Site Stylesheet
   Warm, elegant, mobile-first
   ========================================== */

:root {
  --primary: #8B5E3C;
  --primary-light: #A67C5B;
  --primary-dark: #6B4226;
  --secondary: #2D6A4F;
  --secondary-light: #40916C;
  --accent: #D4A574;
  --gold: #C9A96E;
  --text: #2C2C2C;
  --text-light: #6B6B6B;
  --text-muted: #9CA3AF;
  --bg: #FDFBF7;
  --bg-alt: #F5F0E8;
  --bg-card: #FFFFFF;
  --bg-warm: #FAF6F0;
  --border: #E8E0D4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* --- NAVBAR --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(253,251,247,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.navbar.scrolled {
  background: rgba(253,251,247,0.97);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; }
.navbar-logo img { height: 38px; width: auto; }
.navbar-logo span {
  font-size: 18px; font-weight: 700; color: var(--primary-dark);
  letter-spacing: -0.3px;
}
.navbar-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.navbar-links li a {
  color: var(--text-light); font-weight: 500; font-size: 14px;
  padding: 8px 14px; border-radius: 8px;
  transition: all var(--transition);
}
.navbar-links li a:hover { color: var(--primary-dark); background: var(--bg-alt); }
.navbar-cta {
  background: var(--primary) !important; color: #fff !important;
  padding: 10px 22px !important; border-radius: 50px !important;
  font-weight: 600 !important; font-size: 13px !important;
  letter-spacing: 0.3px; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(139,94,60,0.25);
}
.navbar-cta:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,94,60,0.35) !important;
}
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border);
  font-size: 20px; cursor: pointer; color: var(--text);
  width: 42px; height: 42px; border-radius: 10px;
  align-items: center; justify-content: center;
}

/* --- HERO --- */
.hero {
  position: relative;
  display: flex;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
  transform-origin: center center;
}
.hero-overlay {
  position: absolute; inset: 0;
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  width: 100%; max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px;
  color: white; text-align: center;
  justify-content: center; align-items: center;
  box-sizing: border-box;
}
.hero-content h1 {
  font-weight: 800; line-height: 1.08;
  margin-bottom: 16px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
  letter-spacing: -1px;
}
.hero-content p {
  margin-bottom: 36px; line-height: 1.6;
  font-weight: 300;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: 15px;
  transition: all var(--transition); cursor: pointer;
  border: 2px solid transparent; letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--accent); color: var(--primary-dark);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(212,165,116,0.4);
}
.btn-primary:hover {
  background: #E0B88A; color: var(--primary-dark);
  transform: translateY(-2px); box-shadow: 0 6px 28px rgba(212,165,116,0.5);
}
.btn-outline {
  border-color: rgba(255,255,255,0.6); color: white;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); color: white; border-color: white; }
.btn-green { background: var(--secondary); color: white; border: none; }
.btn-green:hover { background: var(--secondary-light); transform: translateY(-2px); }

/* --- SECTIONS --- */
.section { padding: 100px 24px; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1140px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800; color: var(--text); margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-header p { font-size: 16px; color: var(--text-light); max-width: 560px; margin: 0 auto; line-height: 1.7; }
.section-label {
  display: inline-block; background: var(--accent);
  color: var(--primary-dark); font-size: 11px; font-weight: 700;
  padding: 5px 16px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 14px;
}

/* --- ROOM CARDS --- */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.room-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.room-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--accent); }
.room-card-img { position: relative; height: 240px; overflow: hidden; }
.room-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease;
}
.room-card:hover .room-card-img img { transform: scale(1.06); }
.room-card-price {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(255,255,255,0.95); color: var(--primary-dark);
  padding: 8px 16px; border-radius: 50px;
  font-weight: 700; font-size: 17px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.room-card-price small { font-size: 12px; font-weight: 400; color: var(--text-light); }
.room-card-body { padding: 22px 24px 24px; }
.room-card-body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.room-card-body > p { color: var(--text-light); font-size: 14px; margin-bottom: 16px; line-height: 1.6; }
.room-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.room-amenity {
  background: var(--bg-warm); padding: 5px 12px;
  border-radius: 50px; font-size: 12px; color: var(--text-light);
  border: 1px solid var(--border);
}
.room-card-cta {
  display: block; text-align: center; padding: 13px;
  background: var(--primary); color: white !important;
  border-radius: var(--radius-sm); font-weight: 600;
  font-size: 14px; letter-spacing: 0.3px;
  transition: all var(--transition);
}
.room-card-cta:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,94,60,0.25); }

/* --- FEATURES / SERVICES --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-card); padding: 28px 24px;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  text-align: center; transition: all var(--transition);
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--primary-dark); }
.feature-card p { color: var(--text-light); font-size: 13px; line-height: 1.6; }

/* --- REVIEWS --- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.review-card {
  background: var(--bg-card); padding: 28px;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
}
.review-card::before {
  content: '"'; position: absolute; top: 16px; right: 24px;
  font-size: 60px; color: var(--accent); opacity: 0.3;
  font-family: Georgia, serif; line-height: 1;
}
.review-stars { color: var(--gold); font-size: 18px; margin-bottom: 12px; letter-spacing: 2px; }
.review-text { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.review-author { font-weight: 700; color: var(--primary-dark); font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* --- BOOKING FORM --- */
.booking-widget {
  background: var(--bg-card); padding: 32px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 800px; margin: 0 auto;
}
.booking-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 16px; align-items: end; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-size: 12px; font-weight: 600; color: var(--text-light);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px;
  transition: all var(--transition);
  font-family: inherit; color: var(--text);
  background: var(--bg);
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(139,94,60,0.1);
}
.form-full { grid-column: 1 / -1; }
.form-submit {
  padding: 14px 28px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap; letter-spacing: 0.3px;
}
.form-submit:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,94,60,0.25); }

/* --- CONTACT --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-warm); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.contact-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; color: var(--primary-dark); }
.contact-item p { color: var(--text-light); font-size: 13px; }
.map-container { border-radius: var(--radius); overflow: hidden; min-height: 360px; border: 1px solid var(--border); }
.map-container iframe { width: 100%; height: 100%; border: 0; min-height: 360px; }

/* --- FOOTER --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 0;
}
.footer-top {
  max-width: 1140px; margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p {
  color: rgba(255,255,255,0.55); font-size: 13px;
  margin-top: 10px; line-height: 1.7;
}
.footer h4 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 16px;
  color: var(--accent);
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  color: rgba(255,255,255,0.6); font-size: 13px;
  transition: all var(--transition);
}
.footer ul a:hover { color: #fff; padding-left: 4px; }
.footer-bottom {
  max-width: 1140px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.35); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--primary-dark); }

/* --- CHATBOT --- */
.chatbot-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  font-size: 24px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(139,94,60,0.35);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.chatbot-toggle:hover { transform: scale(1.08); background: var(--primary-dark); }
.chatbot-window {
  position: fixed; bottom: 92px; right: 24px; z-index: 9998;
  width: 360px; max-height: 480px;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-xl); overflow: hidden;
  display: none; flex-direction: column;
  border: 1px solid var(--border);
}
.chatbot-window.open { display: flex; }
.chatbot-header {
  background: var(--primary); color: white; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
}
.chatbot-header-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; }
.chatbot-header h4 { font-size: 14px; font-weight: 600; flex: 1; }
.chatbot-close { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 20px; cursor: pointer; }
.chatbot-close:hover { color: white; }
.chatbot-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 320px;
}
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.chat-msg.bot { background: var(--bg-alt); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chatbot-input {
  display: flex; border-top: 1px solid var(--border); padding: 10px;
}
.chatbot-input input {
  flex: 1; border: none; outline: none; font-size: 13px; padding: 8px;
  font-family: inherit; background: transparent;
}
.chatbot-input button {
  background: var(--primary); color: white; border: none;
  padding: 8px 16px; border-radius: var(--radius-xs);
  cursor: pointer; font-weight: 600; font-size: 13px;
}
.chatbot-input button:hover { background: var(--primary-dark); }

/* --- ALERTS --- */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-size: 14px; font-weight: 500;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }

/* --- PAYMENT METHODS --- */
.payment-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; margin: 12px 0; }
.payment-method {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--bg);
}
.payment-method:hover { border-color: var(--primary); background: var(--bg-warm); }
.payment-method.selected { border-color: var(--primary); background: var(--bg-warm); box-shadow: 0 0 0 3px rgba(139,94,60,0.12); }
.payment-method input[type="radio"] { display: none; }
.payment-method .pm-icon { font-size: 24px; margin-bottom: 6px; }
.payment-method .pm-label { font-weight: 600; font-size: 13px; color: var(--text); }
.payment-method .pm-desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* --- ADMIN FORM compat --- */
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-form .form-group { margin-bottom: 0; }

/* --- SPINNER --- */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.92); display: none;
  align-items: center; justify-content: center;
}
.lightbox.open, .lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: var(--radius-sm); }
.lightbox .close, .lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: rgba(255,255,255,0.7);
  font-size: 32px; cursor: pointer;
}
.lightbox .close:hover, .lightbox-close:hover { color: white; }
.lightbox .nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.6); font-size: 40px;
  cursor: pointer; background: none; border: none; padding: 16px;
}
.lightbox .nav:hover { color: white; }
.lightbox .nav.prev { left: 8px; }
.lightbox .nav.next { right: 8px; }

/* ======================================
   RESPONSIVE — Mobile First Fixes
   ====================================== */
@media (max-width: 768px) {
  .navbar-inner { padding: 0 16px; height: 60px; }
  .navbar-logo span { font-size: 15px; }
  .navbar-links { display: none; }
  .menu-toggle { display: flex; }
  .navbar-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg); padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
  }
  .navbar-links.open li a { padding: 12px 16px; display: block; border-radius: 8px; }
  .navbar-links.open .navbar-cta {
    text-align: center; display: block; margin-top: 8px;
  }

  .hero { min-height: 50vh; }
  .hero-content h1 { letter-spacing: -0.5px; }
  .hero-content p { margin-bottom: 28px; }
  .hero-buttons { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .hero-buttons .btn { justify-content: center; padding: 14px 24px; font-size: 14px; }

  .section { padding: 60px 16px; }
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: 24px; }
  .section-header p { font-size: 14px; }
  .section-label { font-size: 10px; padding: 4px 12px; }

  .rooms-grid { grid-template-columns: 1fr; gap: 20px; }
  .room-card-img { height: 200px; }
  .room-card-body { padding: 18px 20px 20px; }
  .room-card-body h3 { font-size: 18px; }
  .room-card-price { font-size: 15px; padding: 6px 14px; }

  .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-card { padding: 20px 16px; }
  .feature-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .feature-card h3 { font-size: 14px; }
  .feature-card p { font-size: 12px; }

  .reviews-grid { grid-template-columns: 1fr; gap: 16px; }
  .review-card { padding: 20px; }

  .booking-widget { padding: 20px 16px; }
  .booking-form { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-group input, .form-group select, .form-group textarea { padding: 12px; font-size: 16px; }
  .form-submit { width: 100%; }

  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .map-container { min-height: 260px; }
  .map-container iframe { min-height: 260px; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 16px 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; padding: 16px; }

  .chatbot-window { width: calc(100vw - 32px); right: 16px; bottom: 88px; max-height: 60vh; }
  .chatbot-toggle { width: 50px; height: 50px; font-size: 22px; bottom: 20px; right: 16px; }

  /* Booking page specific */
  .admin-form .form-row { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .hero-content { padding: 30px 16px; }
  .room-amenities { gap: 4px; }
  .room-amenity { font-size: 11px; padding: 4px 10px; }
}
