:root {
  --primary-color: #1E3A8A;
  --secondary-color: #F5F3EE;
  --accent-color: #FF7F50;
  --white: #fff;
  --black: #222;
  --text-color: #555;
}

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

body {
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--black);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(30, 58, 138, 0.85);
  transition: all 0.3s ease;
}

header h1 {
  color: var(--white);
  font-size: 1.6rem;
  letter-spacing: 1px;
  transition: color 0.3s;
}

header.scrolled {
  background: var(--white);
}

header.scrolled h1 {
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  position: relative;
  color: var(--white);
  font-weight: 500;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

header.scrolled nav a {
  color: var(--primary-color);
}

.hero {
  height: 100vh;
  background: url('fotky/apt21_crop/J2.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 20px;
}

.hero-content h2 {
  font-size: 3.2rem;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.btn {
  background: var(--primary-color);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn:hover {
  background: #152963;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  padding: 100px 60px;
  align-items: center;
  background: var(--secondary-color);
}

.about-text h3 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.about-text p {
  color: var(--text-color);
  margin-bottom: 15px;
}

.about-image {
  width: 100%;
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 10px;
}

.about-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apartments {
  padding: 100px 60px;
  background-color: var(--white);
  text-align: center;
}

.apartments h3 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.apartment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
}

.apartment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: 350px;
  transition: all 0.3s ease;
}

.apartment-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.apartment-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 3px solid var(--primary-color);
}

.apartment-card h4 {
  margin: 15px 0 5px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.apartment-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-color);
  padding: 15px;
}

.contact {
  padding: 100px 60px;
  background: var(--white);
  text-align: center;
}

.contact h3 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.contact-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.contact-info {
  flex: 1.2;
  max-width: 450px;
  font-size: 1.5rem;
  color: #444;
  line-height: 1.7;
}

.contact-info p {
  margin-bottom: 12px;
}

.contact-map {
  flex: 1;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

footer {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
  height: 100px;
}

footer p{
  padding-top: 14px;
}

footer a{
  text-decoration: underline;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  z-index: 999;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav {
  transition: right 0.3s ease;
}

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

@media(max-width: 900px) {
    .header h1 a{
      font-size: 1.3rem;
  }
  .apartment-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .apartment-card {
    max-width: 400px;
  }

  .contact-grid {
    flex-direction: column-reverse;
    text-align: center;
    align-items: center;
    gap: 30px;
  }

  .contact-info, .contact-map {
    max-width: 100%;
    font-size: 1.2rem;
  }

  .contact-map iframe {
    height: 300px;
  }

  .hamburger {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 60%;
    height: 100vh;
    background: rgba(30,58,138,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 105;
  }

  nav ul {
    flex-direction: column;
    gap: 30px;
  }

  nav a {
    font-size: 1.3rem;
    color: var(--white);
  }

  nav.active {
    right: 0;
  }
}

@media(max-width: 600px) {
  .hero-content h2 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .about {
    padding: 80px 30px;
    gap: 30px;
  }
  .apartments {
    padding: 80px 30px;
  }
  .contact {
    padding: 80px 30px;
  }

  header h1 a {
    font-size: 1.1rem;
  }

  header {
    padding: 0 25px;
    height: 65px;
  }

  .hamburger {
    width: 22px;
    height: 18px;
  }
}