/* ==========================================================================
   AF ΚΑΤΑΣΚΕΥΑΣΤΙΚΗ | AF CONSTRUCTIONS (Α & Κ ΠΑΠΑΓΙΑΝΝΗΣ Ο.Ε.)
   Architectural & Engineering Design System (2026)
   ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-blueprint: #0a192f;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --brand-navy: #0a2540;
  --brand-blue: #0369a1;
  --brand-teal: #0d9488;
  --brand-amber: #d97706;
  --brand-amber-bright: #f59e0b;
  --brand-amber-soft: #fef3c7;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0284c7;

  --status-error: #d93025;
  --status-error-bg: #fce8e6;
  --status-valid: #188038;
  --status-valid-bg: #e6f4ea;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(10, 37, 64, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --container-max: 1280px;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-page: #071120;
  --bg-surface: #0f1e36;
  --bg-subtle: #132644;
  --bg-elevated: #172e52;
  --bg-blueprint: #040b16;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --brand-navy: #38bdf8;
  --brand-blue: #38bdf8;
  --brand-teal: #2dd4bf;
  --brand-amber: #f59e0b;
  --brand-amber-bright: #fbbf24;
  --brand-amber-soft: rgba(245, 158, 11, 0.15);

  --border-subtle: #1e3a5f;
  --border-strong: #2d5284;

  --status-error: #f28b82;
  --status-error-bg: rgba(217, 48, 37, 0.2);
  --status-valid: #81c995;
  --status-valid-bg: rgba(24, 128, 56, 0.2);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Disable scroll anchoring on direct parent of position: sticky header
   per modern-web-guidance (state-aware-sticky-headers) */
.site-shell {
  overflow-anchor: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-top: 0;
  text-wrap: balance;
}

p {
  margin-top: 0;
  text-wrap: pretty;
}

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

.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-amber);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   1. Top Engineering Info Bar & State-Aware Sticky Header
   ========================================================================== */

.top-bar {
  background: #07192e;
  color: #e2e8f0;
  font-size: 0.84rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem 1.25rem;
}

.top-bar-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.26rem 0.68rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.top-bar-item:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(255, 255, 255, 0.11);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lang-btn {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
  background: var(--brand-amber-bright);
  color: #0f172a;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Sticky Container with CSS Scroll-State Container Query */
.sticky-header-container {
  position: sticky;
  top: 0;
  container-type: scroll-state;
  container-name: site-header;
  z-index: 100;
}

.site-header-inner {
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 0.9rem;
  transition: padding-block 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Native Scroll-State Query when stuck at top */
@container site-header scroll-state(stuck: top) {
  .site-header-inner {
    background: var(--bg-surface);
    padding-block: 0.55rem;
    box-shadow: var(--shadow-md);
  }
}

/* IntersectionObserver Fallback Class (.is-stuck) */
.sticky-header-container.is-stuck .site-header-inner {
  background: var(--bg-surface);
  padding-block: 0.55rem;
  box-shadow: var(--shadow-md);
}

/* Scroll-Driven Shrinking Logo Animation (Progressive Enhancement) */
@keyframes shrinkHeaderLogo {
  to {
    transform: scale(0.9);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .brand-logo-wrap {
      transform-origin: left center;
      animation: shrinkHeaderLogo auto linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 140px;
    }
  }
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 1.25rem;
  text-align: center;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 50px;
  width: auto;
}

[data-theme="dark"] .brand-logo-img {
  filter: brightness(1.15) contrast(1.05);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.38rem;
  margin-inline: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0.92rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--brand-navy);
  background: var(--brand-amber-soft);
  border-color: var(--brand-amber);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.18);
  transform: translateY(-1px);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus-visible,
[data-theme="dark"] .nav-link.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: #fbbf24;
}

.header-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   2. Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.btn-navy {
  background: linear-gradient(135deg, #0a2540 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.25);
}

.btn-navy:hover {
  background: linear-gradient(135deg, #07192e 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.35);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--brand-amber-soft);
  color: #b45309;
}

[data-theme="dark"] .badge {
  color: #fbbf24;
}

/* ==========================================================================
   3. Hero Section (Architectural Showcase)
   ========================================================================== */

.hero-section {
  position: relative;
  background: linear-gradient(125deg, #07192e 0%, #0a2540 52%, #0e4f6e 100%);
  color: #ffffff;
  padding-block: clamp(3.5rem, 6vw, 6rem);
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.hero-title span {
  color: #fbbf24;
}

.hero-lead {
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  color: #cbd5e1;
  margin-bottom: 1.85rem;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 800;
  color: #fbbf24;
}

.metric-label {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 500;
}

.hero-visual-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0f172a;
}

.hero-main-img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.hero-floating-badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ==========================================================================
   4. Section Layout & Company Profile (Η Εταιρεία Μας)
   ========================================================================== */

.section {
  padding-block: clamp(3.75rem, 6vw, 5.5rem);
}

.section-alt {
  background: var(--bg-subtle);
}

.section-header {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.company-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.75rem;
  align-items: center;
}

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

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.pillar-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: var(--brand-blue);
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.company-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.collage-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.collage-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.collage-caption {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   5. 16 Organized Services & Technical Guides (Οι Υπηρεσίες Μας)
   ========================================================================== */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 2.25rem;
}

.filter-pill {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.filter-pill.active {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

[data-theme="dark"] .filter-pill.active {
  background: var(--brand-amber);
  color: #0f172a;
  border-color: var(--brand-amber);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.35rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
}

.service-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.service-cat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.service-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.service-bullets li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.35rem;
}

.service-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-teal);
  font-weight: 800;
}

.service-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   6. Interactive Engineering & Renovation Cost Estimator
   ========================================================================== */

.estimator-shell {
  background: linear-gradient(135deg, #07192e 0%, #0a2540 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.25rem;
  align-items: stretch;
}

.estimator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.estimator-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  color: #e2e8f0;
}

.estimator-select,
.estimator-range {
  width: 100%;
}

.estimator-select {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.estimator-select option {
  background: #0a2540;
  color: #ffffff;
}

.estimator-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.estimator-check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
}

.estimator-result-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.estimator-price-range {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  font-weight: 800;
  color: #fbbf24;
  margin-block: 0.4rem;
}

.estimator-saving-pill {
  display: inline-block;
  background: rgba(13, 148, 136, 0.25);
  border: 1px solid #2dd4bf;
  color: #5eead4;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ==========================================================================
   7. Flooring Showcase (Parquet, Laminate & Luxury Vinyl Tiles)
   ========================================================================== */

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

.flooring-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.flooring-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.flooring-card-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   8. VIEWPOINT Real Estate Portfolio Section (Ακίνητα)
   ========================================================================== */

.properties-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.properties-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.prop-select {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.property-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.property-media {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #0f172a;
}

.property-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.property-card:hover .property-media img {
  transform: scale(1.04);
}

.property-badges {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: flex;
  gap: 0.45rem;
}

.prop-badge-status {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prop-badge-sale {
  background: #0a2540;
  color: #fbbf24;
}

.prop-badge-rent {
  background: #0d9488;
  color: #ffffff;
}

.prop-fav-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.prop-fav-btn.active {
  background: #e11d48;
  color: #ffffff;
}

.property-price-overlay {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
}

.property-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.property-location {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue);
  margin-bottom: 0.3rem;
}

.property-title {
  font-size: 1.12rem;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}

.property-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-block: 0.75rem;
  margin-block: 0.65rem;
  border-block: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.property-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-actions {
  display: flex;
  gap: 0.6rem;
}

/* ==========================================================================
   9. Contact & API Form Section (Modern Web Guidance :user-invalid)
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.contact-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
}

.map-shield-box {
  margin-top: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
}

.map-iframe {
  width: 100%;
  height: 260px;
  border: 0;
}

.contact-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.35rem);
  box-shadow: var(--shadow-md);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.required-star {
  color: var(--status-error);
  margin-left: 2px;
}

/* MANDATORY: Format hints placed ABOVE the input so autocomplete popovers don't cover them */
.field-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  field-sizing: content;
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.field-error {
  display: none;
  color: var(--status-error);
  font-size: 0.83rem;
  font-weight: 600;
  margin-top: 0.32rem;
}

/* Modern Web Guidance: :user-invalid & :user-valid with fallback classes */
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid,
.field input.user-invalid-fallback,
.field select.user-invalid-fallback,
.field textarea.user-invalid-fallback {
  border-color: var(--status-error);
  background-color: var(--status-error-bg);
}

.field input:user-invalid + .field-error,
.field select:user-invalid + .field-error,
.field textarea:user-invalid + .field-error,
.field input.user-invalid-fallback + .field-error,
.field select.user-invalid-fallback + .field-error,
.field textarea.user-invalid-fallback + .field-error {
  display: block;
}

.field input:required:user-valid,
.field textarea:required:user-valid,
.field input.user-valid-fallback,
.field textarea.user-valid-fallback {
  border-color: var(--status-valid);
}

.form-status-banner {
  margin-top: 1.15rem;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-teal);
  background: color-mix(in srgb, var(--brand-teal) 10%, var(--bg-surface));
  font-size: 0.92rem;
}

/* ==========================================================================
   10. Native <dialog closedby="any"> Modals & Backdrop
   ========================================================================== */

dialog.site-modal {
  width: min(92vw, 780px);
  max-height: 88vh;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

dialog.site-modal::backdrop {
  background-color: rgba(7, 25, 46, 0.65);
  backdrop-filter: blur(4px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.65rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.modal-header h2 {
  font-size: 1.2rem;
  margin: 0;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.65rem;
  overflow-y: auto;
  max-height: calc(88vh - 140px);
}

.modal-footer {
  padding: 1rem 1.65rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-block: 1rem;
}

.modal-gallery-grid img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
}

.modal-gallery-grid img.active {
  border-color: var(--brand-amber);
}

.doc-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.doc-checklist li {
  background: var(--bg-subtle);
  border-left: 3px solid var(--brand-blue);
  padding: 0.55rem 0.8rem;
  border-radius: 4px;
  font-size: 0.86rem;
  font-weight: 500;
}

/* ==========================================================================
   11. Footer & GDPR Cookie Banner
   ========================================================================== */

.site-footer {
  background: #07192e;
  color: #cbd5e1;
  padding-top: 3.75rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2.25rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.83rem;
  color: #94a3b8;
}

.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 680px;
  margin-inline: auto;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

/* ==========================================================================
   12. Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid,
  .company-grid,
  .estimator-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .hero-metrics,
  .pillars-grid,
  .estimator-checks,
  .flooring-grid,
  .form-row-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .top-bar-inner {
    justify-content: center;
    text-align: center;
  }
}
