/* =========================================
   Pizzeria Juancito Premium Minimalist Theme
   ========================================= */

:root {
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Playfair Display', serif;

  /* Color Palette */
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-card: #151515;
  --text-light: #fefefe;
  --text-muted: #a0a0a0;
  --accent-primary: #E63946;
  /* Tomato Red */
  --accent-hover: #D62828;
  --accent-gold: #cfaa63;
  /* Premium Gold/Wood */
  --border-color: rgba(255, 255, 255, 0.05);

  /* Utilities */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --glass-bg: rgba(10, 10, 10, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================
   Typography & Reusables
   ========================================= */
h1,
h2,
h3,
h4,
.logo {
  font-family: var(--font-secondary);
  font-weight: 700;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
}

.separator-line {
  height: 3px;
  width: 60px;
  background-color: var(--accent-primary);
  margin: 1rem 0 2rem;
}

.separator-line.center {
  margin: 1rem auto 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--text-light);
  color: var(--text-light);
}

.btn-outline:hover {
  background-color: var(--text-light);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

.btn-whatsapp:hover {
  background-color: #25D366;
  border-color: #25D366;
  color: white;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* =========================================
   Navbar
   ========================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition);
}

#navbar.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
  max-width: 100%;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links li a {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  position: relative;
  transition: var(--transition);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-primary);
  transition: var(--transition);
}

.nav-links li a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--text-light);
  transition: var(--transition);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('assets/img/hero-1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(10, 10, 10, 0.4) 0%,
      rgba(10, 10, 10, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.3s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .subtitle {
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.hero .title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero .description {
  font-size: 1.25rem;
  color: #ddd;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* =========================================
   Nosotros Section
   ========================================= */
.about-section {
  padding: 6rem 0;
  background-color: var(--bg-darker);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-card {
  background-color: var(--bg-card);
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-gold);
}

.stat-card h3 {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-card p {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* =========================================
   Especialidades Section
   ========================================= */
.specialties-section {
  padding: 6rem 0;
  background-color: var(--bg-dark);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(230, 57, 70, 0.3);
}

.card-img {
  height: 250px;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 2.5rem 2rem;
  text-align: center;
}

.card-content h3 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.card-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================
   Menu PDF Viewer Section
   ========================================= */
.menu-section {
  padding: 6rem 0;
  background-color: var(--bg-darker);
}

.pdf-container {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  position: relative;
}

.pdf-inline-viewer {
  width: min(100%, 980px);
  height: min(82vh, 860px);
  min-height: 620px;
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.pdf-inline-viewer iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background-color: #fff;
}

.pdf-viewer-note {
  max-width: 720px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: -0.75rem auto 0;
  text-align: center;
}

.pdf-mobile-fallback {
  text-align: center;
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.pdf-mobile-fallback p {
  color: var(--text-muted);
}

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Hide fallback on larger screens by default, but show logic in media query */
/* Actually, let's keep the fallback button visible always, as it's a good UX to offer download */
.pdf-mobile-fallback {
  display: flex;
  /* Keep it visible for easy download */
}

/* =========================================
   Servicios Section
   ========================================= */
.services-section {
  padding: 6rem 0;
  background-color: var(--bg-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service-card {
  background-color: var(--bg-card);
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-gold);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(207, 170, 99, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background-color: var(--accent-gold);
  color: var(--bg-dark);
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--text-light);
  font-family: var(--font-primary);
  letter-spacing: 1px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* =========================================
   Delivery CTA Section
   ========================================= */
.delivery-cta {
  padding: 6rem 0;
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-card);
  padding: 2rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  min-width: 300px;
  text-align: left;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-gold);
}

.contact-card.whatsapp-card:hover {
  border-color: #25D366;
}

.contact-icon {
  color: var(--accent-gold);
}

.whatsapp-card .contact-icon {
  color: #25D366;
}

.contact-info span {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-info strong {
  font-size: 1.8rem;
  color: var(--text-light);
  font-family: var(--font-secondary);
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 980px;
  margin: 3rem auto 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--border-color);
  text-align: left;
}

.quick-info-item {
  background-color: var(--bg-card);
  padding: 1.5rem;
}

.quick-info-item span {
  display: block;
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.quick-info-item strong {
  display: block;
  color: var(--text-light);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.35;
}

@media screen and (max-width: 768px) {
  .contact-card {
    width: 100%;
    min-width: unset;
    padding: 1.5rem 2rem;
  }
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: #000;
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-map {
  margin-bottom: 3rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer h3 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.footer-contact li {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.footer-contact strong {
  color: var(--text-light);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================
   Animation Classes (Triggered by JS)
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media screen and (max-width: 992px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-text {
    text-align: center;
  }

  .separator-line {
    margin: 1rem auto 2rem;
  }

  .cards-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .hero .title {
    font-size: 3rem;
  }

  .cards-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .menu-section {
    padding: 5rem 0;
  }

  .pdf-container {
    margin-top: 2.5rem;
  }

  .pdf-inline-viewer {
    width: 100%;
    height: 52vh;
    min-height: 340px;
    max-height: 440px;
  }

  .pdf-mobile-fallback {
    padding: 1.5rem;
  }

  .pdf-actions {
    width: 100%;
    flex-direction: column;
  }

  .pdf-actions .btn {
    width: 100%;
  }

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

  .footer {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* Mobile Menu */
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.75rem);
    flex-direction: column;
    gap: 0;
    background-color: rgba(5, 5, 5, 0.96);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    opacity: 0;
    padding: 0.75rem;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    width: auto;
    z-index: 1001;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links li {
    margin: 0;
    width: 100%;
  }

  .nav-links li a {
    display: block;
    border-radius: 6px;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    text-align: center;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Adjust PDF Viewer for Mobile */
  .iframe-wrapper {
    height: 500px;
  }
}

@media screen and (max-width: 480px) {
  .hero .title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  /* On very small screens, maybe hide iframe if it struggles, but let's keep it and rely on fallback */
  .iframe-wrapper {
    height: 400px;
  }
}
