/* ============================================
   Tacos Jerry -- Design System & Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-primary: #8B2500;
  --color-primary-dark: #5C1A00;
  --color-primary-light: #A83200;
  --color-accent: #D4A03C;
  --color-accent-light: #E8C068;
  --color-bg: #FAF6F0;
  --color-bg-alt: #F0E8DA;
  --color-bg-dark: #2C1810;
  --color-text: #3A2A1A;
  --color-text-light: #FAF6F0;
  --color-text-muted: #7A6A5A;
  --color-border: #E5D5C5;
  --color-whatsapp: #25D366;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-light);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --- Base Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  padding: 5rem 0;
  background-color: var(--color-bg-alt);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: var(--color-bg-dark);
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-text-light);
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-light);
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* --- Page Header (interior pages) --- */
.page-header {
  position: relative;
  width: 100%;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header .hero-overlay {
  background: rgba(44, 24, 16, 0.65);
}

.page-header .hero-content {
  padding: 2rem 1.5rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--color-text-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-header p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  opacity: 0.9;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-text-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #fff;
  border-color: var(--color-whatsapp);
}

.btn-whatsapp:hover {
  background-color: #1da851;
  border-color: #1da851;
  color: #fff;
}

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

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

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* --- Menu Items --- */
.menu-section {
  margin-bottom: 3rem;
}

.menu-section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  position: relative;
}

.menu-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-info {
  flex: 1;
  padding-right: 1.5rem;
}

.menu-item-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.menu-item-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.menu-item-price {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.1rem;
  white-space: nowrap;
  font-family: var(--font-heading);
}

/* --- FAQ (details/summary) --- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] summary {
  color: var(--color-primary);
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-item p {
  padding: 0 0 1.25rem 0;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
  z-index: 1;
}

.timeline-year {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.1rem;
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}

.timeline-text {
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Hours Table --- */
.hours-table {
  width: 100%;
  max-width: 500px;
}

.hours-table tr {
  border-bottom: 1px solid var(--color-border);
}

.hours-table tr:nth-child(even) {
  background-color: var(--color-bg-alt);
}

.hours-table td {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.hours-table td:last-child {
  text-align: right;
  color: var(--color-text-muted);
}

/* --- Footer --- */
.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 4rem 0 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-logo {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.footer-desc {
  color: rgba(250, 246, 240, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer h3 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.footer a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  font-size: 0.95rem;
  opacity: 0.85;
}

.footer-nav a:hover {
  opacity: 1;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.footer-contact span {
  opacity: 0.85;
  line-height: 1.5;
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem;
  border-top: 1px solid rgba(250, 246, 240, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(250, 246, 240, 0.5);
}

.footer-bottom a {
  color: rgba(250, 246, 240, 0.5);
}

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

/* --- Floating WhatsApp --- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  background-color: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
}

/* --- Social Links --- */
.social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.1);
  color: var(--color-text-light);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}

.social-links a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Utility Classes --- */
.text-center {
  text-align: center;
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--color-text-muted);
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

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

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Tablet: max-width 768px */
@media (max-width: 768px) {
  /* Navigation */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

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

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(250, 246, 240, 0.08);
    width: 100%;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: 55vh;
  }

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

  .hero p {
    font-size: 1.1rem;
  }

  /* Page Header */
  .page-header {
    min-height: 30vh;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  /* Typography */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  /* Section spacing */
  .section,
  .section-alt {
    padding: 3.5rem 0;
  }

  /* Cards */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Footer */
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 2rem;
  }

  .timeline-item {
    padding-left: 0.75rem;
  }

  .timeline-item::before {
    left: -2rem;
  }
}

/* Mobile: max-width 480px */
@media (max-width: 480px) {
  /* Hero */
  .hero {
    min-height: 50vh;
  }

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

  .hero p {
    font-size: 1rem;
  }

  /* Page Header */
  .page-header h1 {
    font-size: 1.65rem;
  }

  /* Typography */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Section spacing */
  .section,
  .section-alt {
    padding: 2.5rem 0;
  }

  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Buttons */
  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Menu items */
  .menu-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .menu-item-info {
    padding-right: 0;
  }

  .menu-item-price {
    align-self: flex-start;
  }

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* WhatsApp float */
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}
