/* ========================================
   STARBUCKS VIETNAM - OPTIMIZED VERSION
   Lightweight, Fast, Stable
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  /* Colors */
  --color-primary: #00704A;
  --color-primary-dark: #1E3932;
  --color-primary-light: #D4E9E2;
  --color-accent: #00A862;
  --color-dark: #1E293B;
  --color-gray: #64748B;
  --color-light: #F8FAFC;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition: all 0.2s ease;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* Dark mode */
[data-theme="dark"] {
  --color-dark: #F8FAFC;
  --color-light: #1E293B;
  --bg-card: #334155;
}

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  background: var(--color-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

/* ========== NAVBAR ========== */
#mainNavbar {
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.navbar-brand .logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.navbar-brand:hover .logo-circle {
  transform: scale(1.05);
}

.nav-link {
  color: var(--color-dark);
  font-weight: 500;
  font-size: 14px;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* ========== BUTTONS ========== */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-light {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-light:hover {
  background: var(--color-primary);
  color: white;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 112, 74, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-icon:hover {
  background: var(--color-primary);
  color: white;
}

/* ========== HERO SECTION ========== */
.hero-card {
  height: 80vh;
  min-height: 500px;
  max-height: 700px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 57, 50, 0.9) 0%,
    rgba(0, 112, 74, 0.7) 50%,
    rgba(0, 168, 98, 0.4) 100%
  );
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  padding: 2rem;
  max-width: 600px;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.accent-italic {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--color-primary-light);
}

/* ========== CARDS ========== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  background: white;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-top {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
}

/* Favorite Cards */
.favorite-card {
  position: relative;
  height: 100%;
}

.favorite-img-wrapper {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.favorite-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.favorite-card:hover .favorite-img-wrapper img {
  transform: scale(1.05);
}

.favorite-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

/* Glass Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

/* ========== SECTIONS ========== */
.bg-starbucks {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  position: relative;
  overflow: hidden;
}

section {
  padding: 4rem 0;
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

/* ========== FOOTER ========== */
.footer-starbucks {
  background: var(--color-primary-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* ========== MENU PAGE ========== */
.menu-filter-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 50px;
  border: 2px solid var(--color-primary);
  background: white;
  color: var(--color-primary);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  font-size: 15px;
}

.menu-filter-btn:hover,
.menu-filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.menu-item-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.menu-item-card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

/* ========== MEDIA PAGE ========== */
.media-item {
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.media-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.media-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
}

/* Modal */
.modal-fullscreen-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-fullscreen-custom.show {
  display: flex;
}

.modal-fullscreen-custom img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

/* ========== CONTACT PAGE ========== */
.contact-form .form-control {
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.contact-form .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 112, 74, 0.1);
  outline: none;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: none;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  position: fixed;
  top: 90px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 999;
  border: none;
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ========== LOADING SCREEN (Simple) ========== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-size: 64px;
  margin-bottom: 1rem;
}

.loading-text {
  color: white;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* Simple spinner */
.spinner {
  width: 40px;
  height: 40px;
  margin-top: 1rem;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-card {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .card-img-top {
    height: 200px;
  }
  
  .favorite-img-wrapper {
    height: 250px;
  }
  
  .theme-toggle,
  .back-to-top {
    width: 45px;
    height: 45px;
  }
  
  .theme-toggle {
    top: 75px;
    right: 15px;
  }
  
  .back-to-top {
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 576px) {
  .hero-card {
    height: 50vh;
    min-height: 350px;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 14px;
  }
}

/* ========== UTILITIES ========== */
.text-light-50 {
  color: rgba(255, 255, 255, 0.7);
}

.cursor-pointer {
  cursor: pointer;
}

.object-cover {
  object-fit: cover;
  object-position: center;
}

/* Image aspect ratio utilities */
.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.img-fluid-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Performance optimization */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
}

[data-theme="dark"] .menu-item-card .bg-white {
  color: #111 !important;
}

[data-theme="dark"] #mainNavbar .nav-link,
body.dark #mainNavbar .nav-link{
  color: #fff !important;
}
[data-theme="dark"] #mainNavbar .navbar-brand,
body.dark #mainNavbar .navbar-brand{
  color: #fff !important;
}
