/* ===================================
   Tatiana Matulová - Real Estate
   Clean CSS Design
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

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

a {
  color: #5a7a9b;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #3a5a7b;
}

h1, h2, h3, h4 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  line-height: 1.3;
  color: #2c3e50;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
h4 { font-size: 1rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e8e8e8;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #555;
  text-transform: uppercase;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: #5a7a9b;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a:hover,
.main-nav a.active {
  color: #2c3e50;
}

.lang-switch {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid #ddd;
}

.lang-switch a {
  font-size: 0.8rem;
  font-weight: 600;
  color: #999;
  padding: 0.25rem 0.4rem;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: #5a7a9b;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  transition: all 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 60vh;
  min-height: 350px;
  max-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2c3e50;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 2rem;
}

.hero-content h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* --- Services Grid --- */
.services {
  padding: 4rem 0;
  background: #fafafa;
}

.services-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.service-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.service-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: #666;
  font-size: 0.95rem;
}

/* --- Text + Image Section --- */
.text-image {
  padding: 4rem 0;
}

.text-image .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.text-image img {
  border-radius: 4px;
  width: 100%;
}

.text-image .text-content h1 {
  margin-bottom: 1.5rem;
}

.text-image .text-content p {
  color: #555;
}

.tagline {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

/* --- Photo Gallery --- */
.gallery {
  padding: 4rem 0;
  background: #fafafa;
}

.gallery-title {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-title a:hover {
  color: #5a7a9b !important;
  text-decoration: underline !important;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  border-radius: 2px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.05);
}

/* Gallery for homepage (horizontal strip) */
.gallery-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.gallery-strip a {
  flex: 0 0 auto;
  height: 200px;
  display: block;
  overflow: hidden;
  border-radius: 2px;
}

.gallery-strip img {
  height: 100%;
  width: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-strip a:hover img {
  transform: scale(1.05);
}

/* --- News/Blog Section --- */
.news-section {
  padding: 3rem 0;
  text-align: center;
}

.news-section h1 {
  margin-bottom: 2rem;
}

.news-section img {
  margin: 0 auto;
  border-radius: 4px;
}

/* --- How I Work - Feature List --- */
.features {
  padding: 4rem 0;
}

.features-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
}

.feature-item .feature-img {
  flex: 0 0 180px;
  border-radius: 4px;
  overflow: hidden;
}

.feature-item .feature-img img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.feature-item h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.feature-item p {
  font-size: 0.9rem;
  color: #666;
}

.feature-closing {
  text-align: center;
  padding: 3rem 0 0;
}

.feature-closing h1 {
  font-style: italic;
}

/* --- References / Testimonials --- */
.testimonials {
  padding: 4rem 0;
}

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

.testimonial-card {
  background: #f8f9fa;
  padding: 1.5rem 2rem;
  border-radius: 6px;
  border-left: 3px solid #5a7a9b;
}

.testimonial-card blockquote {
  font-style: italic;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.testimonial-card .author {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.testimonial-card .rating {
  color: #c5a55a;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.video-embed {
  text-align: center;
  padding: 2rem 0;
}

.video-embed iframe {
  max-width: 100%;
  border-radius: 6px;
}

/* --- Contact --- */
.contact-section {
  padding: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info li {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: #555;
}

.contact-info li strong {
  color: #2c3e50;
  display: inline-block;
  min-width: 80px;
}

.contact-info a {
  color: #5a7a9b;
}

.contact-map {
  border-radius: 6px;
  overflow: hidden;
}

.contact-map iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Footer --- */
.site-footer {
  background: #2c3e50;
  color: #aab;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.1rem;
  color: #dde;
}

.footer-title {
  font-size: 0.85rem;
  color: #889;
  margin-top: 0.25rem;
}

/* --- Back to Top Button --- */
.back-to-top {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #5a7a9b;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  border-radius: 2px;
  margin-top: 2rem;
}

.back-to-top:hover {
  background: #4a6a8b;
  color: #fff;
}

/* --- Section spacing --- */
section + section {
  border-top: 1px solid #eee;
}

.section-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem auto;
  max-width: 200px;
}

/* --- Lightbox --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    border-bottom: 1px solid #e8e8e8;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .main-nav a::after {
    display: none;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding: 0.5rem 1.5rem;
    border-top: 1px solid #eee;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .text-image .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .feature-item {
    flex-direction: column;
  }

  .feature-item .feature-img {
    flex: none;
  }

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

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

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .hero {
    height: 40vh;
    min-height: 250px;
    background-attachment: scroll;
  }

  .hero-bg {
    background-attachment: scroll;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
