* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  color: #2f3e46;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1;
  margin-top: 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1.5rem;
}

.intro + main {
  margin-top: 100vh;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  color: black;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.logo {
  width: 80px;
  height: auto;
  max-width: 100%;
  display: block;
}

@media (max-width: 992px) {
  .logo { width: 70px; }
}

@media (max-width: 480px) {
  .logo { width: 60px; }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: black;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #ffc857;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.intro {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/new_background.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  background-color: #f5f6f5;
  z-index: -1;
}

@media (max-width: 768px) {
  .intro {
    top: 76px;
    background-image:
      linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.18)),
      url('../images/new_phone.png');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-color: #111;
  }
}

@media (max-width: 420px) {
  .intro {
    background-position: center 24%;
  }
}

.fade-section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.content {
  padding: 0;
  max-width: none;
  margin: 0;
  display: block;
  text-align: left;
}

.content h2 {
  color: #3f6c59;
  margin-bottom: 1rem;
}

.content p,
.content ul,
.content ol,
.content li,
.content .post-excerpt,
.content .post-meta {
  margin-left: 0.9rem;
}

.content > * {
  opacity: 1;
  transform: none;
  transition: none;
}

.fade-section > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-section .content > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-section.visible > * ,
.fade-section.visible .content > * {
  opacity: 1;
  transform: translateY(0);
}

.responsive-img {
  width: 100%;
  max-width: 500px;
  margin-top: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

footer {
  background: #76b39d;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
}

.content .contact-btn {
  display: inline-block;
  margin-top: 1.25rem;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.18s cubic-bezier(.22,1,.36,1), box-shadow 0.18s ease, background 0.2s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  align-self: flex-start;
  max-width: 260px;
}

.content .contact-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  transform: translateX(-110%);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1);
  border-radius: 10px;
}

.content .contact-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.25);
  background-color: #111;
}

.content .contact-btn:hover::after {
  transform: translateX(0);
}

.content .contact-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.content .contact-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(63,108,89,0.12);
  border-color: #3f6c59;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(47,62,70,0.12);
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  color: #222;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(63,108,89,0.06);
  border-color: #3f6c59;
}

.contact-form textarea {
  resize: none;
  overflow: auto;
}

.btn.contact-submit {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  align-self: start;
  max-width: 220px;
}

.btn.contact-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.contact-status {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: #2f3e46;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.post-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(16,24,32,0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16,24,32,0.12); }

.post-thumb { width:100%; height:160px; overflow:hidden; background:#ddd; }
.post-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

.post-card-body { padding: 1rem; }
.post-card-body h3 { margin:0 0 .5rem; font-size:1.05rem; color:#2f3e46; }
.post-excerpt { margin:0 0 .75rem; color:#445; font-size:0.95rem; line-height:1.4; }
.post-meta { font-size:0.82rem; color:#7a8b82; }

.post-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem;
  line-height: 1.65;
  color: #203033;
}

.post-article h1 { font-size:1.7rem; color:#2f3e46; margin-bottom:.4rem; }
.post-article .post-meta { color:#6e7b72; margin-bottom:1rem; font-size:0.9rem; }
.post-hero { margin: 1rem 0; border-radius: 10px; overflow: hidden; }
.post-hero img { width:100%; height:100%; object-fit:cover; display:block; }

.back-link { display:inline-block; margin-bottom:0.75rem; color:#3f6c59; text-decoration:none; }
.back-link:hover { text-decoration:underline; }

@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    align-items: center;
    background: #76b39d;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    padding: 1rem 0;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    overflow: visible;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 16px 16px;
  }

  .nav-links.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    animation: slideFadeIn 0.4s ease forwards;
    background: #fff;
    box-shadow: 0 12px 30px rgba(47,62,70,0.18);
  }

  .menu-btn {
    display: block;
    background: #fff;
    color: #2f3e46;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }

  .menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(47,62,70,0.18);
  }

  .menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(63,108,89,0.14);
  }

  .nav-links a {
    color: #2f3e46;
  }

  .nav-links a::after {
    background-color: #ffc857;
  }

  .nav-links a:focus {
    background: rgba(255,255,255,0.04);
  }

  .content {
    margin: 4rem 1rem;
    grid-template-columns: 1fr;
  }

  .content h2,
  .responsive-img { grid-column: 1 / -1; }

  .intro-title { font-size: 2rem; }
  .intro-motto { font-size: 1.1rem; }

  .content .contact-btn {
    display: block;
    width: 100%;
    max-width: none;
    align-self: stretch;
    padding: 0.9rem;
    border-radius: 8px;
  }

  .contact-form {
    padding: 0;
    gap: 0.6rem;
  }

  .btn.contact-submit {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .blog-grid {
    display: block;
    padding: 0 0.75rem;
    margin: 0 auto 1.25rem;
    gap: 0;
  }

  .blog-grid .post-card {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16,24,32,0.06);
    transform: none;
  }

  .blog-grid .post-thumb {
    height: 140px;
  }

  .post-card-body {
    padding: 0.9rem;
  }

  .post-card-body h3 { font-size: 1rem; margin-bottom: 0.35rem; }
  .post-excerpt { font-size: 0.95rem; }
  .post-meta { font-size: 0.78rem; }
}

@keyframes slideFadeIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (min-width: 769px) {
  main {
    display: grid;
    grid-template-columns: minmax(300px, 520px) minmax(300px, 640px);
    gap: 3rem;
    justify-content: center;
    align-items: start;
    grid-auto-rows: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  main > .content {
    grid-column: 1 / -1;
    width: 100%;
  }

  main > .photo { grid-column: 1; grid-row: 1; }
  main > .despre { grid-column: 2; grid-row: 1; }

  main > .photo .responsive-img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    margin-top: 0;
    border-radius: 10px;
    display: block;
  }

  main > .fade-section { display: flex; flex-direction: column; gap: 1rem; }

  main > .contact-left { grid-column: 1; grid-row: 1; padding-top: 0.5rem; }
  main > .contact-right { grid-column: 2; grid-row: 1; padding-top: 0.5rem; }

  .contact-left .contact-form {
    max-width: 520px;
    width: 100%;
    margin: 0;
    padding-right: 0.5rem;
  }

  .contact-right iframe {
    width: 100%;
    height: 560px;
    max-height: 640px;
    min-height: 360px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
  }

  .blog-grid {
    max-width: 1100px;
    margin: 0 auto 2rem;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
    justify-items: center;
  }

  .blog-grid .post-card {
    width: 100%;
    max-width: 520px;
    margin: 0;
    justify-self: center;
    box-shadow: 0 10px 30px rgba(16,24,32,0.06);
  }

  .blog-grid .post-card .post-card-body {
    padding: 0.85rem;
  }

  .blog-grid .post-thumb {
    height: 150px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  main {
    grid-template-columns: minmax(300px, 520px) minmax(280px, 520px);
    gap: 2rem;
  }
  .contact-right iframe { height: 520px; }
}

.post-article p {
  margin-left: 2em;
}

.post-article ul,
.post-article ol {
  margin-left: 4em;
}

@media (max-width: 768px) {
  main {
    display: block;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-left, .contact-right {
    width: 100%;
    margin: 0 auto;
    padding: 0 0;
  }

  .contact-left .contact-form { max-width: 100%; padding: 0; }
  .contact-right iframe {
    width: 100%;
    height: 320px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin-top: 1rem;
  }

  footer {
    position: relative;
    z-index: 220;
  }

  .nav-links {
    z-index: 200;
  }

  .carousel-nav,
  .carousel-dots {
    z-index: 210;
  }

  footer { margin-top: 2rem; }
}
