/* Community Kashrut NSW - Main Stylesheet */

/* ===== DESIGN TOKENS ===== */
:root {
  --color-pine: #3D8B7F;
  --color-gold: #D9A441;
  --color-cream: #FAF6EF;
  --color-charcoal: #2B2924;
  --color-gray-light: #9D9A94;
  --color-gray-medium: #6B6762;
  
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-cream);
  line-height: 1.6;
}

a {
  color: var(--color-pine);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-pine);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-charcoal);
  font-size: 1rem;
}

strong {
  font-weight: 600;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* ===== HEADER & NAV ===== */
header {
  background: var(--color-pine);
  border-bottom: 2px solid var(--color-gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-cream);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.logo img {
  height: 96px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links li {
  white-space: nowrap;
}

.nav-links a {
  color: var(--color-cream);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
  background: var(--color-charcoal);
  color: var(--color-cream);
  padding: var(--spacing-xxl) var(--spacing-lg);
  margin-top: var(--spacing-xxl);
}

footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  padding: var(--spacing-lg);
}

footer h3 {
  color: var(--color-gold);
  margin-bottom: var(--spacing-md);
  margin-top: 0;
}

footer a {
  color: var(--color-cream);
}

footer a:hover {
  color: var(--color-gold);
}

footer p {
  color: var(--color-cream);
  font-size: 0.9rem;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-cream);
}

.footer-bottom a {
  color: var(--color-gold);
  text-decoration: underline;
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--color-cream);
}

/* ===== HERO SECTION ===== */
.hero {
  color: var(--color-cream);
  padding: var(--spacing-xxl) var(--spacing-lg);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  aspect-ratio: 21 / 9;
  width: 100%;
  max-height: 33.33vh;
}

/* Dark overlay for text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Hero variants with different backgrounds */
.hero-home {
  background-image: url('images/seven-species.png');
}

.hero-about {
  background-image: url('images/hero-sydney-map.jpg');
}

.hero-governance {
  background-image: url('images/hero-governance.jpg');
}

.hero-certified {
  background-image: url('images/hero-certificate.jpg');
}

.hero-mashgiach {
  background-image: url('images/hero-mashgiach.jpg');
}

.hero-contact {
  background-image: url('images/hero-communication.jpg');
}

.hero-constitution {
  background-image: url('images/hero-constitution.jpg');
}

.hero-licensees {
  background-image: url('images/hero-licensees.jpg');
}

/* Simple hero for pages without custom backgrounds */
.hero-simple {
  background: linear-gradient(135deg, var(--color-pine) 0%, #2d9e92 100%);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--color-cream);
  font-size: 3rem;
  margin-bottom: var(--spacing-lg);
}

.hero p {
  color: rgba(250, 246, 239, 0.95);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-xl);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-charcoal);
}

.btn-primary:hover {
  background: #c99230;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--color-cream);
  border: 2px solid var(--color-gold);
}

.btn-secondary:hover {
  background: var(--color-gold);
  color: var(--color-charcoal);
  text-decoration: none;
}

.btn-dark {
  background: var(--color-pine);
  color: var(--color-cream);
}

.btn-dark:hover {
  background: #1a3d35;
  text-decoration: none;
}

/* ===== QUICK LINKS / CARD GRID ===== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xxl) 0;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 2px 8px rgba(31, 77, 69, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(31, 77, 69, 0.15);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--color-pine);
  margin-top: 0;
}

.card a {
  display: inline-block;
  margin-top: var(--spacing-md);
  color: var(--color-gold);
  font-weight: 500;
}

/* ===== SECTION STYLES ===== */
.section {
  padding: var(--spacing-xxl) var(--spacing-lg);
}

.section-light {
  background: white;
}

.section-dark {
  background: var(--color-pine);
  color: var(--color-cream);
}

.section-dark h1,
.section-dark h2 {
  color: var(--color-gold);
}

.section-dark h3 {
  color: var(--color-gold);
}

.section-dark p {
  color: var(--color-cream);
}

.section-dark a {
  color: var(--color-gold);
}

/* ===== MODAL / POPUP ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-cream);
  padding: var(--spacing-xxl);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.4s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-charcoal);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-gold);
  color: var(--color-cream);
}

.modal-header {
  margin-bottom: var(--spacing-lg);
  padding-right: 40px;
}

.modal-header h2 {
  color: var(--color-pine);
  margin: 0 0 var(--spacing-sm) 0;
  font-size: 1.8rem;
}

.modal-category {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-body {
  color: var(--color-charcoal);
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
}

.modal-footer {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid #e5e0d5;
}

.modal-footer p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}
.licensee-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e8e4db 0%, #d9d4cb 100%);
}

.placeholder-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e4db 0%, #d9d4cb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-weight: 600;
  font-size: 1.1rem;
}
.licensee-filters {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xxl);
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--color-pine);
  background: transparent;
  color: var(--color-pine);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-pine);
  color: var(--color-cream);
}

.licensee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xxl);
}

.licensee-tile {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31, 77, 69, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.licensee-tile:hover {
  box-shadow: 0 4px 16px rgba(31, 77, 69, 0.2);
  transform: translateY(-4px);
}

.licensee-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #e8e4db 0%, #d9d4cb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.licensee-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.licensee-info {
  padding: var(--spacing-md);
}

.licensee-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-pine);
  margin-bottom: var(--spacing-xs);
}

.licensee-category {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-charcoal);
  padding: 0.25rem var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.licensee-desc {
  font-size: 0.9rem;
  color: var(--color-gray-medium);
  line-height: 1.5;
}

/* ===== FORM STYLES ===== */
form {
  max-width: 600px;
  margin: var(--spacing-xl) auto;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--color-charcoal);
}

input, textarea, select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-pine);
  box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  background: var(--color-pine);
  color: var(--color-cream);
  padding: var(--spacing-sm) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.form-submit:hover {
  background: #1a3d35;
}

/* Hidden honeypot field */
.honeypot {
  display: none;
}

/* ===== FAQ STYLES ===== */
.faq-item {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid #eee;
  padding-bottom: var(--spacing-lg);
}

.faq-question {
  font-weight: 600;
  color: var(--color-pine);
  cursor: pointer;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.faq-question::before {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
}

.faq-answer {
  color: var(--color-gray-medium);
  line-height: 1.7;
}

/* ===== GOVERNANCE INFO ===== */
.governance-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid var(--color-gold);
}

.governance-section h3 {
  color: var(--color-pine);
  margin-top: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .hero {
    aspect-ratio: 16 / 9;
    max-height: 50vh;
  }

  nav.header-nav {
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .nav-links {
    gap: var(--spacing-sm);
    font-size: 0.85rem;
    justify-content: center;
  }

  .logo {
    gap: var(--spacing-sm);
  }

  .logo img {
    height: 64px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  footer .container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

  .quick-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
