/* Messo - Premium Design System (Antigravity V2) */
:root {
  /* Messo Brand Color System */
  --messo-primary: #FF4D00;      /* Vermilion */
  --messo-secondary: #6E6F71;    /* Dark Silver */
  --messo-white: #FFFFFF;
  --messo-black: #000000;
  --messo-bg-light: #F5F5F5;     /* Light Gray */
  
  /* Mappings for backward compatibility (during refactor) or simplified usage */
  --text-primary: var(--messo-black);
  --text-secondary: var(--messo-secondary);
  --text-light: #9CA3AF; /* Keeping for now, check usage */
  
  /* UI Elements */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 25px 50px -12px rgba(255, 77, 0, 0.25); /* Updated to primary color shadow */
  
  /* Layout */
  --container-max: 1280px;
  --navbar-height: 80px;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background-color: var(--messo-bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Utilities */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--messo-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.logo {
  height: 48px;
  width: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}

.navbar-links {
  display: flex;
  gap: 32px;
}

.navbar-links a {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--messo-primary);
}

.navbar-links a.active {
  font-weight: 700;
}

/* Mobile Toggle */
.menu-toggle { display: none; padding: 12px; z-index: 1001; }
.menu-icon { width: 24px; height: 2px; background: var(--text-primary); position: relative; display: block; transition: all 0.3s; }
.menu-icon::before, .menu-icon::after {
  content: ''; position: absolute; left: 0; width: 24px; height: 2px; background: inherit; transition: 0.3s;
}
.menu-icon::before { top: -8px; }
.menu-icon::after { top: 8px; }

/* Mobile Menu Active State (Hamburger to X) */
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

/* Responsive Navigation */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .navbar-links {
        position: fixed;
        top: 0; right: -100%; /* Slide out */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 100px 32px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        gap: 24px;
    }

    .navbar-links.active {
        right: 0; /* Slide in */
    }

    .navbar-links a {
        font-size: 1.2rem;
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
}

/* Global Responsive Adjustments */
@media (max-width: 768px) {
    .section { padding: 40px 0; }
    
    .hero { min-height: 500px; }
    .hero h1 { font-size: 2.5rem; }
    
    /* Ensure grids stack */
    .features-grid, .room-grid, .product-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}

/* Hero Section */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* background-image: url('../images/hero-bg.jpg'); You can uncomment if you have a real image */
  background: linear-gradient(135deg, #e0f2f1 0%, #f0f4f8 100%); /* Fallback gradient */
  overflow: hidden;
}

/* Hero Decorative Blob */
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--messo-bg-light) 0%, transparent 70%);
  opacity: 0.6;
  z-index: 0;
}

/* Premium Dark Footer (Redesign) */
.footer {
  background: #111111; /* Deep charcoal/black */
  color: #a3a3a3;
  padding: 80px 0 30px;
  margin-top: 100px;
  border-top: 4px solid var(--messo-primary); /* Vermilion Top Border */
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

/* Brand Column */
.footer-brand-link {
  color: white !important;
  font-size: 1.8rem;
  margin-bottom: 20px;
  display: inline-flex;
}

.footer-tagline {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 300px;
  line-height: 1.6;
}

/* Headings */
.footer h4 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

/* Links */
.footer ul li { margin-bottom: 14px; }
.footer a { 
  color: #a3a3a3; 
  transition: all 0.3s ease; 
  font-size: 0.95rem;
}

.footer a:hover { 
  color: var(--messo-primary); /* Vermilion Hover */
  padding-left: 4px; /* Subtle movement */
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 16px;
  margin-top: 0;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--messo-primary);
  color: white;
  transform: translateY(-4px);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Newsletter / Contact */
.footer-contact-item {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.footer-contact-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.footer-email-link {
    color: white !important;
    font-size: 1.1rem;
    font-weight: 700;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
    gap: 8px;
}

.newsletter-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 16px;
    color: white;
    font-family: inherit;
    width: 100%;
    outline: none;
    transition: 0.3s;
}

.newsletter-input:focus {
    border-color: var(--messo-primary);
}

.newsletter-btn {
    background: var(--messo-primary);
    color: white;
    border-radius: 8px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.newsletter-btn:hover {
    filter: brightness(1.1);
}

/* Copyright */
.footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 32px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  text-align: left;
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-copyright {
      flex-direction: column;
      text-align: center;
      gap: 16px;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.hero h1 span {
  color: var(--messo-primary);
  background: linear-gradient(to right, var(--messo-primary), var(--messo-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   HERO SEARCH PILL (Messo Custom)
   ========================================= */

.hero-search-wrapper {
  margin-top: -30px; /* Pull up to overlap hero or sit nicely */
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
}

.search-pill-container {
  width: 100%;
  max-width: 720px; /* ~60-70% of desktop container */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-search-form {
  width: 100%;
  background: white;
  border-radius: 100px;
  padding: 6px; /* Inner padding for "floating button" look */
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.12); /* Soft shadow */
  display: flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-search-form:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px -10px rgba(0,0,0,0.15);
  border-color: rgba(255, 77, 0, 0.2);
}

.input-group {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding-left: 20px;
  position: relative;
}

.search-icon {
  color: var(--text-light);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero-search-input {
  width: 100%;
  height: 52px; /* Minimum touch target */
  border: none;
  outline: none;
  font-size: 1.05rem;
  padding: 0 16px;
  color: var(--text-primary);
  background: transparent;
  font-family: inherit;
}

.hero-search-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

.hero-search-btn {
  background: var(--messo-primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 0 32px;
  height: 52px; /* Match input height */
  border-radius: 100px; /* Fully rounded button */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.hero-search-btn:hover {
  background: #E64500; /* Darker Vermilion */
}

.search-helpers {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9); /* Assuming it sits on Hero Image/Gradient, adjust if on white */
  display: flex;
  gap: 8px;
  opacity: 0.8;
}

/* Make helpers visible on white background if hero is light */
.hero + .hero-search-wrapper .search-helpers {
    color: var(--text-secondary);
}

/* Mobile Responsive Rules */
@media (max-width: 600px) {
  .hero-search-form {
    border-radius: 16px; /* Slightly less rounded on mobile to safe space? Or keep pill. keeping pill for now but stack if needed. */
    flex-direction: row; /* Keep row input + button icon? Instruction says "Button must be inside or attached" */
    padding: 4px;
  }
  
  .hero-search-input {
    font-size: 16px; /* Prevent IOS zoom */
  }

  .hero-search-btn {
    padding: 0 20px;
    font-size: 0.9rem;
  }
}

/* Section Common */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.03);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 64px; height: 64px;
  background: var(--messo-bg-light);
  color: var(--messo-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
}

/* Room Grid (Refined & Redesigned) */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.room-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.room-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-float);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.room-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.room-card:hover .room-img {
  transform: scale(1.1);
}

.room-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.room-tag {
  position: absolute;
  top: 16px; left: 16px;
  right: auto; /* Reset right if needed */
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--messo-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.room-info h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--messo-black);
    line-height: 1.3;
}

.room-price {
  font-size: 1.5rem;
  color: var(--messo-primary);
  font-weight: 900;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.room-price .currency {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.view-details-btn {
    margin-top: auto;
    display: inline-block;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    border-radius: var(--radius-md);
    background-color: var(--messo-bg-light);
    color: var(--messo-black);
    font-weight: 700;
    transition: all 0.3s ease;
}

.room-card:hover .view-details-btn {
    background-color: var(--messo-primary);
    color: white;
}

/* Product Cards (New) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-card:hover {
    border-color: var(--messo-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--messo-bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply; /* Optional: Helps if images have white bg */
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.product-price {
    font-size: 1.25rem;
    color: var(--messo-primary);
    font-weight: 800;
    margin-bottom: 16px;
}

.product-btn {
    padding: 10px 24px;
    border: 2px solid var(--text-secondary);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.product-card:hover .product-btn {
    border-color: var(--messo-primary);
    background: var(--messo-primary);
    color: white;
}

/* =========================================
   SEARCH PAGE LAYOUT (Tripster Redesign)
   ========================================= */

.search-page-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
    align-items: start;
}

/* Sidebar Styling */
.sidebar-search {
    background: white;
    padding: 32px; /* Increased padding */
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px; /* Below navbar */
    height: auto;
    /* Removed shadow for cleaner look, added border */
    border: 1px solid rgba(0,0,0,0.04); 
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-group {
    margin-bottom: 20px;
}

.sidebar-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sidebar-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--messo-secondary);
    width: 18px;
    height: 18px;
}

.sidebar-input {
    width: 100%;
    padding: 14px 16px 14px 44px; /* Space for icon */
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #F9FAFB;
    transition: all 0.2s;
}

.sidebar-input:focus {
    outline: none;
    border-color: var(--messo-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1);
}

.sidebar-btn {
    width: 100%;
    background: var(--messo-primary); /* Keeping brand color, User asked for Tripster style which is blue, but brand is Vermilion. Sticking to Brand. */
    color: white;
    padding: 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 12px;
    transition: filter 0.2s;
}

.sidebar-btn:hover {
    filter: brightness(1.1);
}

/* Horizontal Room Card */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.room-card-horizontal {
    display: flex; /* Horizontal Layout */
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 260px; /* Fixed height for consistency */
}

.room-card-horizontal:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(0,0,0,0.0);
}

.h-room-img-wrapper {
    width: 320px; /* Fixed width image */
    flex-shrink: 0;
    position: relative;
}

.h-room-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.h-room-content {
    flex-grow: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Section: Title & Rating */
.h-room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.h-room-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.h-room-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-badge {
    background: #E0F2F1; /* Light Teal/Green */
    color: #00695C;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Middle Section: Amenities via Tags */
.h-room-amenities {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.amenity-tag {
    font-size: 0.8rem;
    color: var(--messo-primary);
    background: rgba(255, 77, 0, 0.08); /* Brand clear tint */
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 600;
}

/* Bottom Section: Price & Action */
.h-room-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 16px;
}

.h-room-price-block {
    display: flex;
    flex-direction: column;
}

.h-room-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--messo-black);
}

.h-room-price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stay-info {
    font-size: 0.8rem;
    color: var(--text-light);
}

.h-room-btn {
    background: #2563EB; /* Tripster Blue */
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    transition: 0.2s;
}

.h-room-btn:hover {
    background: #1D4ED8;
}

/* Responsive */
@media (max-width: 900px) {
    .search-page-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sidebar-search {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .sidebar-title { grid-column: 1 / -1; margin-bottom: 8px; }
    .sidebar-btn { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .sidebar-search {
        display: block; /* Stack sidebar inputs */
    }

    .room-card-horizontal {
        flex-direction: column;
        height: auto;
    }
    
    .h-room-img-wrapper {
        width: 100%;
        height: 200px;
    }
    
    .h-room-footer {
        align-items: center;
    }
}

