@import url('https://fonts.googleapis.com/css2?family=Mansalva&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 120%;
}

body {
  font-family: 'Mansalva', cursive;
  color: #333;
  line-height: 1.6;
}

a {
  color: #2e7d32;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
    url('images/background_rakousy.JPG') center 45% / cover;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-bottom: 3px solid #2e7d32;
  z-index: 1000;
}

.nav-brand {
  font-family: 'Mansalva', cursive;
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.25px currentColor;
  color: #2e7d32;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #333;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #2e7d32;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #333;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 50%, #a5d6a7 100%); /* fallback */
  color: white;
  padding: 2rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
}

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

.hero h1 {
  font-family: 'Mansalva', cursive;
  font-size: 4.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.35px currentColor;
  margin-bottom: 0.5rem;
  text-shadow: 2px 3px 10px rgba(0,0,0,0.55);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  opacity: 1;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2rem;
  opacity: 1;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.5);
}

/* ===== Buttons ===== */
.btn {
  font-family: inherit;
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-decoration: none;
}

.btn-primary {
  background: #f4b942;
  color: #26351f;
  box-shadow: 0 3px 10px rgba(88, 61, 8, 0.25);
}

.btn-primary:hover {
  background: #ffd166;
  color: #26351f;
  box-shadow: 0 5px 14px rgba(88, 61, 8, 0.3);
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 2rem;
}

.section-alt {
  background: #eef5e9;
}

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

.section-title {
  font-family: 'Mansalva', cursive;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #2e7d32;
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 1.5rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.about-card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(31, 67, 38, 0.1);
  transition: transform 0.2s;
}

.about-card:hover {
  transform: translateY(-4px);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.about-card h3 {
  font-family: 'Mansalva', cursive;
  margin-bottom: 0.4rem;
  color: #2e7d32;
}

.about-text {
  max-width: 800px;
  margin: 1.5rem auto 0;
  text-align: center;
  color: #555;
}

.about-text p + p {
  margin-top: 1rem;
}

/* ===== Why Rakousy ===== */
.why-section {
  background: #fffdf4;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.why-card {
  padding: 1.25rem;
  background: #ffffff;
  border-left: 4px solid #f4b942;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(31, 67, 38, 0.08);
}

.why-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.why-card h3 {
  font-family: 'Mansalva', cursive;
  color: #2e7d32;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.why-card p {
  color: #555;
  font-size: 0.95rem;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 253, 244, 0.82);
}

.gallery-tab {
  font-family: inherit;
  padding: 0.5rem 1.2rem;
  border: 2px solid #2e7d32;
  border-radius: 20px;
  background: #fffdf4;
  color: #2e7d32;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-tab:hover {
  background: rgba(46, 125, 50, 0.1);
}

.gallery-tab.active {
  background: #2e7d32;
  color: white;
  box-shadow: 0 3px 0 #1f5723;
}

.gallery-year {
  display: none;
}

.gallery-year.active {
  display: block;
}

.gallery-empty {
  text-align: center;
  color: #888;
  padding: 3rem 1rem;
  font-size: 1rem;
}

.gallery-empty code {
  background: #e0e0e0;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Gallery Grid */
.gallery-grid {
  height: 470px;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  gap: 3px;
  margin-bottom: 1.5rem;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.gallery-row {
  display: flex;
  flex: 0 0 50%;
  width: max-content;
  height: 50%;
  gap: 3px;
  min-height: 0;
  overflow: visible;
}

.gallery-item {
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
  border: 3px solid white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(31, 67, 38, 0.18);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 0.3s;
}

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

.form-required-note {
  text-align: right;
  color: #c62828;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  margin-top: -1.5rem;
}

/* Forms */
.form {
  max-width: 700px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.form-group:has(input:required, textarea:required) label::after {
  content: " *";
  color: #c62828;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-group input:invalid:not(:placeholder-shown):not(:focus),
.form-group textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}

.form.submitted input:invalid,
.form.submitted textarea:invalid {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}

.form-error {
  color: #c62828;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}

.form.submitted input:invalid ~ .form-error,
.form.submitted textarea:invalid ~ .form-error {
  display: block;
}

/* ===== Success Message ===== */
.form-message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-top: 1rem;
}

.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
}

.form-error-message {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-info {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  min-width: 0;
}

.contact-info h3,
.contact-form-wrap h3 {
  font-family: 'Mansalva', cursive;
  margin-bottom: 1rem;
  color: #2e7d32;
}

.leader-photo {
  width: 260px;
  height: 340px;
  object-fit: cover;
  border: 6px solid #fffdf4;
  border-radius: 10px;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(31, 67, 38, 0.18);
}

.contact-details {
  padding-top: 0.15rem;
  min-width: 0;
}

.contact-info p {
  margin-bottom: 0.6rem;
  overflow-wrap: anywhere;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  background: #2e7d32;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section {
    padding: 2.5rem 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .gallery-grid {
    height: 430px;
    flex-direction: column;
    overflow-x: auto;
    gap: 0;
    padding: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

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

  .contact-info {
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .leader-photo {
    width: 38%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 13 / 17;
  }

  .contact-details {
    flex: 1 1 0;
  }
}
