/*
Theme Name: BH Group Replica
Theme URI: https://bhgroup.sk/
Author: Gemini CLI
Author URI: https://gemini.google.com/
Description: A replica theme for BH Group website.
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bhgroup-replica
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #2ea3f2;
  --accent-color: #ffb703; /* Yellow on hover */
  --bg-color: #000;
  --text-color: #fff;
  --font-family: 'Montserrat', sans-serif;
  --overlay-bg: rgba(0, 0, 0, 0.75); /* Darker overlay */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 6rem;
  z-index: 1001; /* Above overlay */
}

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

.hamburger-menu {
  width: 35px;
  height: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1002;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger Animation */
.hamburger-menu.is-active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.is-active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Overlay Menu (Sidebar) */
.menu-overlay {
  position: fixed;
  top: 0;
  right: -400px; /* Hidden by default */
  width: 400px;
  max-width: 80%;
  height: 100%;
  background: #000;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  border-left: 1px solid #222;
}

.menu-overlay.is-open {
  right: 0;
}

/* Backdrop for Sidebar */
body.menu-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.menu-list {
  list-style: none;
  text-align: left;
  width: 100%;
  padding: 0 4rem;
}

.menu-list li {
  margin: 1.5rem 0;
}

.menu-list a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem; /* Slightly smaller for sidebar */
  font-weight: 400;
  text-transform: uppercase;
  transition: color 0.3s ease;
  letter-spacing: 1px;
}

.menu-list a:hover {
  color: var(--accent-color);
}

/* Central Logo Overlay */
.site-header {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  pointer-events: none;
}

.site-header .site-logo img {
  max-width: 300px;
  height: auto;
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100vh;
}

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

/* Mobile font sizes and spacing */
@media (max-width: 767px) {
  .top-nav {
    padding: 1.5rem 2rem;
  }
  .top-logo img {
    max-height: 30px;
  }
  .grid-item h2 {
    font-size: 20px;
  }
  .menu-list a {
    font-size: 1.5rem;
  }
  .site-header .site-logo img {
    max-width: 200px;
  }
}

.grid-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

.grid-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.grid-item:hover img {
  transform: scale(1.1);
}

.grid-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 2;
  transition: background 0.3s ease;
}

.grid-item:hover .grid-item-overlay {
  background: rgba(0,0,0,0.3);
}

.grid-item-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
  width: 100%;
}

.grid-item h2 {
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

.grid-item:hover h2 {
  color: var(--accent-color);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.8rem;
  color: #fff;
  background: #000;
  border-top: 1px solid #222;
}

.site-footer a {
  color: var(--accent-color);
  text-decoration: none;
}

/* Modal Styles (Contact Form) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: #fff;
  color: #333;
  width: 90%;
  max-width: 600px;
  padding: 4rem 3rem;
  position: relative;
  border-radius: 2px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  cursor: pointer;
  color: #000;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #eee;
  background: #f9f9f9;
  font-family: var(--font-family);
  font-size: 1rem;
}

.contact-form button {
  background: #000;
  color: #fff;
  border: none;
  padding: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: var(--accent-color);
  color: #000;
}

/* Real Estate Styles */
.real-estate-archive, .real-estate-single {
    padding: 120px 0 60px;
    background: #000;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-align: center;
}

/* Filters */
.real-estate-filters {
    margin-bottom: 50px;
    text-align: center;
}

.filter-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-list a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 8px 20px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.filter-list a:hover, .filter-list a.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Grid */
.real-estate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.real-estate-card {
    background: #111;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.real-estate-card:hover {
    transform: translateY(-5px);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    position: relative;
    height: 240px;
}

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

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
}

.status-predane { background: #ff4444 !important; }
.status-prenajate { background: #ffbb33 !important; }
.status-v-priprave { background: #00C851 !important; }

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #fff;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
}

/* Single Listing */
.listing-header {
    margin-bottom: 40px;
    position: relative; /* Add relative positioning */
}

.back-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: inline-block;
}

.back-link:hover { color: #fff; }

.listing-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 15px;
}

.listing-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr;
    gap: 40px;
}

@media (max-width: 991px) {
    .listing-layout { grid-template-columns: 1fr; }
}

.listing-main {
    max-width: 100%;
    overflow: hidden;
}

.listing-gallery {
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.swiper {
    width: 100%;
    max-width: 100%;
    height: 500px;
    --swiper-navigation-color: var(--accent-color);
    --swiper-pagination-color: var(--accent-color);
}

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

/* Swiper navigation colors fallback */
.swiper-button-next, .swiper-button-prev {
    color: var(--accent-color);
}
.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}
.swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}

.listing-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.contact-box {
    background: #111;
    padding: 30px;
    border-top: 3px solid var(--accent-color);
}

.contact-box h3 {
    margin-bottom: 15px;
}

.btn-primary {
    display: block;
    background: var(--accent-color);
    color: #000;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 20px;
}
