/* 
 * Nordzypern Senior Lead Gen Website
 * Design System & Main Styles
 */

:root {
  /* Colors - Serious, Trustworthy, Modern */
  --color-primary: #0f1c2e;
  /* Navy Blue/Anthracite */
  --color-primary-light: #1e3a5f;
  --color-secondary: #008f7a;
  /* Muted Cyan/Teal/Turquoise - Trust Accent */
  --color-secondary-hover: #007a68;
  --color-accent: #c49a6c;
  /* Gold/Sand - Premium touch */
  --color-bg-light: #f8f9fa;
  --color-bg-white: #ffffff;
  --color-text-main: #333333;
  --color-text-light: #666666;
  --color-text-inverted: #ffffff;
  --color-error: #d32f2f;
  --color-success: #388e3c;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Typography */
  --font-base: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --size-base: 18px;
  /* Senior friendly base size */
  --size-h1: 2.5rem;
  --size-h2: 2rem;
  --size-h3: 1.5rem;

  /* UI Elements */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --header-height: 80px;

  /* Media Queries */
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  font-size: var(--size-base);
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: var(--size-h1);
  font-weight: 700;
}

h2 {
  font-size: var(--size-h2);
  font-weight: 600;
}

h3 {
  font-size: var(--size-h3);
  font-weight: 500;
}

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

.text-muted {
  color: var(--color-text-light);
}

.text-accent {
  color: var(--color-accent);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-text-inverted);
}

.btn-primary:hover {
  background-color: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-text-inverted);
  color: var(--color-text-inverted);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.25rem;
}

/* Header & Nav */
.main-header {
  height: var(--header-height);
  background-color: var(--color-primary);
  color: var(--color-text-inverted);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-inverted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Allow logo to overlap */
  overflow: visible;
  position: relative;
  z-index: 1100;
}

.logo-header {
  height: 220px;
  /* Increased size (was 180px) */
  width: auto;
  object-fit: contain;
  /* Prevent header expansion */
  margin-top: -10px;
  /* Moved up (was 10px) */
  margin-left: -10px;
  /* Moved left */
  margin-bottom: -80px;
  /* Adjusted hang */
  position: relative;
  pointer-events: none;
  /* Let clicks pass through transparent areas if large */
  transition: all 0.3s ease;
}

.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    gap: 1.2rem;
    /* Reduced from var(--spacing-md)=2rem to fit all items */
    margin-left: auto;
    margin-right: auto;
  }

  .nav-link {
    font-size: 0.95rem;
    /* Slightly smaller for better fit */
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
  }

  .nav-link:hover {
    opacity: 1;
    text-decoration: underline;
  }
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
  /* Prevent button from shrinking */
  margin-left: 1rem;
  /* Ensure minimum space */
}

/* Ensure logo doesn't shrink */
.brand-logo {
  flex-shrink: 0;
}

.header-form-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .header-form-desktop {
    display: flex;
    gap: 0.5rem;
  }

  .header-input {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    width: 140px;
  }

  .header-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: var(--color-primary);
  padding: var(--spacing-md);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  visibility: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
  transform: translateY(0);
  visibility: visible;
}

.mobile-nav-link {
  display: block;
  color: white;
  font-size: 1.2rem;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sections Global */
.section {
  padding: var(--spacing-lg) 0;
}

.section-bg-white {
  background-color: var(--color-bg-white);
}

.section-bg-light {
  background-color: var(--color-bg-light);
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  text-align: center;
  /* Visual Fallback if video missing */
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.hero h1 {
  color: white;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.6;
  /* Slight transparency to let gradient hint through if needed or blend better */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 28, 46, 0.8), rgba(15, 28, 46, 0.6));
  /* Gradient overlay */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: var(--spacing-md);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
}

/* Hero Lead Form - Floating */
.hero-lead-box {
  background: white;
  color: var(--color-text-main);
  padding: 2rem;
  border-radius: var(--radius-md);
  border-top: 5px solid var(--color-accent);
  /* Pop of color */
  width: 100%;
  max-width: 400px;
  margin: 2rem auto 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  /* Stronger shadow */
  text-align: left;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

@media(min-width: 1024px) {
  .hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .hero-content {
    margin: 0;
    max-width: 600px;
  }

  .hero-badges {
    justify-content: flex-start;
  }
}


/* Carousel (Scroll Snap) */
.carousel-container {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-md);
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
  .carousel-container {
    justify-content: center;
  }
}

.carousel-container::-webkit-scrollbar {
  height: 8px;
}

.carousel-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.property-card {
  scroll-snap-align: start;
  display: block;
  /* Ensure it works as a block link */
  text-decoration: none;
  /* Remove underline from card title link */
  color: inherit;
  /* Keep text color */
  background: white;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  /* Force pointer */
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  color: inherit;
  /* changes text color on hover? no */
}

.card-img-placeholder {
  width: 100%;
  height: 200px;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.card-body {
  padding: var(--spacing-sm);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.9rem;
  color: var(--color-text-light);
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Grid Layouts */
.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 600px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Info Tiles */
.info-tile {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform 0.2s;
}

.info-tile:hover {
  transform: translateY(-5px);
}

.tile-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  backdrop-filter: blur(5px);
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  position: relative;
  padding: var(--spacing-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #999;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  background: #fdfdfd;
}

.form-control:focus {
  outline: 2px solid var(--color-secondary);
  border-color: transparent;
}

select.form-control {
  cursor: pointer;
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  z-index: 900;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Footer */
.main-footer {
  background-color: var(--color-primary);
  color: #aaa;
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.logo-footer {
  height: 250px;
  /* Double size */
  width: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.footer-links a {
  display: block;
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: white;
}

/* REELS Styles */
.reel-card {
  aspect-ratio: 9/16;
  background: #000;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.reel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Video Placeholders */
.video-placeholder-16-9 {
  aspect-ratio: 16/9;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: var(--radius-md);
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Data Tables (Shared) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.data-table th {
  background: var(--color-primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

@media (max-width: 768px) {

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td,
  .data-table th {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .data-table td {
    padding-left: 50%;
    position: relative;
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    width: 45%;
    font-weight: bold;
    color: var(--color-primary);
  }
}

.section-bg-primary {
  background-color: var(--color-primary);
  color: white;
}

/* User Requested Shorts Embed */
.shorts-embed {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.shorts-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* User Requested Shorts Grid */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.short iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  border: none;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-primary);
  color: white;
  padding: 1rem;
  z-index: 10000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideUp 0.5s ease-out;
}

.cookie-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  gap: 1rem;
}

.cookie-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-text a {
  text-decoration: underline;
  color: var(--color-accent);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .cookie-container {
    flex-direction: column;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}