/* ============================================
   CASA NOBLE WEBSITE - MAIN STYLESHEET
   Brand Bible Colors | Mobile-First | Fast-Loading
   ============================================ */

/* === ROOT VARIABLES (Brand Bible Colors) === */
:root {
  /* Primary Brand Colors */
  --golden-orange: #F5A623;
  --coral-red: #E95241;
  --electric-blue: #4A90E2;
  
  /* Supporting Colors */
  --cream: #FFF8E7;
  --warm-white: #FFFBF5;
  --deep-navy: #2C3E50;
  --charcoal: #3A3A3A;
  
  /* Semantic Colors */
  --text-primary: var(--deep-navy);
  --text-secondary: var(--charcoal);
  --bg-primary: var(--warm-white);
  --bg-secondary: var(--cream);
  --accent-primary: var(--coral-red);
  --accent-secondary: var(--golden-orange);
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
}

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

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* === HEADER & NAVIGATION === */
.site-header {
  background: linear-gradient(135deg, #f5a623 0%, #e95241 50%, #e95241 100%);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-bottom: 3px solid rgba(255,255,255,0.2);
}

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

.site-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  letter-spacing: 0.5px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-sm);
}

.main-nav a {
  color: white;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

/* === HERO SECTION === */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-md);
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  color: white;
  text-shadow: 4px 4px 12px rgba(0,0,0,0.6);
  margin-bottom: var(--space-md);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.375rem;
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
  margin-bottom: var(--space-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.6;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: none;
  text-decoration: none;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #e95241 0%, #d4422f 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(233, 82, 65, 0.4);
  border: 2px solid rgba(255,255,255,0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d4422f 0%, #c23820 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233, 82, 65, 0.5);
}

.btn-secondary {
  background: white;
  color: var(--coral-red);
  border: 3px solid var(--coral-red);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary:hover {
  background: var(--coral-red);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233, 82, 65, 0.4);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* === SECTIONS === */
.section {
  padding: var(--space-xxl) var(--space-md);
  min-height: 400px;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #fff 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
}

.section-header h2 {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  font-size: 2.75rem;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--golden-orange), var(--coral-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--golden-orange), var(--coral-red));
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

.section-header p {
  max-width: 700px;
  margin: var(--space-md) auto 0;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === GRID LAYOUTS === */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

/* === CARDS === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--golden-orange), var(--coral-red));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  border-color: rgba(245, 166, 35, 0.3);
}

.card-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.375rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-weight: 700;
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 20px;
  background: var(--electric-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-specialty {
  background: linear-gradient(135deg, #e95241, #d4422f);
  box-shadow: 0 2px 8px rgba(233, 82, 65, 0.4);
}

.badge-veg {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.badge-spicy {
  background: #FF5722;
}

/* === MENU STYLES === */
.menu-category {
  margin-bottom: var(--space-xl);
}

.menu-category h3 {
  color: var(--accent-secondary);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-primary);
  margin-bottom: var(--space-md);
}

.menu-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.menu-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.menu-item-price {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.125rem;
}

.menu-item-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.menu-item-notes {
  margin-top: var(--space-xs);
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* === INFO BOXES === */
.info-box {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-left: 5px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.info-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-left-width: 6px;
}

.info-box h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--golden-orange), var(--coral-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === CONTACT/HOURS === */
.contact-info {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

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

.hours-table td {
  padding: var(--space-sm);
  border-bottom: 1px solid #e0e0e0;
}

.hours-table .day {
  font-weight: 600;
  color: var(--text-primary);
}

.hours-table .time {
  color: var(--text-secondary);
  text-align: right;
}

.hours-table .closed {
  color: var(--coral-red);
  font-weight: 600;
}

/* === FOOTER === */
.site-footer {
  background: var(--deep-navy);
  color: white;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-lg);
}

.footer-section h4 {
  color: var(--accent-secondary);
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9375rem;
}

.footer-section a:hover {
  color: white;
}

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

/* Social Links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.8);
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.social-link:hover {
  color: var(--golden-orange);
  background: rgba(245, 166, 35, 0.1);
  transform: translateX(4px);
}

.social-link svg {
  flex-shrink: 0;
}

.social-link span {
  font-size: 0.9375rem;
}

/* Review Button */
.review-button {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #f5a623, #e95241);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
  margin-top: 12px;
}

.review-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.4);
  color: white;
}

/* TMG Footer Branding */
.tmg-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-md);
  font-size: 0.875rem;
  opacity: 0.8;
}

.tmg-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 8px;
  position: relative;
}

.tmg-footer-link:hover {
  background: rgba(245, 166, 35, 0.1);
  transform: translateY(-2px);
}

.tmg-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  filter: brightness(0.3);
  position: relative;
}

/* Magical fade-in animation - starts from center glow */
.tmg-footer-link:hover .tmg-icon {
  opacity: 1;
  filter: brightness(1.2);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.6), 0 4px 12px rgba(245, 166, 35, 0.4);
  transform: scale(1.15);
  animation: centerGlow 0.6s ease-out;
}

@keyframes centerGlow {
  0% {
    opacity: 0;
    filter: brightness(0.3);
    box-shadow: 0 0 0 rgba(245, 166, 35, 0);
  }
  30% {
    opacity: 0.3;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.8);
  }
  100% {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(245, 166, 35, 0.6), 0 4px 12px rgba(245, 166, 35, 0.4);
  }
}

.tmg-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  transition: color 0.3s ease;
}

.tmg-name {
  color: var(--golden-orange);
  font-weight: 700;
}

.tmg-llc {
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  font-size: 0.75rem;
}

.tmg-footer-link:hover .tmg-name {
  color: #f5a623;
}

.tmg-footer-link:hover .tmg-llc {
  color: rgba(255,255,255,0.9);
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .tmg-branding {
    flex-direction: column;
    gap: 8px;
  }
}

/* === ADA COMPLIANCE === */

/* Skip to main content link (for keyboard/screen reader users) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--golden-orange);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Enhanced keyboard focus indicators (WCAG 2.1 AA compliant) */
*:focus {
  outline: 3px solid var(--golden-orange);
  outline-offset: 2px;
}

/* Exception for buttons that already have good visual feedback */
button:focus,
.btn:focus,
.add-to-order:focus {
  outline: 3px solid var(--golden-orange);
  outline-offset: 3px;
}

/* Ensure focus is visible on all interactive elements */
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--golden-orange);
  outline-offset: 2px;
}

/* Visible focus for cart button */
.floating-cart-btn:focus {
  outline: 3px solid white;
  outline-offset: 4px;
}

/* Screen reader only text (for context) */
.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;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .add-to-order,
  .review-button {
    border: 2px solid currentColor;
  }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}



/* === RATING DISPLAY === */
.rating-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.stars {
  color: #FFD700;
  font-size: 1.25rem;
}

.rating-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero h1 {
    font-size: 4rem;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
}

/* Mobile-specific (below 768px) */
@media (max-width: 767px) {
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--deep-navy) 0%, #1a252f 100%);
    padding: var(--space-xxl) var(--space-lg);
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    overflow-y: auto;
  }
  
  .main-nav.active {
    right: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-xs);
    list-style: none;
    margin-top: var(--space-xl);
  }
  
  .main-nav li {
    list-style: none;
  }
  
  .main-nav a {
    display: block;
    padding: var(--space-md);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
  }
  
  .main-nav a:hover,
  .main-nav a.active {
    background: rgba(245, 166, 35, 0.15);
    border-color: var(--golden-orange);
    transform: translateX(8px);
  }
  
  /* Overlay backdrop */
  .main-nav.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: -1;
  }
  
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-group .btn {
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden {
  display: none;
}

/* === PRINT STYLES === */
@media print {
  .site-header,
  .site-footer,
  .btn {
    display: none;
  }
}
