/* ============================================================
   M REALTORS — Design System
   Primary: #B31C10 (Deep Red) | Accent: #e8191a | Dark: #111
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@600;700&display=swap');

/* ── RESET & BASE ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #B31C10;
  --red-dark: #8e1509;
  --red-light: #e8191a;
  --black: #111111;
  --dark: #1a1a1a;
  --gray-900: #222;
  --gray-700: #444;
  --gray-500: #777;
  --gray-300: #ccc;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --gold: #c9a84c;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .08);
  --shadow: 0 4px 20px rgba(0, 0, 0, .12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .18);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: .22s ease;
}

body.theme-dark {
  --white: #0f1115;
  --black: #f4f4f5;
  --dark: #171a22;
  --gray-100: #151923;
  --gray-300: #3a4255;
  --gray-500: #a6afc2;
  --gray-700: #c7d0e2;
  --gray-900: #eceef3;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .38);
  --shadow: 0 4px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
  background: #0f1115;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.theme-toggle {
  position: fixed;
  right: 16px;
  bottom: 90px;
  z-index: 1200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #d8dbe4;
  background: #fff;
  color: #111;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  display: grid;
  place-items: center;
}

body.theme-dark .theme-toggle {
  background: #1a1f2b;
  color: #f5f7ff;
  border-color: #2a3245;
}

/* ── UTILITIES ───────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-sm {
  padding: 48px 0;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.gap-32 {
  gap: 32px;
}

.text-center {
  text-align: center;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.25;
}

.section-subtitle {
  font-size: 15px;
  color: var(--gray-500);
  margin-top: 8px;
  max-width: 560px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(179, 28, 16, .35);
}

.btn-outline {
  border: 2px solid var(--red);
  color: var(--red);
}

.btn-outline:hover {
  background: var(--red);
  color: white;
}

.btn-white {
  background: white;
  color: var(--red);
  font-weight: 700;
}

.btn-white:hover {
  background: var(--gray-100);
}

/* ── TOP BAR ─────────────────────────────────────────────── */
.topbar {
  background: var(--black);
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-left {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-left span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-left span svg {
  opacity: .7;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right a {
  color: rgba(255, 255, 255, .65);
  font-size: 16px;
  transition: color var(--transition);
}

.topbar-right a:hover {
  color: var(--red-light);
}

/* ── HEADER / NAV ────────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.5px;
}

.logo-text span {
  color: var(--red);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.nav-links > a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-links > a:hover,
.nav-links > a.active {
  color: var(--red);
  background: rgba(179, 28, 16, .06);
}

.nav-links>li {
  position: relative;
}

.nav-links>li>a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-links>li>a:hover,
.nav-links>li>a.active {
  color: var(--red);
  background: rgba(179, 28, 16, .06);
}

.nav-links>li>a svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.nav-links>li:hover>a svg {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid #eee;
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 200;
}

.nav-links>li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.dropdown a:hover {
  background: rgba(179, 28, 16, .06);
  color: var(--red);
}

.dropdown a .dd-icon {
  width: 32px;
  height: 32px;
  background: var(--gray-100);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-search-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  display: grid;
  place-items: center;
  color: var(--gray-700);
  transition: var(--transition);
}

.nav-search-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.nav-add-btn {
  background: var(--red);
  color: white;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-add-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0402 0%, #2a0a07 55%, #140305 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* Gradient shows instantly while image loads */
  background-color: #1a0402;
  background-image:
    image-set(url('hero-bg.webp') type('image/webp'),
      url('hero-bg.jpg') type('image/jpeg'));
  /* Fallback for browsers that don't support image-set */
  background-image: url('hero-bg.webp');
  background-size: cover;
  background-position: center top;
  transform: scale(1.04) translateY(0);
  transition: transform 8s ease;
  will-change: transform;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, .62) 0%, rgba(10, 10, 10, .75) 100%);
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 60px 24px 80px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-title span {
  color: var(--red-light);
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 36px;
}

/* Search Box */
.search-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 8px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.search-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  background: var(--gray-100);
  border-radius: 8px;
  padding: 4px;
}

.search-tab {
  flex: 1;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-500);
  border-radius: 6px;
  transition: var(--transition);
}

.search-tab.active {
  background: var(--red);
  color: white;
  box-shadow: 0 2px 8px rgba(179, 28, 16, .35);
}

.search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 0;
}

.search-field label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: 4px;
}

.search-field select,
.search-field input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.search-field select {
  cursor: pointer;
}

.search-btn {
  background: var(--red);
  color: white;
  border-radius: var(--radius);
  padding: 0 32px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.search-extras {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding: 0 4px 4px;
  flex-wrap: wrap;
}

.search-extra-btn {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}

.search-extra-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── BROWSE CATEGORIES ────────────────────────────────────── */
.browse-section {
  background: white;
  padding: 52px 0;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.browse-card {
  border: 1.5px solid #eee;
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.browse-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.browse-card:hover .browse-icon {
  background: var(--red);
  color: white;
}

.browse-icon {
  width: 56px;
  height: 56px;
  background: rgba(179, 28, 16, .08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  transition: var(--transition);
  color: var(--red);
}

.browse-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
}

.browse-count {
  font-size: 12px;
  color: var(--gray-500);
}

/* ── FEATURED PROJECTS ────────────────────────────────────── */
.featured-section {
  background: var(--gray-100);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
  position: relative;
}

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

.project-card:hover .project-img img {
  transform: scale(1.06);
}

.project-img {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.project-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 4px 10px;
  border-radius: 4px;
}

.project-badge.commercial {
  background: #0066cc;
}

.project-badge.residential {
  background: #00aa55;
}

.project-badge.plots {
  background: #e67e00;
}

.project-badge.apartments {
  background: #7b2fbe;
}

.project-fav {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  color: var(--gray-500);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.project-fav:hover {
  color: var(--red);
}

.project-info {
  padding: 18px 20px 20px;
}

.project-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 6px;
}

.project-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}

.project-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
}

.project-location svg {
  color: var(--red);
  flex-shrink: 0;
}

.project-specs {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}

.spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-500);
}

.spec svg {
  color: var(--gray-400);
}

/* ── TOOLS SECTION ────────────────────────────────────────── */
.tools-section {
  background: white;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1.5px solid #eee;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.tool-card:hover {
  border-color: var(--red);
  background: rgba(179, 28, 16, .02);
  box-shadow: var(--shadow);
}

.tool-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.tool-text h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.tool-text p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ── STATS BANNER ─────────────────────────────────────────── */
.stats-banner {
  background: linear-gradient(135deg, var(--black) 0%, #2a0805 60%, var(--red-dark) 100%);
  padding: 60px 0;
}

.stats-banner-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-item-num {
  font-size: 42px;
  font-weight: 900;
  color: white;
  line-height: 1;
}

.stat-item-num span {
  color: var(--red-light);
}

.stat-item-label {
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── PROCESS SECTION ─────────────────────────────────────── */
.process-section {
  background: var(--gray-100);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::after {
  content: '→';
  position: absolute;
  right: -12px;
  top: 24px;
  font-size: 22px;
  color: var(--gray-300);
}

.process-step:last-child::after {
  display: none;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 16px rgba(179, 28, 16, .3);
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ── LOCATIONS ─────────────────────────────────────────────── */
.locations-section {
  background: white;
}

.loc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 6px;
  width: fit-content;
}

.loc-tab {
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  transition: var(--transition);
  cursor: pointer;
}

.loc-tab.active {
  background: var(--red);
  color: white;
  box-shadow: 0 2px 8px rgba(179, 28, 16, .3);
}

.loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.loc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid #eee;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.loc-item:hover {
  border-color: var(--red);
  color: var(--red);
}

.loc-count {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}

/* ── CTA STRIP ────────────────────────────────────────────── */
.cta-strip {
  background: linear-gradient(120deg, var(--red) 0%, #8e0e05 100%);
  padding: 56px 0;
  text-align: center;
}

.cta-strip h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3vw, 36px);
  color: white;
  margin-bottom: 10px;
}

.cta-strip p {
  color: rgba(255, 255, 255, .8);
  font-size: 16px;
  margin-bottom: 28px;
}

.cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── TESTIMONIALS ─────────────────────────────────────────── */
.testimonials-section {
  background: var(--gray-100);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 72px;
  font-family: 'Playfair Display', serif;
  color: rgba(179, 28, 16, .1);
  line-height: 1;
}

.stars {
  color: #f59e0b;
  margin-bottom: 12px;
  font-size: 16px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.author-name {
  font-size: 14px;
  font-weight: 700;
}

.author-loc {
  font-size: 12px;
  color: var(--gray-500);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: #0d0d0d;
  color: rgba(255, 255, 255, .7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 48px;
}

.footer-brand {
  margin-bottom: 0;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: white;
}

.footer-logo span {
  color: var(--red-light);
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  margin: 16px 0 24px;
  color: rgba(255, 255, 255, .55);
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .15);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .6);
  font-size: 16px;
  transition: var(--transition);
}

.footer-social:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: white;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, .5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--red-light);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 14px;
  line-height: 1.5;
}

.footer-contact-item svg {
  color: var(--red-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, .4);
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--red-light);
}

/* ── WHATSAPP FLOAT ───────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .4);
  z-index: 9999;
  transition: var(--transition);
  animation: pulse 2.5s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37, 211, 102, .6);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 6px 24px rgba(37, 211, 102, .4);
  }

  50% {
    box-shadow: 0 6px 32px rgba(37, 211, 102, .7), 0 0 0 10px rgba(37, 211, 102, .1);
  }
}

/* ── SCROLL TO TOP ────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 94px;
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.scroll-top.show {
  opacity: 1;
  pointer-events: all;
}

.scroll-top:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

/* ── CALCULATOR MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 36px;
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform var(--transition);
  position: relative;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-700);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--red);
  color: white;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--black);
}

.calc-group {
  margin-bottom: 18px;
}

.calc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  display: block;
}

.calc-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.calc-input:focus {
  border-color: var(--red);
}

.calc-result {
  background: rgba(179, 28, 16, .05);
  border: 1.5px solid rgba(179, 28, 16, .2);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-top: 20px;
}

.calc-result-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calc-result-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
  margin-top: 4px;
}

/* ── BLOG PREVIEW SECTION ─────────────────────────────────────── */
.blog-preview-section {
  background: var(--gray-100);
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.blog-preview-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-preview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.blog-preview-img {
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  position: relative;
}

.blog-cat-badge {
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .35);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
}

.blog-preview-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-preview-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.blog-preview-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 10px;
}

.blog-preview-excerpt {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

.blog-preview-read {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-top: auto;
}

.blog-preview-card:hover .blog-preview-read {
  text-decoration: underline;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

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

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar-left span:nth-child(2) {
    display: none;
  }

  .nav-links,
  .nav-actions .nav-add-btn span {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid #eee;
    z-index: 100;
  }

  .nav-links.open>li>a {
    padding: 12px 16px;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-btn {
    padding: 14px;
    justify-content: center;
  }

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

  .hero-stats {
    gap: 24px;
  }

  .process-step::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }
}