/* =====================================================
   Felsgrund Immobilien – Vibrant Energetic Style
   Single stylesheet for all pages
   Mobile-first • Only Flexbox • No CSS Grid/Columns
   Fonts: Georgia (display), Arial (body)
   Brand colors primary #1F3A5F, secondary #C8A15B, accent #F5F7FB
   ===================================================== */

/* ========== RESET & NORMALIZE ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 16px 24px; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 12px 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; padding: 0; cursor: pointer; }
:focus { outline: 2px solid #00D1FF; outline-offset: 2px; }

/* ========== THEME VARIABLES ========== */
:root {
  --brand-primary: #1F3A5F; /* deep blue */
  --brand-secondary: #C8A15B; /* gold */
  --brand-accent: #F5F7FB; /* very light */
  --ink: #0E1B2A; /* near-black text */
  --ink-muted: #314355; /* muted text */
  --surface: #FFFFFF; /* cards */
  --line: #E6ECF5; /* separators */
  --energize-1: #00D1FF; /* electric cyan */
  --energize-2: #FF3D71; /* vibrant pink-red */
  --shadow-sm: 0 2px 10px rgba(15, 30, 50, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 30, 50, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Fallbacks when custom properties are not supported */
body { color: #0E1B2A; background: #FFFFFF; }

/* ========== TYPOGRAPHY ========== */
html { font-size: 16px; }
body { font-family: Arial, Helvetica, sans-serif; line-height: 1.6; color: var(--ink); background: var(--brand-accent); }

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--brand-primary); letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 28px; line-height: 1.25; font-weight: 700; margin-top: 10px; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--ink); }
h4 { font-size: 18px; font-weight: 700; }
p, li { font-size: 16px; color: var(--ink); }
small, .text-muted { color: var(--ink-muted); font-size: 14px; }

/* Energetic heading underline accent */
h1, h2 { position: relative; display: inline-flex; align-items: center; gap: 10px; }
h1::after, h2::after { content: ''; height: 6px; width: 38px; background: var(--energize-2); border-radius: 3px; display: inline-block; }

/* Links */
a { color: var(--brand-primary); text-decoration: none; border-bottom: 2px solid transparent; transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease; }
a:hover { color: var(--energize-2); border-bottom-color: var(--energize-2); }
a:active { color: var(--energize-1); border-bottom-color: var(--energize-1); }

/* ========== LAYOUT HELPERS (Flex-only) ========== */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; }
.content-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--brand-secondary); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* General section spacing for all pages */
main > section { margin-bottom: 60px; padding: 40px 0; }

/* ========== HEADER ========== */
header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 3px solid var(--brand-secondary); box-shadow: 0 6px 18px rgba(10, 30, 60, 0.06); }
header .container { padding-top: 14px; padding-bottom: 14px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { font-weight: 700; color: var(--ink); padding: 8px 10px; border-radius: 8px; }
.main-nav a:hover { color: #FFFFFF; background: var(--brand-primary); border-bottom-color: transparent; }

.header-cta { display: none; align-items: center; gap: 10px; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; font-weight: 700; letter-spacing: 0.2px; transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease; }
.header-cta a:first-child { background: var(--brand-secondary); color: #0D0B05; }
.header-cta a:first-child:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #B9914F; }
.header-cta a:last-child { background: var(--brand-primary); color: #FFFFFF; }
.header-cta a:last-child:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #1A314F; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--energize-1); color: #001421; font-size: 22px; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, background-color 0.25s ease; }
.mobile-menu-toggle:hover { transform: translateY(-2px); background: #07C1EA; }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0 0 0 auto; right: 0; top: 0; width: 100%; max-width: 420px; height: 100vh; background: #0E1B2A; color: #FFFFFF; display: flex; flex-direction: column; padding: 20px; gap: 24px; transform: translateX(100%); transition: transform 0.35s ease; box-shadow: -8px 0 30px rgba(10, 20, 40, 0.4); z-index: 1200; }
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 44px; height: 44px; border-radius: 10px; background: #16273A; color: #FFFFFF; font-size: 22px; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.25s ease, transform 0.2s ease; }
.mobile-menu-close:hover { background: #1F3A5F; transform: translateY(-2px); }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a { color: #FFFFFF; font-weight: 700; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.mobile-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; border-bottom-color: transparent; }

/* ========== HERO TREATMENT (first section) ========== */
main > section:first-of-type { background: #FFFFFF; border-bottom: 1px solid var(--line); }
main > section:first-of-type .content-wrapper { position: relative; padding: 10px 0 0 0; }
main > section:first-of-type .content-wrapper::before { content: ''; position: relative; display: block; height: 8px; width: 120px; background: var(--energize-1); border-radius: 6px; }

/* ========== TEXT BLOCKS & CARDS ========== */
.text-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand-secondary); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.text-section:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-left-color: var(--energize-2); }
.text-section ul, .text-section ol { margin-left: 20px; }

.map-placeholder { display: flex; align-items: center; justify-content: center; min-height: 180px; background: var(--brand-accent); color: var(--ink-muted); border: 2px dashed var(--line); border-radius: var(--radius-md); font-weight: 700; }

/* ========== TESTIMONIALS (high contrast) ========== */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--brand-primary); }

/* ========== FOOTER ========== */
footer { background: #0E1B2A; color: #FFFFFF; padding: 32px 0; border-top: 4px solid var(--brand-secondary); }
footer .content-wrapper { align-items: flex-start; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 16px; }
footer nav a { color: #FFFFFF; font-weight: 700; padding: 6px 8px; border-radius: 8px; }
footer nav a:hover { background: rgba(255,255,255,0.12); color: #FFFFFF; border-bottom-color: transparent; }
footer .text-section { background: transparent; border: none; border-left: 0; box-shadow: none; padding: 0; color: #EAF1F8; }
footer .text-section a { color: #FFFFFF; border-bottom-color: rgba(255,255,255,0.4); }

/* ========== BUTTON UTILS (optional if needed) ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; font-weight: 700; color: #FFFFFF; background: var(--brand-primary); box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #182F4A; }
.btn--ghost { background: transparent; color: var(--brand-primary); border: 2px solid var(--brand-primary); }
.btn--ghost:hover { color: #FFFFFF; background: var(--brand-primary); }
.btn--accent { background: var(--brand-secondary); color: #0D0B05; }
.btn--accent:hover { background: #B9914F; }

/* ========== COOKIE CONSENT BANNER & MODAL ========== */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--brand-secondary); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(15, 30, 50, 0.18); padding: 16px; display: flex; flex-direction: column; gap: 12px; z-index: 1500; transform: translateY(140%); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn-accept { background: var(--brand-secondary); color: #0D0B05; padding: 10px 14px; border-radius: 999px; font-weight: 700; }
.cookie-banner .cookie-actions .btn-accept:hover { background: #B9914F; }
.cookie-banner .cookie-actions .btn-reject { background: transparent; color: var(--brand-primary); border: 2px solid var(--brand-primary); padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.cookie-banner .cookie-actions .btn-reject:hover { background: var(--brand-primary); color: #FFFFFF; }
.cookie-banner .cookie-actions .btn-settings { background: var(--brand-primary); color: #FFFFFF; padding: 10px 14px; border-radius: 999px; font-weight: 700; }
.cookie-banner .cookie-actions .btn-settings:hover { background: #182F4A; }

/* Cookie preferences modal */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1600; }
.cookie-modal-backdrop.show { display: flex; }
.cookie-modal { width: 92%; max-width: 720px; background: #FFFFFF; color: var(--ink); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 20px; display: flex; flex-direction: column; gap: 16px; transform: scale(0.98); transition: transform 0.25s ease; }
.cookie-modal-backdrop.show .cookie-modal { transform: scale(1); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.toggle input[type="checkbox"] { appearance: none; width: 44px; height: 24px; border-radius: 24px; background: #D7DFEA; position: relative; transition: background-color 0.25s ease; }
.toggle input[type="checkbox"]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transition: transform 0.25s ease; }
.toggle input[type="checkbox"]:checked { background: var(--brand-primary); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* ========== ACCESSIBILITY & UTILITIES ========== */
.hr { width: 100%; height: 1px; background: var(--line); }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; gap: 8px; background: var(--brand-accent); border: 1px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--brand-primary); }

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (min-width: 640px) {
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
  header .content-wrapper { gap: 20px; }
  main > section { padding: 56px 0; }
  .content-wrapper { gap: 28px; }
  .card { padding: 24px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  .logo img { height: 42px; }
  .container { padding: 0 20px; }
}

/* ========== PAGE-SPECIFIC POLISH (generic classes present across pages) ========== */
/* Contact mini rows with icons inline */
.text-section p img { display: inline-block; vertical-align: middle; margin: -2px 6px 0 0; height: 18px; }

/* Pagination-like paragraphs */
.text-section[aria-label="Pagination"] a { font-weight: 700; }

/* Map placeholder variations */
.map-placeholder { min-height: 220px; }

/* ========== FLEX-ONLY VERIFICATION UTILS (kept semantic) ========== */
/* Ensure typical containers use flex */
header, footer, nav, main, section, .mobile-menu, .mobile-nav, .header-cta, .main-nav { display: flex; flex-direction: column; }
header, footer { flex-direction: column; }
nav.main-nav, footer nav { flex-direction: row; }

/* Important: avoid overlapping by spacing */
main > section .text-section + .text-section { margin-top: 8px; }

/* ========== ANIMATIONS ========== */
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Apply subtle entrance to hero text blocks */
main > section:first-of-type .text-section { animation: fadeInUp 0.6s ease both; }

/* ========== PRINT BASICS ========== */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  a { border-bottom: none; }
}

/* End of stylesheet */
