/* RAMIX - Luxury Property Management
   Elegant styling optimized for a premium property experience
*/

/* ===== FONTS ===== */
/* Google Fonts are now loaded via <link rel="stylesheet"> in HTML to avoid @import penalty */

/* ===== VARIABLES ===== */
:root {
  /* Color Palette */
  --gold: #c09029;
  --gold-light: #d4aa4f;
  --gold-dark: #93701f;
  --dark: #282828;
  --dark-secondary: #444444;
  --light-gray: #efefef;
  --off-white: #f9f9f9;
  --white: #ffffff;
  --text: #333333;
  
  /* Typography */
  --font-primary: 'Montserrat', sans-serif;
  --font-display: 'Playfair Display', serif;
  
  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-gold: 0 5px 15px rgba(192, 144, 41, 0.15);
  --transition: 0.3s ease;
  --border-radius: 4px;

  /* Additional elegant color variants */
  --gold-gradient: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal overflow */
  margin: 0;
  padding: 0;
  height: 100%; /* Ensure html takes full height */
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--white);
  font-size: 16px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  letter-spacing: 0.01em;
  margin: 0; /* Ensure no margin on body */
  padding: 0; /* Ensure no padding on body */
  position: relative; /* For proper positioning of children */
  min-height: 100%; /* Ensure body takes at least full height */
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body::after {
  content: none; /* Prevent any generated content after body */
}

main {
  flex: 1 0 auto;
  min-height: 60vh; /* Ensure main content has at least this height */
  padding-bottom: 2rem; /* Add padding at bottom of main content */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease-out;
  will-change: transform;
}

/* Lazy loading animation for images */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

img[loading="lazy"] {
  animation: fadeIn 0.5s ease-in forwards;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--dark);
  transition: var(--transition);
}

a:hover {
  color: var(--gold);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: var(--elegant-text-shadow);
}

h2 {
  font-size: 2.8rem;
  position: relative;
  margin-bottom: 2rem;
  letter-spacing: 0.03em;
  text-shadow: var(--elegant-text-shadow);
}

h2:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.8rem;
  width: 60px;
  height: 3px;
  background-color: var(--gold);
}

h3 {
  font-size: 2rem;
  letter-spacing: 0.03em;
  text-shadow: var(--elegant-text-shadow);
}

h4 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.5rem;
}

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

.text-center h2:after {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== UTILITIES ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Wider container for full-width-ish showcase (e.g., homepage slideshow) */
.container-wide {
  width: 95%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 5rem 0;
}

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

.section-dark h2 {
  color: var(--white);
}

.section-light {
  background-color: var(--off-white);
  padding: 60px 0;
}

/* Property Showcase - About Us page */
.section-subtitle {
  font-size: 1.1rem;
  max-width: 800px;
  margin: -1rem auto 3rem;
  color: var(--dark-secondary);
}

.about-intro {
  margin-bottom: 3rem;
}

/* Property showcase grid */
.showcase-properties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

/* Individual property card */
.showcase-property {
  background-color: var(--off-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.showcase-property:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.property-image {
  position: relative;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.showcase-property:hover .property-image img {
  transform: scale(1.05);
}

.property-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gold-gradient);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.35rem 0.75rem;
}

.property-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  background-color: var(--off-white);
  padding: 1rem;
  border-radius: var(--border-radius);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
}

.stat-icon {
  font-style: normal;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.property-description {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.property-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--off-white);
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius);
  margin-top: auto;
}

.result-label {
  font-weight: 600;
  color: var(--dark-secondary);
}

.result-value {
  color: var(--gold);
  font-weight: 700;
}

@media (max-width: 992px) {
  .showcase-properties {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 576px) {
  .property-stats {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .stat-item {
    flex-basis: 30%;
  }
  
  .property-result {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ===== HEADER ===== */
header {
  background-color: rgba(239, 239, 239, 0.95);
  padding: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  will-change: background-color;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  border-bottom-color: rgba(0,0,0,0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 15px;
  position: relative;
}

/* Logo */
.logo {
  flex-shrink: 0;
  margin-right: 20px;
  flex: 0 0 25%;
  position: relative;
  z-index: 1; 
}

.logo a {
  display: block;
}

.logo img {
  height: 90px;
  width: auto;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: none;
  display: block;
}

.logo:hover img {
  transform: scale(1.05);
}

/* Keep logo height constant to avoid layout thrash on scroll */
header.scrolled .logo img { height: 90px; }

/* Navigation - Fix centering */
nav {
  display: flex;
  justify-content: center;
  flex: 0 0 auto; /* Change from 65% to auto to avoid forcing width */
  width: 100%; /* Take up available width */
  position: absolute; /* Position absolutely */
  left: 0; /* Center in header */
  right: 0; /* Center in header */
  z-index: 0; /* Lower z-index so logo and right section appear above */
  pointer-events: auto !important; /* Ensure navigation always accessible */
}

nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* Re-enable pointer events on the actual menu items */
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 10px 0;
  position: relative;
  transition: color 0.2s ease;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  bottom: 0;
  left: 0;
  transition: width 0.2s ease-out;
  opacity: 0;
  transform-origin: left center;
}

nav ul li a:hover {
  color: var(--gold);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
  opacity: 1;
}

nav ul li a.active {
  color: var(--gold);
}

/* Header Right Area */
.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  position: relative;
  z-index: 1; 
}

/* Language Selector */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 2px;
  border: 1px solid rgba(184, 134, 11, 0.35);
  transition: all 0.3s ease;
}

.lang-selector:hover {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: var(--gold);
}

.lang-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 1rem;
}

.lang-selector .lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--dark);
  padding: 6px 14px;
  height: 32px;
  line-height: 1;
  vertical-align: middle;
  border-radius: 18px;
  border: 1px solid transparent;
}

.lang-selector .lang-link:hover {
  color: var(--gold);
}

.lang-selector .lang-link.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  cursor: default;
  pointer-events: none;
}

.lang-selector select {
  appearance: none;
  background-color: transparent;
  border: none;
  padding: 8px 28px 8px 0;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  color: var(--dark);
  cursor: pointer;
  transition: color 0.2s ease;
  font-weight: 500;
}

.lang-selector select:hover {
  color: var(--gold);
}

.lang-selector select:focus {
  outline: none;
}

/* Removed dropdown arrow for language selector */

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 4px;
  margin: 6px 0;
  background-color: var(--dark);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(145deg, var(--gold-dark) 0%, var(--gold) 55%, var(--gold-light) 100%);
  padding: 5rem 0 5.5rem;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  font-size: 3.2rem;
  margin: 0 0 1.25rem;
  line-height: 1.15;
  font-weight: 600;
  text-wrap: balance;
  text-shadow: 0 3px 14px rgba(0,0,0,0.18);
  letter-spacing: 0.5px;
}

.hero .highlight {
  position: relative;
}

.hero .tagline {
  font-size: 1.15rem;
  margin: 0 auto 2.3rem;
  font-weight: 400;
  max-width: 640px;
  line-height: 1.5;
  opacity: 0.92;
}

/* Constrain hero inner width for nicer composition */
.hero .hero-content, .hero > .container, .hero > .container-wide {
  max-width: 900px; /* restore constrained width */
  margin-left: auto;
  margin-right: auto;
}

/* Constrain individual hero elements for pages without an inner container */
/* Keep hero text constrained for better readability */
.hero h1,
.hero .tagline,
.hero .cta-button {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1400px) {
  .hero {
    padding: 5.5rem 0 6rem;
  }
  .hero h1 { font-size: 3.4rem; }
}

@media (max-width: 992px) {
  .hero h1 { font-size: 3rem; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.6rem; }
  .hero .tagline { font-size: 1.05rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2.3rem; }
}

/* Enhanced page header styles */
.page-header {
    background-color: var(--gold);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.page-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 3.5rem;
}

.page-header .header-desc {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    font-weight: 300;
}

/* ===== BUTTONS ===== */
.btn, .cta-button {
  display: inline-block;
  background-color: var(--white);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.btn:before, .cta-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold-gradient);
  transition: all 0.4s cubic-bezier(0.42, 0, 0.58, 1);
  z-index: -1;
  opacity: 0;
}

.btn:hover:before, .cta-button:hover:before {
  left: 0;
  opacity: 0.15;
}

.btn-gold:before {
  background: var(--white);
}

.btn:hover, .cta-button:hover {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.btn-gold:hover {
  background-color: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

/* ===== FEATURES SECTION ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.3rem 2.6rem;
  padding: 3.25rem 0 2.75rem;
  position: relative;
  /* Match slideshow width */
  width: 95%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* Light inner container for features */
/* Removed decorative radial background */

/* Constrain width similarly to hero */
/* Width is constrained directly on .features above to align with contact */

.feature-card {
  background-color: #fff;
  padding: 2.4rem 2.1rem 2.5rem;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  text-align: left;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.065);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 280px; /* enforce equal visual height */
  align-self: stretch;
}

/* Enhance hover effect to compensate for blended background */
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: rgba(192,144,41,0.35);
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  color: var(--dark-primary);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .3px;
}

.feature-card p {
  color: var(--dark-secondary);
  line-height: 1.55;
  font-size: .95rem;
  min-height: 0;
  margin: 0;
  flex-grow: 1; /* allow paragraph area to balance height */
}

/* Decorative gold accent for rhythm */
.feature-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 4px;
  background: linear-gradient(90deg,#B8860B,#d8b766,#B8860B);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(184,134,11,0.35);
}

/* Update feature card images to be smaller and centered */
.feature-card img, .feature-card .feature-icon {
  height: 64px;
  width: 64px;
  margin: 0 0 1.2rem;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(58%) sepia(60%) saturate(442%) hue-rotate(7deg) brightness(94%) contrast(85%);
  transition: transform 0.3s ease;
}

.feature-card:hover img, .feature-card:hover .feature-icon {
  transform: scale(1.05) translateY(-2px);
}

/* Responsive: features follows same container-wide behavior via width:95% */
@media (max-width: 900px) {
  .features { padding: 3rem 0 2.3rem; max-width: 95%; }
  .feature-card { text-align: center; }
  .feature-card img, .feature-card .feature-icon { margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .feature-card { padding: 2rem 1.6rem 2.1rem; }
  .feature-card h3 { font-size: 1.1rem; }
  .feature-card p { font-size: .9rem; }
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--dark);
  color: #ffffff; /* Direct color instead of using variable */
  padding: 4rem 0 0;
  flex-shrink: 0;
  margin-top: 5rem; /* Added top margin to push footer down */
  margin-bottom: 0; /* Ensure no bottom margin on footer */
  width: 100%; /* Ensure footer takes full width */
  position: relative; /* Ensure proper stacking context */
  z-index: 1; /* Ensure footer appears above any potential background elements */
  border-bottom: 0; /* Explicitly remove any bottom border */
}

/* ===== BLOG PREVIEW ===== */
.blog-section { background: var(--off-white); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.blog-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.blog-card-content { padding: 1rem; }
.blog-card-title { margin: 0 0 0.25rem; font-size: 1.2rem; }
.blog-card-title a { color: var(--dark); }
.blog-card-title a:hover { color: var(--gold); }
.blog-card-meta { font-size: 0.85rem; color: var(--dark-secondary); margin-bottom: 0.5rem; }
.blog-card-excerpt { margin: 0 0 0.75rem; color: var(--text); }
.blog-card-link { color: var(--gold); font-weight: 600; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
  color: var(--dark-secondary);
  margin-bottom: 1.75rem;
}
.breadcrumbs a {
  color: var(--dark-secondary);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.breadcrumbs a:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.breadcrumbs .current {
  color: var(--dark);
  font-weight: 600;
}

/* Fix for social media icons display and footer layout */

/* Footer structure */
.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; /* Four equal columns for Social, Links, Rekvizīti, Contact */
  gap: 2rem;
}

/* Center social icons */
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the content */
  justify-content: center;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.2);
  transition: var(--transition);
  padding: 8px;
}

.social-icons a:hover {
  background-color: rgba(255,255,255,0.3);
  transform: translateY(-3px);
}

.social-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: none;
}

/* Align footer links and contact info */
.footer-links,
.footer-contact {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align content to the left */
  text-align: left; /* Left-align text */
}

.footer-social h4,
.footer-links h4,
.footer-contact h4,
.footer-rekviziti h4 {
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.footer-social h4:after,
.footer-links h4:after,
.footer-contact h4:after,
.footer-rekviziti h4:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold-gradient);
}

.footer-links ul li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #ffffff; /* Direct color instead of using var(--white) */
  opacity: 0.8;
}

.footer-links a:hover {
  color: var(--gold);
  opacity: 1;
}

.footer-contact p {
  margin-bottom: 0.7rem;
  opacity: 0.8;
  color: #ffffff; /* Ensure text is white */
}

/* Ensure company details text is visible like contact text */
.footer-rekviziti p {
  margin-bottom: 0.7rem;
  opacity: 0.8;
  color: #ffffff;
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 10rem; /* Increased from 8rem to create even more space */
  margin-bottom: 0; /* Ensure no bottom margin */
  width: 100%; /* Full width */
}

@media (max-width: 767px) {
  .footer-bottom {
    margin-top: 5rem; /* Increased from 4rem for mobile but still proportional */
    padding-bottom: calc(2rem + env(safe-area-inset-bottom)); /* iOS bottom safe area */
  }
}

/* Add iOS bottom safe area padding in footer content as well */
@supports (padding: max(0px)) {
  footer {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    padding: 0 15px;
  }
  
  .footer-social, .footer-links, .footer-contact, .footer-rekviziti {
    align-items: center;
    text-align: center;
  }
  
  .footer-social h4,
  .footer-links h4,
  .footer-contact h4,
  .footer-rekviziti h4 {
    text-align: center;
    display: block;
  }
  
  .footer-social h4:after,
  .footer-links h4:after, 
  .footer-contact h4:after,
  .footer-rekviziti h4:after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .social-icons {
    justify-content: center;
  }

  nav.active {
    display: flex !important;
    pointer-events: auto !important;
  }
}

/* Map section margin fixes with increased specificity and !important */
body .map-section {
    margin-bottom: 80px !important; /* Added !important */
}

@media (max-width: 768px) {
    body .map-section {
        margin-bottom: 100px !important; /* Increased from 80px */
    }
}

/* ===== Properties Map ===== */
.properties-map-canvas {
  width: 100%;
  height: 420px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

@media (max-width: 768px) {
  .properties-map-canvas { height: 360px; }
}

@media (max-width: 576px) {
    body .map-section {
        margin-bottom: 120px !important; /* Increased from 100px */
    }
    
    /* Add stronger bottom padding to the map container itself */
    body .map-container {
        padding-bottom: 40px !important; /* Increased from 30px */
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
  .hamburger-menu {
    display: block;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .header-container {
    justify-content: flex-start;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
    z-index: 1000;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }
  
  nav.active {
    display: flex;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: center;
  }
  
  nav ul li {
    width: 100%;
    text-align: center;
  }
  
  nav ul li a {
    display: block;
    padding: 12px 15px;
    font-size: 1rem;
    border-bottom: 1px solid var(--light-gray);
  }
  
  nav ul li:last-child a {
    border-bottom: none;
  }
  
  nav ul li a::after {
    display: none;
  }
  
  /* Modify header-right to always show and position correctly */
  .header-right {
    display: flex !important; /* Always display */
    position: absolute;
    right: 70px; /* Position to the left of hamburger menu */
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    border-top: none;
    padding: 0;
    z-index: 10;
  }
  
  /* Make sure language selector is always visible */
  .lang-selector {
    display: flex;
    margin-right: 0;
  }
  
  /* The rest of your responsive styles */
  h1 { font-size: 3rem; }
  h2 { font-size: 2.4rem; }
  .hero h1 { font-size: 3.5rem; }
  .hero .tagline { font-size: 1.3rem; }
  .service-item-elegant { flex-direction: column; gap: 2rem; }
  .service-item-elegant.reverse { flex-direction: column; }
  .service-image, .service-content { flex: none; width: 100%; }
  .service-item-elegant,
  .service-item-elegant.reverse {
    padding: 2rem;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form-container,
  .contact-info-container {
    padding: 2rem;
  }

}

@media (max-width: 767px) {
  .header-container {
    padding: 5px 10px;
  }
  
  .logo {
    margin-right: 0;
    width: auto;
  }
  
  .logo img {
    height: 75px; /* Increased from 60px for mobile */
  }
  
  header.scrolled .logo img {
    height: 60px; /* Increased from 50px */
  }
  
  .hamburger-menu {
    right: 10px;
  }
  
  /* Further adjust language selector position on smaller screens */
  .header-right {
    right: 80px;
  }
  
  /* Make the language selector more compact on mobile */
  .lang-selector select {
    padding: 6px 24px 6px 0;
    font-size: 0.8rem;
  }
  
  .lang-selector::after {
    right: 8px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 2.8rem; }
  .hero .tagline { font-size: 1.1rem; }
  .section { padding: 3rem 0; }
  .features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .feature-card {
    width: 100%;
    padding: 1.5rem;
    margin: 0 0 1.5rem;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    padding: 0 15px;
  }
  .footer-logo img {
    height: 50px;
    margin: 0 auto 15px;
  }
  .footer-links h4, .footer-contact h4, .footer-social h4, .footer-rekviziti h4 {
    display: block;
    text-align: center;
  }
  .footer-links h4:after, .footer-contact h4:after, .footer-social h4:after, .footer-rekviziti h4:after {
    left: 50%;
    transform: translateX(-50%);
  }
  .social-icons {
    justify-content: center;
  }
  .cta-button {
    width: auto;            /* prevent full-width buttons on mobile */
    max-width: none;        /* allow natural width based on content */
    display: inline-block;  /* keep as inline-block for proper sizing */
    margin-left: auto;      /* center within containers that allow it */
    margin-right: auto;
  }
  .service-item-elegant, 
  .service-item-elegant.reverse {
    padding: 1.5rem;
    border-left: none;
    border-right: none;
    border-top: 3px solid var(--gold);
  }

  .property-card {
    margin-bottom: 1.5rem;
  }
  
  .property-filters {
    padding: 1.5rem;
  }
  
  .contact-form-container,
  .contact-info-container {
    padding: 1.5rem;
  }
  
  .map-container {
    height: 350px;
  }

  /* Add lighter box shadows on mobile for performance */
  .feature-card:hover,
  .property-card:hover {
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 65px; /* Increased from 50px for small mobile */
  }
  
  header.scrolled .logo img {
    height: 55px; /* Increased from 45px */
  }
  /* Compact language pills on very small screens */
  .lang-selector .lang-link {
    padding: 4px 10px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero .tagline { font-size: 1rem; }
  .btn, .cta-button { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
  .feature-card h3 { font-size: 1.3rem; }
  .footer-bottom p { font-size: 0.8rem; }
}

/* Blog visibility rules removed (content now public) */
/* Previously hid blog previews and posts while under construction. */
/* If you need to hide again, wrap in a body.blog-hidden class, e.g.:
  body.blog-hidden .blog-section,
  body.blog-hidden #blog-list,
  body.blog-hidden main > article.section { display:none !important; }
*/

/* ===== VISUAL ANIMATIONS AND EFFECTS ===== */
@keyframes subtle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Testimonial refinements removed (no testimonials in use) */

/* Contact form refinements */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192, 144, 41, 0.1);
}

input::placeholder,
textarea::placeholder {
  opacity: 0.6;
  font-style: italic;
}

/* CTA section styles removed (unused) */

/* Kontakti page specific styles */
/* Standardized icon styling */
.icon-standard {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Specifically style the form icon to match the heading size */
.form-header .icon-standard {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(60%) saturate(442%) hue-rotate(7deg) brightness(94%) contrast(85%);
    vertical-align: text-bottom;
    position: relative;
    top: -1px;
}

/* Improve form header alignment */
.form-header {
    display: flex;
}

.form-header h2 {
    margin-bottom: 0;
    margin-top: 0;
    font-size: 1.8rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

/* Make social icons consistent */
.social-media img,
.social-img {
    width: 22px;
    height: 22px;
}

/* Add more space between contact info items for better readability */
.info-item {
    margin-bottom: 22px;
}

/* Adjust text size to be proportional to icons */
.info-item h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

/* Adjust social icon containers for better alignment */
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
}

/* Special styling for the contact page social media section */
.contact-info-container .social-media {
    margin-top: 30px;
}

.contact-info-container .social-icons {
    gap: 15px;
}

/* Ensure heading fits in contact box */
.contact-info-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: white;
}

/* Make Sekojiet mums heading same size as Kontakti */
.social-media h3 {
    position: relative;
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    color: white;
}

/* Add a decorative line beneath the Sekojiet mums heading */
.social-media h3:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.8rem;
    width: 60px;
    height: 3px;
    background-color: var(--gold);
}

/* ===== ENHANCED CONTACT FORM STYLES ===== */
.contact-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  position: relative;
}

/* Single-column variant when only the form is shown */
.contact-container.single {
  grid-template-columns: 1fr;
}
.contact-container.single .contact-form-container {
  max-width: 860px; /* restore refined width */
  width: 100%;
  margin: 0 auto; /* center within container-wide */
}

/* Center the whole single contact container inside the wide wrapper */
.contact-section .contact-container.single {
  max-width: 900px; /* slight outer wrapper for breathing room */
  margin: 0 auto;
}

.contact-form-container {
  background-color: var(--white);
  padding: 3.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(184, 134, 11, 0.2); /* Thin gold-colored border */
}

.contact-form-container:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gold-gradient);
  z-index: 0;
}

.contact-form-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Contact info card to match form styling */
.contact-info-card {
  background-color: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(184, 134, 11, 0.15);
  position: relative;
  overflow: hidden;
}
.contact-info-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gold-gradient);
}
.contact-info-card h3 {
  font-family: var(--font-display);
  margin-bottom: 1rem;
}
.contact-info-card p { color: var(--dark-secondary); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-item { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.contact-item:last-child { border-bottom: none; }
.contact-item .ci-label { font-weight: 600; color: var(--dark); }
.contact-item a { color: var(--dark); }
.contact-item a:hover { color: var(--gold); }
.contact-cta { display: flex; gap: 10px; margin-top: 1.25rem; }

/* Generic outline button to pair with btn-gold */
.btn.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--dark);
}
.btn.btn-outline:hover { background: rgba(192,144,41,0.06); }

.form-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.form-icon {
  font-size: 2rem;
  line-height: 1;
  display: inline-block;
}

.elegant-form .form-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.floating-label {
  position: relative;
}

.floating-label input,
.floating-label textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,0.1); /* Thin border all around */
  border-radius: 4px; /* Slightly rounded corners */
  background-color: transparent;
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Subtle inner shadow */
}

.floating-label textarea {
  min-height: 120px;
  resize: vertical;
}

.floating-label label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  transition: all 0.25s ease;
  color: var(--dark-secondary);
  pointer-events: none;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:not(:placeholder-shown) {
  outline: none;
  border-color: var(--gold);
  border-width: 1px;
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 0 0 1px rgba(184, 134, 11, 0.2), inset 0 1px 3px rgba(0,0,0,0.05); /* Gold glow effect */
}

.floating-label input:focus + label,
.floating-label textarea:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:not(:placeholder-shown) + label {
  top: 0.4rem;
  font-size: 0.7rem;
  color: var(--gold);
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: all 0.25s ease;
}

.floating-label input:focus ~ .input-focus-border,
.floating-label textarea:focus ~ .input-focus-border {
  width: 100%;
  left: 0;
}

.select-wrapper {
  position: relative;
  display: block;
}

.select-wrapper:after {
  content: '▼';
  font-size: 0.6rem;
  color: var(--gold);
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  color: var(--dark-secondary);
}

.elegant-form select {
  appearance: none;
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--border-radius);
  background-color: transparent;
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.25s ease;
}

.elegant-form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192, 144, 41, 0.1);
}

.submit-group {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 2rem;
  position: relative;
  overflow: hidden;
}

.btn-icon {
  opacity: 0;
  position: absolute;
  right: 1.5rem;
  transition: all 0.3s ease;
  transform: translateX(-20px);
}

.btn-text {
  transition: all 0.3s ease;
}

.btn-submit:hover .btn-text {
  transform: translateX(-10px);
}

.btn-submit:hover .btn-icon {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive styles */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form-container {
    padding: 2rem;
  }
  .contact-info-card { padding: 1.75rem; }
}

@media (max-width: 480px) {
  .floating-label input, 
  .floating-label textarea,
  .elegant-form select {
    font-size: 0.9rem;
  }
}

/* Form message styles */
.form-message {
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  font-weight: 500;
  animation: fadeIn 0.5s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-message.success {
  background-color: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
  background-color: rgba(244, 67, 54, 0.1);
  color: #d32f2f;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Add styling for invalid form fields */
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #d32f2f;
  background-color: rgba(244, 67, 54, 0.05);
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Add more visible focus states for accessibility */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 144, 41, 0.2);
}

/* Create debugging helper for Formspree form errors */
.formspree-debug {
  margin: 15px 0;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: #212529;
  white-space: pre-wrap;
  overflow-x: auto;
  display: none; /* Hidden by default */
}

@media (max-width: 576px) {
  .form-message {
    font-size: 0.9rem;
    padding: 12px;
  }
}

/* Ipasumi page specific styles */
.property-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px;
    margin: 40px 0;
}

.showcase-property {
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    background: var(--off-white);
}

.showcase-property:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

/* Slideshow Styles */
.property-slideshow {
    position: relative;
  height: 700px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.slideshow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
}

.slideshow-nav button {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 20px;
}

.slideshow-nav button:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Property Info Styles */
.property-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px;
    z-index: 5;
}

.property-title {
    font-size: 36px;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
    color: white;
}

.property-location {
    display: flex;
    align-items: center;
    font-size: 18px;
    margin-bottom: 15px;
}

.property-location i {
    margin-right: 10px;
    color: #fff;
}

.property-highlights {
    display: flex;
    gap: 20px;
}

.property-highlight {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.property-highlight i {
    margin-right: 8px;
}

.property-price {
    font-size: 24px;
    font-weight: 600;
    margin-top: 15px;
    color: white;
}

/* Property details */
.property-details {
    padding: 40px;
    background-color: var(--off-white);
}

.property-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.property-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.feature {
    display: flex;
    align-items: center;
}

.feature i {
    margin-right: 10px;
    color: #B8860B;
    font-size: 20px;
}

.view-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #B8860B;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.view-button:hover {
    background-color: #9A7209;
}

@media (max-width: 768px) {
    .property-slideshow {
    height: 450px;
    }
    
    .property-title {
        font-size: 28px;
    }
    
    .property-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== SLIDESHOW STYLES ===== */
/* Main slideshow container */
.property-slideshow {
    position: relative;
  height: 700px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* Individual slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* Prevent clicks on hidden slides */
}

.slide.active {
    opacity: 1;
    z-index: 1; /* Ensure active slide is above others */
    pointer-events: auto; /* Allow clicks on active slide */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading animation for images */
.slide.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #B8860B;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Navigation dots */
.slideshow-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px; /* Increased gap for better touch targets */
    z-index: 10;
    padding: 15px 0; /* Larger touch area */
}

.slideshow-dot {
    width: 15px; /* Larger dots */
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Make dots more visible */
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.slideshow-dot.active {
    background-color: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Navigation arrows */
.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none; /* Let clicks through to the slide */
}

.slideshow-nav button {
    background-color: rgba(0, 0, 0, 0.5); /* Darker for better visibility */
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px; /* Larger icons */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); /* Add shadow for visibility */
    pointer-events: auto; /* Override the parent's pointer-events */
}

.slideshow-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Property info overlay */
.property-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px;
    z-index: 5;
}

/* Responsive adjustments for slideshow */
@media (max-width: 768px) {
    .property-slideshow {
    height: 450px;
    }
    
    .slideshow-nav button {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin: 0 10px;
    }
    
    .slideshow-dot {
        width: 12px;
        height: 12px;
    }
}

/* Print styles for slideshows */
@media print {
    .slideshow-nav,
    .slideshow-controls {
        display: none;
    }
    
    .property-slideshow {
        height: auto;
        page-break-inside: avoid;
    }
    
    .slide:not(.active) {
        display: none;
    }
    
    .slide.active {
        position: static;
        display: block;
    }
    
    .slide img {
        width: 100%;
        height: auto;
    }
}

/* Additional spacing for specific pages */
.contact-section, .properties-section, .section-light {
  padding-bottom: 5rem; /* Increase bottom padding on these sections */
}

/* (Reverted) Homepage slideshow overrides removed */

/* ===== FAQ STYLES ===== */
#faq {
  background-color: var(--off-white);
}

#faq .faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#faq .faq-list details {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

#faq .faq-list details:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--gold-gradient);
  opacity: 0.85;
}

#faq .faq-list details[open] {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 134, 11, 0.25);
}

#faq .faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3rem 1.1rem 1.2rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--dark);
  position: relative;
  outline: none;
}

#faq .faq-list summary::-webkit-details-marker {
  display: none;
}

#faq .faq-list summary::after {
  content: '\276F'; /* chevron */
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  color: var(--gold);
  font-size: 1rem;
  transition: transform 0.25s ease, color 0.25s ease;
}

#faq .faq-list details[open] summary::after {
  transform: translateY(-50%) rotate(270deg);
  color: var(--gold-dark);
}

#faq .faq-list summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 144, 41, 0.2) inset;
}

#faq .faq-list p {
  padding: 0 1.2rem 1.2rem 1.2rem;
  margin: 0;
  color: var(--dark-secondary);
  line-height: 1.7;
}

@media (max-width: 576px) {
  #faq .faq-list summary {
    padding: 1rem 2.5rem 1rem 1rem;
    font-size: 1rem;
  }
}

/* Unused homepage-specific sections (process/testimonials) removed per request */

/* ===== Footer polish (premium touches) ===== */
/* Elegant gold accent line on top of footer */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0.9;
}

/* Refined footer headings */
.footer-social h4,
.footer-links h4,
.footer-contact h4,
.footer-rekviziti h4 {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Link underline animation */
.footer-links a {
  position: relative;
  text-decoration: none;
}
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: width 0.25s ease;
}
.footer-links a:hover::after,
.footer-links a:focus-visible::after {
  width: 100%;
}

/* Social icon gold ring hover */
.social-icons a {
  border: 1px solid rgba(255,255,255,0.25);
}
.social-icons a:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(192,144,41,0.7);
  box-shadow: 0 0 0 3px rgba(192, 144, 41, 0.15);
}

/* Lighter, bordered bottom bar */
.footer-bottom {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.footer-bottom p { opacity: 0.9; }

/* Subtle column dividers on desktop */
@media (min-width: 992px) {
  .footer-content > div { position: relative; }
  .footer-content > div:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 10%;
    right: -1rem;
    width: 1px;
    height: 80%;
    background: rgba(255,255,255,0.15);
  }
}

/* Accessibility: strong keyboard focus */
.footer-links a:focus-visible,
.footer-contact a:focus-visible,
.social-icons a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== BLOG ARTICLE TYPOGRAPHY ===== */
/* Unified readable typography for standalone blog posts (intro + guides) */
.blog-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 60px;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.15px;
  color: var(--dark-secondary);
}

.blog-article figure { margin: 0 0 1.5rem; }
.blog-article figure img { border-radius: 10px; width: 100%; height: auto; display: block; }
.blog-article figure figcaption { font-size: 0.9rem; color: var(--dark-secondary); margin-top: 0.6rem; text-align: left; }

/* Headings inside article: slightly smaller than page headers for hierarchy */
.blog-article h1 { font-size: 2.4rem; margin: 0 0 1.2rem; line-height: 1.25; }
.blog-article .header-desc { font-size: 0.95rem; color: var(--dark-secondary); margin-top: -0.5rem; margin-bottom: 1.8rem; }
.blog-article h2 { font-size: 1.9rem; margin: 2.8rem 0 1.1rem; letter-spacing: .4px; }
.blog-article h2:after { bottom: -0.6rem; height: 2px; width: 50px; }
.blog-article h3 { font-size: 1.3rem; margin: 2.2rem 0 0.9rem; font-weight: 600; letter-spacing: .3px; }

.blog-article p { margin: 0 0 1.15rem; line-height: 1.7; }
.blog-article p + ul,
.blog-article p + ol { margin-top: -0.3rem; }

.blog-article ul, .blog-article ol { margin: 0 0 1.6rem 1.3rem; padding: 0; }
.blog-article li { margin: 0 0 0.55rem; line-height: 1.6; position: relative; }
.blog-article ul li { list-style: disc; }
.blog-article ol li { list-style: decimal; }

/* Improve emphasis */
.blog-article strong { color: var(--dark); font-weight: 600; }

/* Back button spacing consistency */
.blog-article .post-back { margin-top: 2.4rem; }

/* Decorative golden divider for intro and guide posts */
.blog-article .gold-divider {
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg,#B8860B,#d4af37,#B8860B);
  margin: 34px auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(184,134,11,0.15), 0 4px 12px -2px rgba(184,134,11,0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-article { font-size: 16px; padding: 0 18px 50px; }
  .blog-article h1 { font-size: 2rem; }
  .blog-article h2 { font-size: 1.6rem; }
  .blog-article h3 { font-size: 1.15rem; }
  .blog-article .gold-divider { width: 90px; height: 3px; margin: 30px auto; }
}
@media (max-width: 480px) {
  .blog-article { font-size: 15px; }
  .blog-article h1 { font-size: 1.85rem; }
  .blog-article h2 { font-size: 1.45rem; }
}

/* Mobile readability: keep links/contact left-aligned */
@media (max-width: 767px) {
  .footer-links,
  .footer-contact,
  .footer-rekviziti {
    align-items: flex-start;
    text-align: left;
  }
}

/* Rekvizīti paragraph styling to match contact */
.footer-rekviziti p {
  margin-bottom: 0.7rem;
  opacity: 0.8;
  color: #ffffff; /* Match contact text style */
}

/* Mobile footer alignment fixes: left-align golden headings and content columns */
@media (max-width: 767px) {
  /* Keep columns left-aligned for readability */
  .footer-links,
  .footer-contact,
  .footer-rekviziti {
    align-items: flex-start !important;
    text-align: left !important;
  }

  /* Left-align the golden section titles and their underline */
  .footer-links h4,
  .footer-contact h4,
  .footer-rekviziti h4 {
    text-align: left !important;
  }
  .footer-links h4:after,
  .footer-contact h4:after,
  .footer-rekviziti h4:after {
    left: 0 !important;
    transform: none !important;
  }

  /* Ensure numeric content is readable on dark backgrounds */
  .footer-contact p,
  .footer-rekviziti p,
  .footer-bottom p {
    opacity: 1 !important; /* Stronger contrast for small screens */
    color: #ffffff; /* Explicit white to avoid UA overrides */
  }

  /* If mobile OS auto-links phone numbers, keep them visible */
  .footer-contact a,
  .footer-rekviziti a,
  .footer-bottom a {
    color: #ffffff !important;
    text-decoration-color: rgba(255,255,255,0.6);
  }
  .footer-contact a:hover,
  .footer-rekviziti a:hover,
  .footer-bottom a:hover {
    color: var(--gold) !important;
    text-decoration-color: var(--gold);
  }
}