/* ================================================================
   Kovács Bácsi Gazdasága — style.css
   Classic earthy farm theme | Mobile-first
   ================================================================ */

/* ---- Custom Properties ---- */
:root {
  --primary: #5c4a1e;
  --secondary: #8b6914;
  --accent: #4a7c3f;
  --bg: #faf6f0;
  --text: #333333;
  --border: #e8dcc8;
  --white: #ffffff;
  --footer-bg: #2c1f0a;
  --footer-text: #d4c4a0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --transition: 0.25s ease;
}

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

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

body {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--primary);
  line-height: 1.3;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary);
}

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---- Buttons ---- */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
  border: 2px solid var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #3a6330;
  border-color: #3a6330;
  color: var(--white);
}

/* ================================================================
   COOKIE BANNER
   ================================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--footer-bg);
  color: var(--footer-text);
  z-index: 9999;
  padding: 16px 20px;
  border-top: 3px solid var(--secondary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  font-size: 0.9rem;
  min-width: 200px;
}

.cookie-banner__text a {
  color: var(--border);
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-accept {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 10px 22px;
  font-size: 0.9rem;
}
.cookie-accept:hover {
  background: #3a6330;
  border-color: #3a6330;
}

.cookie-reject {
  background: transparent;
  border: 2px solid var(--footer-text);
  color: var(--footer-text);
  padding: 10px 22px;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
}
.cookie-reject:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.logo:hover {
  color: var(--secondary);
}

.logo__icon {
  font-size: 2rem;
  line-height: 1;
}
.logo small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--secondary);
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(92, 74, 30, 0.08);
}

.header__cta {
  font-size: 0.9rem;
  padding: 10px 20px;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.hamburger span {
  display: block;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.is-open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ================================================================
   HERO SECTIONS
   ================================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.hero--full {
  height: 85vh;
}
.hero--half {
  height: 40vh;
  min-height: 260px;
}
.hero--short {
  height: 30vh;
  min-height: 200px;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 0 24px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  margin-bottom: 32px;
  opacity: 0.92;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================================
   SECTIONS — Common
   ================================================================ */
.section {
  padding: 64px 0;
}

.section--alt {
  background: var(--white);
}
.section--dark {
  background: var(--primary);
  color: var(--white);
}
.section--dark h2 {
  color: var(--white);
}
.section--dark p {
  opacity: 0.9;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}
.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 12px;
}
.section__subtitle {
  font-size: 1.05rem;
  color: #666;
  max-width: 580px;
  margin: 0 auto;
}

/* ================================================================
   CARDS — grid
   ================================================================ */
.cards-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

.card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card__img--placeholder {
  width: 100%;
  height: 220px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card__body {
  padding: 22px;
}
.card__title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.card__text {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 16px;
  line-height: 1.6;
}
.card__price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 16px;
}
.card__date {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 8px;
}

/* ================================================================
   WELCOME SECTION
   ================================================================ */
.welcome {
  padding: 72px 0;
}

.welcome__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.welcome__text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}
.welcome__text p {
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.welcome__image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

/* ================================================================
   ANIMALS SECTION
   ================================================================ */
.animals {
  background: var(--white);
  padding: 64px 0;
}

/* ================================================================
   PRODUCTS PREVIEW
   ================================================================ */
.products-preview {
  padding: 64px 0;
}

/* ================================================================
   BLOG PREVIEW
   ================================================================ */
.blog-preview {
  background: var(--white);
  padding: 64px 0;
}

.blog-preview .section__footer {
  text-align: center;
  margin-top: 40px;
}

/* ================================================================
   CTA SECTION
   ================================================================ */
.cta-section {
  background: var(--primary);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0,
    transparent 50%
  );
  background-size: 12px 12px;
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}
.cta-section h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cta-section .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-size: 1.1rem;
  padding: 14px 36px;
}
.cta-section .btn-primary:hover {
  background: #3a6330;
  border-color: #3a6330;
}

/* ================================================================
   SHOP PAGE
   ================================================================ */
.shop-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding: 48px 0;
}

.delivery-info {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin: 40px 0;
}
.delivery-info h2 {
  margin-bottom: 16px;
}
.delivery-info p {
  margin-bottom: 12px;
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */
.about-story {
  display: grid;
  gap: 48px;
  padding: 64px 0;
}

.about-story__text h2 {
  margin-bottom: 20px;
}
.about-story__text p {
  margin-bottom: 16px;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 0 0 64px;
}
.about-gallery img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* ================================================================
   FARM PAGE
   ================================================================ */
.farm-animals-section {
  display: grid;
  gap: 48px;
  padding: 48px 0;
}

.farm-animal {
  display: grid;
  gap: 32px;
  align-items: center;
}

.farm-animal:nth-child(even) {
  direction: rtl;
}
.farm-animal:nth-child(even) > * {
  direction: ltr;
}

.farm-animal img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.farm-animal h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.farm-animal p {
  margin-bottom: 12px;
}

/* ================================================================
   CARE PAGE
   ================================================================ */
.care-section {
  padding: 48px 0;
}

.care-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  margin-bottom: 32px;
  display: grid;
  gap: 24px;
}

.care-block__icon {
  font-size: 2.5rem;
}
.care-block h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.care-block p {
  margin-bottom: 12px;
}

.care-tips {
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 40px;
}
.care-tips h2 {
  color: var(--white);
  margin-bottom: 16px;
}
.care-tips p {
  margin-bottom: 12px;
  opacity: 0.95;
}

/* ================================================================
   CONTACT PAGE
   ================================================================ */
.contact-page {
  padding: 64px 0;
}

.contact-grid {
  display: grid;
  gap: 48px;
}

.contact-info h2 {
  margin-bottom: 20px;
}
.contact-info p,
.contact-info address p {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  background: var(--white);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-required {
  color: #c0392b;
}

.form-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 500;
}

.form-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

/* ================================================================
   LEGAL PAGES (Privacy, Cookie, Terms, Imprint)
   ================================================================ */
.legal-page {
  padding: 64px 0;
  max-width: 820px;
  margin: 0 auto;
}

.legal-page h1 {
  margin-bottom: 8px;
}
.legal-page .legal-date {
  color: #888;
  margin-bottom: 40px;
  font-size: 0.9rem;
}
.legal-page h2 {
  font-size: 1.35rem;
  margin: 32px 0 12px;
}
.legal-page p {
  margin-bottom: 14px;
}
.legal-page ul {
  list-style: disc;
  padding-left: 28px;
  margin-bottom: 14px;
}
.legal-page ul li {
  margin-bottom: 6px;
}
.legal-page a {
  text-decoration: underline;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-top: 60px;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__col h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 18px;
  font-family: "Playfair Display", serif;
}

.footer__col ul li {
  margin-bottom: 8px;
}
.footer__col a {
  color: var(--footer-text);
  font-size: 0.95rem;
}
.footer__col a:hover {
  color: var(--white);
}

.footer__col address p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.social-links li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.social-icon {
  font-size: 1.1rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.newsletter-form input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
}
.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--secondary);
}
.newsletter-form .btn-primary {
  width: 100%;
}

.footer__bottom {
  padding: 18px 0;
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer__legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__legal a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer__legal a:hover {
  color: var(--white);
}

/* ================================================================
   MEDIA QUERIES — Tablet / Desktop
   ================================================================ */

@media (min-width: 600px) {
  .welcome__inner {
    grid-template-columns: 1fr 1fr;
  }
  .about-story {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .farm-animal {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .hamburger {
    display: none !important;
  }

  .main-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }
  .header__cta {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    gap: 4px;
  }
  .main-nav.is-open {
    display: flex;
  }
  .main-nav a {
    width: 100%;
    padding: 10px 12px;
  }

  .hero--full {
    height: 70vh;
  }
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .farm-animal:nth-child(even) {
    direction: ltr;
  }

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

  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer__legal {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .cookie-banner__inner {
    flex-direction: column;
  }
  .cookie-banner__buttons {
    width: 100%;
  }
  .cookie-accept,
  .cookie-reject {
    flex: 1;
    text-align: center;
  }
}

/* ── Newsletter form ── */
.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e8dcc8);
  border-radius: 4px;
  font-size: 0.95rem;
}
.newsletter-msg {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}
.newsletter-msg.success {
  background: #d4edda;
  color: #155724;
}
.newsletter-msg.error {
  background: #f8d7da;
  color: #721c24;
}
.newsletter-msg.info {
  background: #d1ecf1;
  color: #0c5460;
}

/* ── Mobile responsive fixes (CLS) ── */
img {
  max-width: 100%;
  height: auto;
}
.product-card img,
.card img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}
.hero-banner {
  contain: layout;
}

/* ── Form feedback ── */
.form-message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 12px;
  font-size: 0.95rem;
}
.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ── Blog cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.blog-card-body {
  padding: 20px;
}
.blog-card-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}
.blog-card h3 {
  margin-bottom: 12px;
}
.blog-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* ── a11y improvements ── */
:focus-visible {
  outline: 3px solid var(--accent, #4a7c3f);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form input[type="email"] {
    min-width: 100%;
  }
  .cta-section .btn-primary {
    display: block;
    margin: 0 auto 12px;
    text-align: center;
  }
}
