/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', "Tahoma", sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

/* Header */
header {
    background-color: #2e7d32;
    color: #fff;
    padding: 15px 0;
}

/* بالای هدر: لوگو + زبان */
.header-top {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: center; /* لوگو وسط */
    align-items: center;
    /* keep this container centered, but don't position it; header will be the positioned ancestor */
}

/* لوگو وسط بالای هدر */
.logo {
    flex: 0 1 30%; /* relative width: takes ~30% of header-top but can shrink/grow */
    text-align: center;
    width: 30%; /* primary relative width */
    max-width: 420px; /* don't get too large on very wide screens */
    min-width: 160px; /* keep a reasonable minimum on small viewports */
}

.logo h1 {
    font-size: 28px;
}

/* حذف فاصله پیش‌فرض h1 برای تراز دقیق‌تر لوگو */
.logo h1 { margin: 0; }

/* منوی زبان سمت راست داخل هدر (بالا - راست) */
.language-dropdown {
    position: absolute;
    right: 20px;
    top: 12px;
    transform: none;
    z-index: 60;
}

/* منوی اصلی زیر هدر */
.main-menu {
    width: 100%;
    text-align: center;
    margin-top: 15px;
}

.main-menu ul {
    list-style: none;
    display: inline-flex;
    gap: 30px;
    justify-content: center;
}

.main-menu ul li a {
    color: #12391f; /* darker green for better contrast */
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding: 6px 4px;
}


.main-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-menu ul li a {
    color: #12391f;
    text-decoration: none;
    font-weight: 600;
}

/* underline animation using accent color */
.main-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 3px;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: width 220ms ease;
}
.main-menu ul li a:hover::after,
.main-menu ul li a:focus::after {
    width: 100%;
}
.main-menu ul li a:hover {
    color: var(--accent);
}

.logo h1 {
    font-size: 24px;
    text-align: center;
}

/* Language Dropdown */


.language-dropdown button {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

/* When a language has been selected, make the label clearly visible */
.language-dropdown button.active {
    color: #000 !important;
}
.language-dropdown button.active .lang-name {
    color: #000 !important;
    font-weight: 700;
}

/* helper for isolated LTR fragments inside RTL paragraphs */
.ltr-iso {
    direction: ltr;
    unicode-bidi: isolate;
}

/* About section paragraph styling for neat, consistent line breaks */
.about p {
  margin: 0 0 0.9rem 0;
  line-height: 1.75;
}

/* RTL languages: Persian and Arabic - right-align */
html[lang="fa"] .about p,
html[lang="ar"] .about p {
  text-align: right;
}

/* LTR languages: English and Russian - left-align */
html[lang="en"] .about p,
html[lang="ru"] .about p {
  text-align: left;
}

/* Order section - Terms box styling */
.terms-box {
  background: linear-gradient(135deg, rgba(46,125,50,0.08), rgba(255,122,24,0.06));
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 30px 25px;
  margin: 20px auto;
  max-width: 900px;
  box-shadow: 0 4px 15px rgba(46,125,50,0.08);
}

.terms-box h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
}

.term-item {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.term-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.1);
}

.term-item h4 {
  color: var(--primary);
  font-size: 16px;
  margin-bottom: 10px;
  margin-top: 0;
  font-weight: 700;
}

.term-item p {
  color: #333;
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

/* About section - Box styling (same design as terms-box) */
.about-box {
  background: linear-gradient(135deg, rgba(46,125,50,0.08), rgba(255,122,24,0.06));
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 30px 25px;
  margin: 20px auto;
  max-width: 900px;
  box-shadow: 0 4px 15px rgba(46,125,50,0.08);
}

.about-box p {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 150ms ease, box-shadow 150ms ease;
  color: #333;
  line-height: 1.8;
  font-size: 14px;
}

.about-box p:last-child {
  margin-bottom: 0;
}

.about-box p:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.1);
}.lang-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: #fff;
    color: #333;
    list-style: none;
    padding: 5px 0;
    display: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 140px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 200ms ease, transform 200ms ease;
    pointer-events: none;
}

.lang-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.lang-menu li {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 150ms ease, transform 150ms ease;
    position: relative;
}

.lang-menu li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 150ms ease;
}

.lang-menu li:hover {
    background-color: #f5f5f5;
    transform: translateX(4px);
}

.lang-menu li:hover::before {
    opacity: 1;
}

.lang-menu li img.flag {
    width: 24px;
    height: auto;
    transition: transform 150ms ease;
}

.lang-menu li:hover img.flag {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    background: url('hero.jpg') center/cover no-repeat;
    height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 18px;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.22), rgba(0,0,0,0.32));
}

.hero-content { position: relative; z-index: 2; }

.hero-content h2, .hero-content p { text-shadow: 0 3px 12px rgba(0,0,0,0.35); }

/* Sections */
section {
    padding: 50px 20px;
    text-align: center;
}

.products h2, .about h2, .order h2, .contact h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

/* Products */
.product-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch; /* ensure children stretch to same height */
}
.product-card {
    background-color: rgba(255,255,255,0.95);
    padding: 16px;
    border-radius: 12px;
    width: 220px;
    box-shadow: 0 6px 18px rgba(14,58,22,0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* space between image+title and actions/desc */
    box-sizing: border-box;
    height: 360px; /* uniform height for all cards */
}

.product-card img {
    width: 100%;
    height: 160px; /* fixed image area for consistent layout */
    object-fit: cover; /* crop/cover differing image sizes */
    border-radius: 10px;
    display: block;
    margin-bottom: 12px;
}

.product-card h3 {
    margin-top: 10px;
    font-size: 18px;
}

.product-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}
.product-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(14,58,22,0.10);
}

/* Order Form */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: auto;
}

form input, form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}

form button {
    padding: 10px 14px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255,122,24,0.12);
}

/* Footer */
footer {
    background-color: #2e7d32;
    color: #fff;
    padding: 15px 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    .main-menu ul {
        flex-direction: column;
        gap: 10px;
    }
    .product-list {
        flex-direction: column;
        align-items: center;
    }
}
:root{
    /* Palette & glass vars */
    --primary: #2e7d32; /* main green */
    --accent: #ff7a18;  /* warm orange call-to-action */
    --muted-bg-1: #f0fbf5;
    --muted-bg-2: #e8f7ec;

    --glass-bg: rgba(255,255,255,0.12);   /* glass fallback */
    --glass-border: rgba(255,255,255,0.18);
    --glass-accent: rgba(255,255,255,0.25);
    --glass-blur: 10px;
    --glass-radius: 14px;
    --glass-shadow: 0 6px 20px rgba(0,0,0,0.12);
    --glass-padding: 18px;
}

/* کلاس عمومی گلس */
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  background-color: var(--glass-bg); /* fallback */
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  padding: var(--glass-padding);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%); /* safari */
  color: #fff;
  /* اگر می‌خواهی محتوای داخل کاملاً خوانا باشه */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* نمونه کارت */
.card.glass{
  max-width: 420px;
  margin: 1rem;
}

/* هدر شیشه‌ای (مثال: نوار بالا) */
.header.glass{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header {
    background: rgba(46,125,50,0.06); /* subtle green tint */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    /* header scrolls with the page (not sticky) */
    position: relative; /* make header the positioned ancestor for the language button */
}
body {
    background: linear-gradient(180deg, var(--muted-bg-1), var(--muted-bg-2));
    color: #133618;
}
/* تقویت وزن و وضوح برای عنوان‌ها */
h1, h2, h3, .logo h1 {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* مطمئن شدن از واکنش‌گرایی تصویر لوگو */
.logo img {
    display: block;
    width: 100%;    /* image fills the glass box */
    height: auto;
}
header .logo {
    background: rgba(255, 255, 255, 0.15); /* نیمه شفاف */
    backdrop-filter: blur(10px) saturate(1.8);
    -webkit-backdrop-filter: blur(10px) saturate(1.8);
    border-radius: 12px; /* گوشه‌های گرد */
    padding: 8px 12px;   /* فاصله داخلی */
    display: inline-block;
}

@media (max-width: 480px) {
    .logo {
        width: 60%; /* logo takes more space on very small screens */
        min-width: 140px;
    }
    .logo img {
        width: 100%;
    }
    .language-dropdown { right: 8px; }
    .product-card {
        width: 90%;
        height: auto; /* let cards expand naturally on small screens */
    }
    .product-card img { height: 180px; }
}
