/*
 * STYLE.CSS
 * David & Sivan's Wedding Website
 */

:root {
  /* Color Palette - inspired by the floral invitation */
  --bg: #fffafc; /* Very light, soft pink background */
  --card: #ffffff;
  --accent: #d6808e; /* Dusty rose from flowers */
  --accent-dark: #b05f6d; /* Darker accent for hover */
  --muted: #6b7280;
  --text: #3a2e2e; /* Soft dark brown/black */
  --watercolor-pink: rgba(224, 194, 201, 0.4);
  --watercolor-blue: rgba(194, 216, 224, 0.4);
  
  /* Fonts - inspired by the invitation */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-script: "Great Vibes", cursive;

  --max-width: 1100px;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
  text-align: center; /* --- All text centered as requested --- */
}

/* * Top Navigation (Fixed & Hides on Scroll Down)
 */
.nav-wrap {
  height: 64px; /* Spacer for the fixed nav */
}

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  transform: translateY(0);
  transition: transform 300ms ease;
  z-index: 40;
}

/* This class is added by js.js to hide the nav on scroll down */
.topnav.hidden {
  transform: translateY(-110%);
}

.brand {
  text-align: left; /* Keep brand text left-aligned */
}

.brand .names {
  font-weight: 700;
  font-size: 1.15rem;
  font-family: var(--font-serif);
}

.subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

select#langSelect {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: white;
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

.btn {
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn.primary {
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
}

/* Page Layout */
main {
  max-width: var(--max-width);
  margin: 2rem auto 48px; /* Adjusted margin for hero */
  padding: 0 1rem 4rem;
}

/* * New CSS-Only Hero Section with Background Image
 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  text-align: center;
  padding: 4rem 1rem;
  margin-bottom: 2rem;
  overflow: hidden;

  /* Add your background image here */
  background-image: url('wedding_background.jpg'); /* Make sure the image is in the same directory or adjust path */
  background-size: cover; /* Cover the entire area */
  background-position: center bottom; /* Adjust as needed to show relevant parts */
  background-repeat: no-repeat;
  /* background-attachment: fixed; Removed this, as it caused issues */
  border-radius: 12px; /* Soften edges slightly */
  box-shadow: 0 6px 18px rgba(12, 18, 22, 0.04); /* Optional: add a subtle shadow */
}

/* Overlay to gently hide the image and improve text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 240, 245, 0.8); /* Soft pink/peach overlay, adjust opacity as needed */
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1; /* Sits on top of the overlay */
  animation: fadeInHero 1.5s 0.3s ease-out backwards;
  color: var(--text); /* Ensure text color has good contrast */
}

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

.hero-names {
  font-family: var(--font-script);
  font-size: 5.5rem;
  font-weight: 400;
  color: var(--accent-dark); /* Keep accent color for names */
  margin: 0;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for readability */
}

.hero-date, .hero-location {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text); /* Adjust as needed for contrast */
  margin: 0.5rem 0;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow for readability */
}

.hero-location {
  font-size: 1.25rem;
  color: var(--muted); /* Adjust as needed for contrast */
}


/* * Content Cards
 */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 6px 18px rgba(12, 18, 22, 0.04);
}

.card h2, .card h3, .card h4 {
  font-family: var(--font-serif);
  color: var(--accent-dark);
  margin: 0 0 12px;
}

.schedule {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  /* Center list items individually */
  display: inline-block;
  text-align: left;
}

.schedule li {
  padding: 10px 0;
  border-top: 1px dashed #eef2f5;
}

.details-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 16px;
  text-align: left; /* --- FIX: Keep details list left-aligned --- */
  /* Center the block itself */
  max-width: 500px;
  margin: 0 auto;
}

.details-list dt {
  color: var(--muted);
  font-weight: 700;
}

.details-list dd {
  margin: 0;
  padding: 0;
}

/* Lists in general */
ol {
  /* Center the list, but keep text left-aligned */
  display: inline-block;
  text-align: left;
  padding-left: 20px;
}

/* --- A nicer "What We Need" section --- */

.needed-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  text-align: left;
  counter-reset: needed-counter; /* Creates a custom counter */
  
  /* New layout: A 2-column grid on larger screens */
  display: grid;
  grid-template-columns: 1fr; /* 1 column by default */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .needed-list {
    grid-template-columns: 1fr 1fr; /* 2 columns on desktop */
  }
}

.needed-list li {
  position: relative;
  counter-increment: needed-counter; /* Increments the counter */
  
  /* Card-in-a-card style */
  background: rgba(214, 128, 142, 0.05); /* Faint pink bg */
  border: 1px solid rgba(214, 128, 142, 0.1);
  border-radius: 12px;
  
  padding: 1.5rem;
  padding-top: 2.5rem; /* Make space for the number */
  line-height: 1.6;
}

.needed-list li::before {
  content: counter(needed-counter); /* Just the number */
  position: absolute;
  left: 1.5rem;
  top: -1.25rem; /* Hangs off the top of the card */
  
  /* Styled number circle */
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.75rem;
  color: white;
  background: var(--accent);
  
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(176, 95, 109, 0.4);
}

/* RTL (Hebrew) styling */
html[dir="rtl"] .needed-list {
  text-align: right;
}

html[dir="rtl"] .needed-list li {
  padding-left: 1.5rem; /* Reset LTR padding */
  padding-right: 1.5rem; /* Add base RTL padding */
  padding-top: 2.5rem;
}

html[dir="rtl"] .needed-list li::before {
  left: auto;
  right: 1.5rem;
}

/* Final Card */
.final {
  text-align: center;
  background: linear-gradient(145deg, var(--bg), #fef6f8);
}

.final h2 {
  font-size: 1.8rem;
}

.final .btn {
  margin-top: 8px;
}

/* Footer */
.sitefoot {
  text-align: center;
  padding: 26px 0 60px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========== ISRAEL GUIDE STYLES ========== */

#israel-guide {
  text-align: left; /* Override body:center */
}

#israel-guide h2 {
  text-align: center; /* Keep the main card title centered */
}

/* Add spacing and a line between sub-sections */
.guide-subsection {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #eef2f5; /* Match .schedule style */
}

/* Don't put a line above the very first one */
#israel-guide .guide-subsection:first-of-type {
  margin-top: 0.5rem; /* Just a little space from the H2 */
  padding-top: 0;
  border-top: none;
}

#israel-guide h3 {
  margin-bottom: 0.75rem;
}
#israel-guide h4 {
  margin: 1rem 0 0.5rem;
}

/* Style the cities grid */
.cities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cities article {
  background: rgba(214, 128, 142, 0.05); /* Match .needed-list li */
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(214, 128, 142, 0.1);
}
.cities article h4 {
  margin: 0 0 0.25rem;
}

/* Ensure lists inside the card are aligned correctly */
#israel-guide ul,
#israel-guide ol {
  text-align: left;
  display: block; /* Override the inline-block from default 'ol' */
  padding-left: 2.5rem; /* Standard indent */
  margin: 0.5rem 0;
}

#israel-guide li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

/* NEW: Room Prices Table Styling */
.table-container {
  overflow-x: auto; /* Allows horizontal scrolling on small screens */
  -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
  margin-top: 1.5rem;
  border: 1px solid rgba(214, 128, 142, 0.1); /* Subtle border for the container */
  border-radius: 8px;
}

.room-table {
  width: 100%;
  border-collapse: collapse; /* Removes spacing between borders */
  margin: 0; /* Override any default table margins */
  background-color: var(--card); /* Ensures table background is white */
  min-width: 600px; /* Minimum width to prevent excessive squishing */
}

.room-table th,
.room-table td {
  padding: 12px 15px;
  font-size: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eef2f5; /* Light separator lines */
}

.room-table th {
  background-color: rgba(214, 128, 142, 0.1); /* Light pink background for headers */
  color: var(--accent-dark);
  font-weight: 600;
  font-family: var(--font-sans);
  position: sticky; /* Sticky header for better UX on scroll */
  top: 0;
  z-index: 2; /* Ensure header is above scrolling content */
}

.room-table tbody tr:last-child td {
  border-bottom: none; /* No border for the last row */
}

/* Zebra striping for better readability */
.room-table tbody tr:nth-child(odd) {
  background-color: rgba(214, 128, 142, 0.03); /* Very light pink tint for odd rows */
}

/* Highlight hover for rows */
.room-table tbody tr:hover {
  background-color: rgba(214, 128, 142, 0.08);
}


/* ========== END OF NEW STYLES ========== */


/* * RTL Styling for Hebrew
 */
html[dir="rtl"] body {
  font-family: var(--font-sans); 
  /* text-align: center; is inherited from LTR body rule, which is correct */
}

html[dir="rtl"] .topnav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .brand {
  text-align: right; /* Keep brand text right-aligned for RTL */
}

html[dir="rtl"] .nav-actions {
  flex-direction: row-reverse;
  gap: 0.8rem;
}

html[dir="rtl"] .details-list {
  text-align: right; /* --- FIX: Keep details list right-aligned for RTL --- */
}

html[dir="rtl"] .cities {
  text-align: right; /* Keep city card text right-aligned for RTL */
}

html[dir="rtl"] ol {
  text-align: right;
  padding-left: 0;
  padding-right: 20px;
}

html[dir="rtl"] .schedule {
  text-align: right;
}

html[dir="rtl"] .details-list {
  grid-template-columns: 1fr 150px; /* Flipped */
}

html[dir="rtl"] .details-list dt {
  text-align: right; 
}

html[dir="rtl"] ol,
html[dir="rtl"] ul {
  padding-right: 20px;
  padding-left: 0;
}

/* RTL for the new table */
html[dir="rtl"] .room-table th,
html[dir="rtl"] .room-table td {
  text-align: right;
}

/* * Responsive Design
 */

@media (max-width: 720px) {
  .hero-names {
    font-size: 4rem;
  }
  .hero-date {
    font-size: 1.25rem;
  }
  .hero-location {
    font-size: 1.1rem;
  }

  .details-list {
    grid-template-columns: 1fr;
    text-align: left; /* Keep left-align on mobile */
  }
  
  html[dir="rtl"] .details-list {
    text-align: right; /* Keep right-align on mobile for RTL */
  }
  
  html[dir="rtl"] .details-list dt {
    text-align: right; /* Reset for mobile */
  }

  .nav-wrap {
    height: 56px;
  }
  .topnav {
    height: 56px;
    padding: 0 0.7rem;
  }
  .brand .names {
    font-size: 1rem;
  }
  
  main {
    margin-top: 1rem;
  }
  
  .card {
    padding: 1.5rem;
    margin: 1rem 0;
  }
}

/* Subtle accessibility focus */
a:focus, button:focus, select:focus {
  outline: 3px solid rgba(214, 128, 142, 0.3);
  outline-offset: 2px;
  border-radius: 4px;
}