/*
Theme Name: Warsaw Rentals
Theme URI: https://warsaw-rentals.local
Description: Warsaw apartment rental theme with shadcn/ui design system. 3 content variants demo.
Author: WP VibeDev
Version: 1.0.0
Text Domain: warsaw-rentals
*/

/* ============================================================
   SHADCN/UI CSS VARIABLES — Design Token System
   ============================================================ */
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.5rem;

  /* Custom brand */
  --brand-blue: #2563eb;
  --brand-dark: #0f172a;
  --brand-light: #f8fafc;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-heading: 'Syne', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   SHADCN/UI COMPONENTS
   ============================================================ */

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(221.2 83.2% 46%); color: hsl(var(--primary-foreground)); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: hsl(var(--border)); }
.btn-outline { background: transparent; color: hsl(var(--primary)); border-color: hsl(var(--border)); }
.btn-outline:hover { background: hsl(var(--accent)); }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: calc(var(--radius) + 2px); }

/* Card */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-header { padding: 1.5rem 1.5rem 0; }
.card-content { padding: 1rem 1.5rem; }
.card-footer { padding: 0 1.5rem 1.5rem; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: calc(var(--radius) * 2);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }

/* Separator */
.separator { height: 1px; background: hsl(var(--border)); margin: 1.5rem 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: 5rem; }
.section-sm { padding-block: 3rem; }
.section-lg { padding-block: 7rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(var(--background) / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.03em;
}
.site-logo span { color: hsl(var(--primary)); }
.site-logo:hover { text-decoration: none; color: hsl(var(--foreground)); }

/* Nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.main-nav a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover, .main-nav .current-menu-item > a {
  color: hsl(var(--foreground));
  background: hsl(var(--accent));
  text-decoration: none;
}
.header-cta { margin-left: 1rem; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: hsl(var(--foreground));
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: hsl(var(--brand-dark) / 1);
  background: #0f172a;
  color: #94a3b8;
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
.footer-brand .site-logo { color: white; margin-bottom: 0.75rem; display: block; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 0.5rem; }
.footer-col a { color: #94a3b8; font-size: 0.875rem; transition: color 0.15s; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }

/* ============================================================
   LANDING BLOCKS — SHARED STYLES
   ============================================================ */

/* Hero */
.hero-block {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
  color: white;
  padding-block: 6rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero-badge { margin-bottom: 1.5rem; }
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}
.hero-title span { color: #60a5fa; }
.hero-subtitle { font-size: 1.125rem; color: #94a3b8; margin-bottom: 2rem; max-width: 480px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 3rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.stat-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: white; }
.stat-label { font-size: 0.875rem; color: #64748b; }

/* Features */
.features-block { background: hsl(var(--background)); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.section-eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: hsl(var(--primary)); margin-bottom: 0.75rem; }
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}
.section-desc { color: hsl(var(--muted-foreground)); font-size: 1.0625rem; line-height: 1.7; }

.feature-card .card-content { padding: 1.75rem; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: hsl(var(--primary) / 0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.feature-card h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }

/* Apartments */
.apartments-block { background: hsl(var(--muted)); }
.apartment-card .apt-image {
  height: 220px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  position: relative;
  overflow: hidden;
}
.apt-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}
.apt-price {
  position: absolute; top: 1rem; right: 1rem;
  background: white; color: hsl(var(--foreground));
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 700; font-size: 0.95rem;
}
.apt-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: hsl(var(--muted-foreground)); margin: 0.75rem 0; }
.apt-meta span { display: flex; align-items: center; gap: 0.25rem; }
.apt-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.apt-location { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.75rem; }

/* CTA */
.cta-block {
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
  color: white;
  text-align: center;
}
.cta-block .section-title { color: white; }
.cta-block .section-desc { color: rgba(255,255,255,0.75); }
.cta-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.btn-white { background: white; color: #1d4ed8; font-weight: 600; }
.btn-white:hover { background: #f0f4ff; color: #1d4ed8; }
.btn-ghost-white { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); color: white; }

/* ============================================================
   VARIANT BADGES (for demo)
   ============================================================ */
.variant-banner {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.variant-banner.v1 { background: #dcfce7; color: #166534; border-bottom: 2px solid #16a34a; }
.variant-banner.v2 { background: #fef3c7; color: #92400e; border-bottom: 2px solid #d97706; }
.variant-banner.v3 { background: #ede9fe; color: #5b21b6; border-bottom: 2px solid #7c3aed; }

/* ============================================================
   VARIANT 1 — React/ACF loading state
   ============================================================ */
#react-landing-root { min-height: 200px; }
.react-loading { display: flex; align-items: center; justify-content: center; padding: 4rem; gap: 1rem; color: hsl(var(--muted-foreground)); font-size: 0.9rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border)); padding: 1rem; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: 0.75rem 1rem; }
  .header-cta { display: none; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   ELEMENTOR WRAPPER RESET — убираем все конфликтующие отступы
   Применяется только на страницах с Elementor
   ============================================================ */
.elementor-section.elementor-element {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.elementor-column-gap-default > .elementor-column > .elementor-column-wrap {
  padding: 0 !important;
}
.elementor-column-wrap,
.elementor-widget-wrap {
  padding: 0 !important;
}
/* Убираем gap между колонками в inner секциях */
.elementor-inner-section {
  padding: 0 !important;
  margin: 0 !important;
}
.elementor-inner-section .elementor-column {
  padding: 0 !important;
}
/* Elementor heading без лишних margin */
.elementor-widget-heading .elementor-heading-title {
  line-height: inherit;
}
/* Elementor text-editor p без лишних margin */
.elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}
/* Elementor не должен добавлять min-height к секциям */
.elementor-section > .elementor-container {
  min-height: unset;
}

/* ============================================================
   ELEMENTOR PAGE — точное совпадение с ACF
   ============================================================ */

/* Hero: ограничиваем ширину колонки как .container в теме */
.page-id-13 .elementor-section > .elementor-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Hero фон — точный градиент как в .hero-block */
.page-id-13 .elementor-top-section:first-child {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%) !important;
  position: relative;
}
.page-id-13 .elementor-top-section:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.page-id-13 .elementor-top-section:first-child .elementor-widget-wrap {
  position: relative;
  z-index: 1;
}

/* Hero padding — как в .hero-block */
.page-id-13 .elementor-top-section:first-child > .elementor-container > .elementor-column > .elementor-widget-wrap {
  padding: 6rem 0 5rem !important;
}

/* Убираем белые дыры между секциями */
.page-id-13 .elementor-top-section > .elementor-container {
  padding-block: 0;
}
