/* =========================================================
   ROOT + GLOBAL SETTINGS
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Inter:wght@400;500;600&family=Poppins:wght@500;600&display=swap');
:root {
  --accent: #0b6fbf;
  --accent-dark: #094d8c;
  --muted: #666;
  --max-width: 1100px;
  --container-padding: 20px;
  --radius: 8px;
}

*{box-sizing:border-box;}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin:0;
  color:#222;
  line-height:1.45;

  /* Page fade-in animation */
  opacity: 0;
  animation: fadePage 0.6s ease-out forwards;
}

@keyframes fadePage {
  to { opacity: 1; }
}

.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:var(--container-padding);
}

/* =========================================================
   HEADER
========================================================= */
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 45px;
  width: auto;
  display: block;
}

.nav a{
  margin-left:16px;
  color:#333;
  text-decoration:none;
}

.site-header{
  background:#fff;
  box-shadow:0 1px 6px rgba(0,0,0,0.06);
  position:sticky;
  top:0;
  z-index:20;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Header animation when scrolling */
body.scrolled .site-header{
  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(8px);
  box-shadow:0 1px 10px rgba(0,0,0,0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* =========================================================
   HERO SECTION + ANIMATIONS
========================================================= */
.hero{
  min-height:420px;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:center;

  /* Fade-in + parallax drift */
  opacity:0;
  animation:
    fadeInHero 1.4s ease-out forwards,
    heroDrift 30s ease-in-out infinite alternate;
}

@keyframes fadeInHero {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

@keyframes heroDrift {
  from { background-position:center top; }
  to   { background-position:center bottom; }
}

.overlay{
  background:linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.35));
  width:100%;
}

.hero-content{
  padding:60px 20px;
  color:#fff;
  text-align:center;
}

.hero-content h1{
  font-size:36px;
  margin:0 0 10px;
}

.lead{
  font-size:18px;
  margin-bottom:18px;
  color:#f0f6fb;
}

/* Hero buttons */
.hero-ctas{
  margin-top:10px;
  display:flex;
  gap:12px;
  justify-content:center;
}

/* =========================================================
   SEARCH BAR
========================================================= */
.search-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto 20px;
}

.search-form input {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.3);
  min-width: 200px;
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.search-form input::placeholder {
  color: #666;
  font-weight: 500;
}

.search-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 4px 12px rgba(11,111,191,0.2);
}

.search-form button {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-form button:active {
  transform: translateY(0);
}

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:6px;
  text-decoration:none;
}

.btn-big{
  background:var(--accent);
  color:#fff;
  padding:12px 20px;
  border-radius:8px;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-big:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 28px rgba(11,111,191,0.25);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 3px solid #fff;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =========================================================
   CATEGORY BUTTONS
========================================================= */
.categories-section {
  padding: 50px 0 30px;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.category-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-btn:hover {
  border-color: #0b6fbf;
  color: #0b6fbf;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11,111,191,0.1);
}

/* =========================================================
   LISTINGS + CARDS + ENTRANCE ANIMATIONS
========================================================= */
.latest-listings{
  padding:24px 0;
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:16px;
}

.card{
  background:#fff;
  border:1px solid #eee;
  padding:14px;
  border-radius:8px;
  box-shadow:0 6px 20px rgba(20,20,30,0.03);

  opacity:0;
  transform:translateY(20px);
  animation:cardFade 0.6s ease-out forwards;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Staggered delays */
.cards .card:nth-child(1){ animation-delay:0.1s; }
.cards .card:nth-child(2){ animation-delay:0.2s; }
.cards .card:nth-child(3){ animation-delay:0.3s; }
.cards .card:nth-child(4){ animation-delay:0.4s; }

@keyframes cardFade {
  to {
    opacity:1;
    transform:translateY(0);
  }
}

/* Hover lift */
.card:hover{
  transform:translateY(-5px) scale(1.015);
  box-shadow:0 12px 28px rgba(0,0,0,0.12);
}

.card h3{
  margin:0 0 6px;
}

.card .meta{
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
}

.card .desc{
  font-size:14px;
  color:#333;
  margin-bottom:8px;
}

.link{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer{
  background:#f6f7fb;
  padding:18px 0;
  margin-top:30px;
}

.footer-left{
  display:inline-block;
}

.footer-links{
  float:right;
}

/* =========================================================
   FLASH MESSAGES (Auto fade out)
========================================================= */
.flash{
  position:fixed;
  right:18px;
  top:80px;
  z-index:40;
}

.alert{
  background:#fff;
  padding:10px 14px;
  border-radius:6px;
  border:1px solid #ddd;
  margin-bottom:6px;

  animation:fadeOut 4s forwards;
}

@keyframes fadeOut {
  0% { opacity:1; transform:translateY(0); }
  80% { opacity:1; }
  100% { opacity:0; transform:translateY(-10px); }
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width:700px){
  .hero-content h1{
    font-size:24px;
  }

  .nav{
    display:none;
  }

  .search-form input{
    min-width:140px;
  }

  .hero{
    min-height:520px;
  }
}
