/* 
 * Custom CSS for DECA Interactive Menu
 * Main styles and enhancements
 */

/* CSS Variables */
:root {
  --deca-blue: #00263e;
  --deca-beige: #e7ceb5;
  --deca-white: #ffffff;
  font-size: 16px;
}

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--deca-blue);
  color: var(--deca-beige);
  min-height: 100vh;
  padding-bottom: 100px;
}

/* Navbar Styles */
.navbar {
  background-color: rgba(0, 38, 62, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand img {
  max-height: 50px;
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.btn-back {
  background-color: var(--deca-beige);
  color: var(--deca-blue);
  border: none;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background-color: var(--deca-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 206, 181, 0.3);
}

/* Main Category Filters */
.main-category-filters {
  padding: 1.5rem 0;
  margin-bottom: 1rem;
}

.main-filter-btn {
  background-color: var(--deca-beige);
  color: var(--deca-blue);
  border: none;
  padding: 1rem 2.5rem;
  margin: 0.5rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.main-filter-btn i {
  font-size: 1.3rem;
}

.main-filter-btn:hover {
  background-color: var(--deca-white);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(231, 206, 181, 0.6);
}

.main-filter-btn.active {
  background-color: var(--deca-white);
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(231, 206, 181, 0.7);
}

/* Sub Category Filters */
.category-filters {
  background-color: rgba(231, 206, 181, 0.1);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  backdrop-filter: blur(5px);
  min-height: 80px;
}

.subcategory-group {
  display: inline-block;
}

.filter-btn {
  background-color: transparent;
  color: var(--deca-beige);
  border: 2px solid var(--deca-beige);
  padding: 0.6rem 1.5rem;
  margin: 0.3rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--deca-beige);
  color: var(--deca-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 206, 181, 0.4);
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: 2rem;
}

.search-box input {
  background-color: rgba(231, 206, 181, 0.1);
  border: 2px solid var(--deca-beige);
  color: var(--deca-beige);
  padding: 0.8rem 1.2rem 0.8rem 3rem;
  border-radius: 30px;
  width: 100%;
  transition: all 0.3s ease;
}

.search-box input::placeholder {
  color: rgba(231, 206, 181, 0.6);
}

.search-box input:focus {
  outline: none;
  background-color: rgba(231, 206, 181, 0.15);
  box-shadow: 0 0 0 3px rgba(231, 206, 181, 0.2);
}

.search-box i {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--deca-beige);
  opacity: 0.7;
}

/* Menu Items */
.menu-item {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(231, 206, 181, 0.15);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(231, 206, 181, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.menu-item.hidden {
  display: none;
}

/* Image Area */
.item-image-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.menu-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.menu-item:hover .menu-item-image {
  transform: scale(1.1);
}

.header-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.category-badge {
  background: rgba(0, 38, 62, 0.85);
  color: var(--deca-beige);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(231, 206, 181, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.item-price-badge {
  background: rgba(231, 206, 181, 0.95);
  color: var(--deca-blue);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 1.5rem;
  /* Even larger and clearer */
  font-weight: 800;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.item-header-no-img {
  padding: 1rem 1.2rem 0.3rem;
  /* Reduced padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.item-price-top {
  color: var(--deca-white);
  font-size: 1.8rem;
  /* Final size boost */
  font-weight: 800;
  margin-left: auto;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.category-badge-simple {
  color: var(--deca-beige);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.6;
  border-bottom: 1.5px solid rgba(231, 206, 181, 0.3);
  padding-bottom: 2px;
}

.special-badge-inline {
  background: linear-gradient(135deg, var(--deca-beige), #fff);
  color: var(--deca-blue);
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(231, 206, 181, 0.2);
  z-index: 2;
}

.item-image-container .special-badge-inline {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Content Area */
.item-content {
  padding: 0.8rem 1.2rem 0.2rem;
  /* Ridotto padding superiore e inferiore */
  flex: 1;
  /* Permette alla card di allungarsi per pareggiare la vicina */
  display: flex;
  flex-direction: column;
}

.item-name {
  color: var(--deca-beige);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  /* Margine ridotto */
  letter-spacing: -0.02em;
}

.item-description {
  color: rgba(231, 206, 181, 0.7);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  /* Margine ridotto */
  font-weight: 400;
}

/* Old price row removed as priority moved to top header */

/* Tags Section */
.item-tags-section {
  margin-bottom: 1rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.item-tag {
  background: rgba(231, 206, 181, 0.08);
  border: 1px solid rgba(231, 206, 181, 0.2);
  color: #e7ceb5;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.item-tag i {
  font-size: 0.7rem;
  opacity: 0.7;
}

.item-tag:hover {
  background: rgba(231, 206, 181, 0.15);
  border-color: rgba(231, 206, 181, 0.5);
  transform: translateY(-2px);
  color: #fff;
}

/* Allergens Section */
.item-allergens-section {
  background: rgba(0, 0, 0, 0.25);
  margin: 0 -1.2rem -0.5rem -1.2rem;
  /* Reduced negative margin to show padding */
  padding: 0.8rem 1.2rem 1.5rem;
  /* Increased bottom padding significantly */
  border-top: 1px solid rgba(231, 206, 181, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
}

.item-allergens-section.is-empty {
  display: none;
}

.allergen-label {
  color: #dcbab1;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  margin-bottom: 2px;
}

.allergen-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.allergen-pill {
  background: rgba(220, 186, 177, 0.1);
  color: #ebdcd8;
  border: 1px solid rgba(220, 186, 177, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.allergen-pill-placeholder {
  display: none;
}

.allergen-pill:hover {
  background: rgba(220, 186, 177, 0.15);
  border-color: rgba(220, 186, 177, 0.4);
}

/* Section Title */
.section-title {
  color: var(--deca-beige);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem;
  color: rgba(231, 206, 181, 0.6);
  font-size: 1.2rem;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 38, 62, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.social-icons a {
  margin: 0 1rem;
  color: var(--deca-beige);
  font-size: 1.5rem;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.3s ease;
}

.social-icons a i {
  display: inline-block;
  vertical-align: middle;
}

.social-icons a:hover {
  color: var(--deca-white);
  transform: translateY(-3px);
}

/* Loading Animation */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--deca-beige);
}

.loading i {
  font-size: 3rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }

  .main-filter-btn {
    padding: 1.2rem 2rem;
    font-size: 1.4rem;
    min-width: 180px;
  }

  .main-filter-btn i {
    font-size: 1.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .item-name {
    font-size: 1.1rem;
  }

  .item-price {
    font-size: 1.2rem;
  }

  /* Reset allergens to single row on mobile */
  .item-allergens-section {
    flex-direction: row;
    align-items: center;
    min-height: auto;
    padding: 0.6rem 1.5rem;
    gap: 0.8rem;
  }

  .allergen-label {
    margin-top: 0;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #00263e;
}

::-webkit-scrollbar-thumb {
  background: #e7ceb5;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
}

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Menu item hover effects */


/* Allergen icons */
.allergen-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 0 0.2rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.allergen-icon:hover {
  opacity: 1;
}

/* Print styles */
@media print {
  body {
    background-color: white;
    color: black;
  }

  .navbar,
  footer,
  .search-box,
  .category-filters,
  .btn-back {
    display: none !important;
  }

  .menu-item {
    page-break-inside: avoid;
    border: 1px solid #ccc;
  }
}

/* Accessibility improvements */
.filter-btn:focus,
.btn-back:focus,
.search-box input:focus {
  outline: 3px solid rgba(231, 206, 181, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .menu-item {
    border-width: 2px;
  }

  .filter-btn {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Additional utility classes */
.text-beige {
  color: #e7ceb5;
}

.bg-deca-blue {
  background-color: #00263e;
}

.bg-deca-beige {
  background-color: #e7ceb5;
}

.border-beige {
  border-color: #e7ceb5 !important;
}

/* Pulse animation for new items */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 206, 181, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(231, 206, 181, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(231, 206, 181, 0);
  }
}

.menu-item.new-item {
  animation: pulse 2s infinite;
}

/* Badge for special items */
.special-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #e7ceb5;
  color: #00263e;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Grid view option (alternative layout) */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Tablet screens: 2 per row */
@media (min-width: 600px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop screens: Exactly 3 per row */
@media (min-width: 992px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive typography adjustments */
@media (max-width: 576px) {
  :root {
    font-size: 14px;
  }
}

@media (min-width: 1200px) {
  :root {
    font-size: 18px;
  }

  /* Ingrandisci i pulsanti Food/Drink su schermi grandi */
  .main-filter-btn {
    padding: 1.5rem 4rem;
    font-size: 1.6rem;
    min-width: 280px;
  }

  .main-filter-btn i {
    font-size: 1.8rem;
  }
}