/* =========================================
    CSS Variables (CRITICAL FOR COLORS & LAYOUT)
   ========================================= */
:root {
  --algeria-green:   #006233;
  --algeria-red:     #D21034;
  --italy-green:     #008C45;
  --italy-white:     #F4F5F0;
  --italy-red:       #CD212A;
  --korea-blue:      #0047af;
  --korea-red:       #cd2e3a;

  /* Site Colors adjusted to match your Goal Image */
  --header-bg:       #4a2924; /* Darker brown-red */
  --nav-bg:          #596b7a; /* Solid grey-blue */
  --nav-hover:       #415260;
  --nav-active:      #3b82f6; /* Bright blue for active tab */
  
  --body-bg:         #fdfdfd;
  --card-bg:         #ffffff;
  --recipe-bg:       #f9f9f9;
  --intro-bg:        #ffffff;
  --border:          #dddddd;
  --text:            #333333;
  --text-muted:      #666666;
  --progress-orange: #e67e22;
  --scroll-btn-bg:   #222222;
  --footer-bg:       #222222;

  /* Spacing & Shape */
  --radius:          15px;
  --radius-sm:       10px;
  --radius-pill:     5px;
  --shadow-sm:       0 4px 10px rgba(0,0,0,0.05);
  --shadow-md:       0 10px 20px rgba(0,0,0,0.05);
  --shadow-hover:    0 12px 25px rgba(0,0,0,0.1);
  --transition:      0.3s ease;

  --font-body:       'Helvetica Neue', Arial, sans-serif;
  --font-serif:      'Georgia', serif;
  --font-hangul:     'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

/* =========================================
    General Page Setup
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-body); 
    background-color: var(--body-bg); 
    color: var(--text); 
    line-height: 1.6; 
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; }

header {
  background-color: var(--header-bg);
  color: white;
  text-align: center;
  padding: 30px 0;
}

/* Hidden to match your goal image which only shows the subtext */
header h1 { 
    display: none; 
}

.header-sub {
  font-size: 1.2rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
}

/* =========================================
    SPA Tab Navigation Styles
   ========================================= */
.tabs {
  background: var(--nav-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.tab-link {
  background: transparent;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
  text-decoration: none;
  display: inline-block;
}

.tab-link:hover { background: var(--nav-hover); }
.tab-link.active-tab { background: var(--nav-active); }


/* =========================================
    HOME PAGE SPECIFIC STYLES 
   ========================================= */
.welcome-title {
  font-size: 2.5rem;
  color: var(--text);
  text-align: center;
  margin: 60px 0 10px;
}

.welcome-sub {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 50px;
}

.cuisine-cards-preview {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.preview-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px 25px;
  text-align: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 280px;
  border-top: 5px solid var(--border);
}

.preview-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Preview Card specific borders & text */
.algeria-card { border-top-color: var(--algeria-green); }
.italy-card   { border-top-color: var(--italy-green); }
.korea-card   { border-top-color: var(--korea-blue); }

.algeria-title { color: var(--algeria-green); margin-bottom: 10px; font-size: 1.5rem;}
.italy-title   { color: var(--italy-green); margin-bottom: 10px; font-size: 1.5rem;}
.korea-title   { color: var(--korea-blue); margin-bottom: 10px; font-size: 1.5rem;}

.preview-card p { color: var(--text-muted); font-size: 0.95rem; margin-top: 8px; }

/* =========================================
    Flag Styles
   ========================================= */
.country-section {
  padding: 40px 20px;
  margin: 0 auto;
}

.flag {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.flag svg {
  border: 1px solid #eee;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* =========================================
    Country Intro & Headers
   ========================================= */
.cuisine-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.cuisine-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.cuisine-intro { font-size: 1rem; color: var(--text-muted); }

.country-intro {
  text-align: center;
  font-family: var(--font-serif);
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 20px;
  background: var(--intro-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  color: var(--text);
}

/* =========================================
    VERTICAL DISH LAYOUT
   ========================================= */
.dishes-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  padding: 20px;
  max-width: 850px;
  margin: 0 auto;
}

/* =========================================
    DISH CARD
   ========================================= */
.dish-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 35px;
  box-shadow: var(--shadow-md);
  width: 100%;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.dish-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Country-specific card borders */
.algeria-border { border-top: 5px solid var(--algeria-green); }
.italy-border   { border-top: 5px solid var(--italy-green); }
.korea-border   { border-top: 5px solid var(--korea-blue); }

/* =========================================
    DISH IMAGES
   ========================================= */
.dish-card img,
.pop-image {
  display: block;
  width: 100%;
  max-width: 500px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 20px auto;
  border: 3px solid #eee;
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow var(--transition);
}

.pop-image:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* =========================================
    MULTILINGUAL TITLES
   ========================================= */
.hangul {
  font-size: 2.8rem;
  margin-bottom: 0;
  color: #000;
  font-family: var(--font-hangul);
}

.arabic-title {
  font-size: 2.8rem;
  margin-bottom: 0;
  color: #222;
  direction: rtl;
}

.italian-title {
  font-size: 2.5rem;
  margin-bottom: 0;
  color: #222;
}

.english-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 5px;
  margin-bottom: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  border-bottom: 2px solid var(--border);
  padding-bottom: 5px;
}

/* Country-specific sub border colors */
.algeria-sub { border-bottom-color: var(--algeria-green); }
.italy-sub   { border-bottom-color: var(--italy-red); }
.korea-sub   { border-bottom-color: var(--korea-red); }

/* =========================================
    PRONUNCIATION BUTTONS
   ========================================= */
.pronunciation-btn {
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 25px;
  transition: opacity var(--transition);
}

.pronunciation-btn:hover {
    opacity: 0.8;
}

.algeria-btn { background-color: var(--algeria-green); }
.italy-btn   { background-color: var(--italy-green); }
.korea-btn   { background-color: var(--korea-blue); }

/* =========================================
    RECIPE DETAILS & CHECKLIST
   ========================================= */
.recipe-details {
    text-align: left;
    background-color: var(--recipe-bg);
    padding: 25px;
    border-radius: var(--radius-sm);
    border-top: 4px solid var(--border);
    margin-top: 10px;
}

.recipe-details h4 {
    margin-top: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.ingredient-section ul { list-style: none; padding: 0; margin-bottom: 20px;}

.ingredient-section li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.ingredient-section input[type="checkbox"] {
  accent-color: var(--progress-orange);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.checked-text {
  text-decoration: line-through;
  color: #95a5a6;
  transition: 0.3s;
}

.recipe-details ol {
    list-style-type: decimal !important;
    padding-left: 25px;
    margin-top: 10px;
}

.recipe-details ol li {
    margin-bottom: 12px;
    display: list-item !important;
}

/* =========================================
    PROGRESS BAR
   ========================================= */
.progress-container {
  background-color: #eee;
  border-radius: 10px;
  height: 15px;
  width: 100%;
  margin-bottom: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease, background-color 0.3s ease;
  border-radius: 10px;
}

.progress-orange { background-color: var(--progress-orange);}

.progress-text {
  text-align: right;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--progress-orange);
}

/* =========================================
    QUIZ CARDS
   ========================================= */
.quiz-card { text-align: left; }

.quiz-title {
  margin-top: 0;
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
}

.algeria-quiz-border { border-top: 5px solid var(--algeria-red); }
.korea-quiz-border   { border-top: 5px solid var(--korea-blue); }

.algeria-quiz-title { color: var(--algeria-red); }
.korea-quiz-title   { color: var(--korea-blue); }

.quiz-question { margin-bottom: 25px; }

.quiz-q-text {
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.quiz-label {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.quiz-select {
  padding: 10px;
  font-size: 1rem;
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid #ccc;
  margin-top: 5px;
}

.quiz-submit-wrap { text-align: center; margin-top: 20px; }
.korea-quiz-btn { background-color: var(--korea-red); }

.quiz-results {
  font-size: 1.1rem;
  font-weight: bold;
  min-height: 30px;
  margin-top: 15px;
}

/* =========================================
    SCROLL TO TOP
   ========================================= */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  border: none;
  background-color: var(--scroll-btn-bg);
  color: white;
  cursor: pointer;
  padding: 15px 20px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color var(--transition), transform 0.2s;
  z-index: 99;
}

#scrollTopBtn:hover {
  background-color: #555;
  transform: scale(1.1);
}
/* =========================================
    ABOUT & CONTACT PAGES SPECIFIC CSS
   ========================================= */

/* Shared Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Alternate Navbar used in the About page */
.navbar {
    background: var(--header-bg);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}
.nav-links {
    display: flex;
    gap: 20px;
    margin: 0;
}
.nav-links a {
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    transition: background 0.3s;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--nav-active);
}

/* About Page Typography & Team Cards */
.container h1 { font-size: 2.8rem; margin-bottom: 1.5rem; color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: 10px;}
.container h2 { font-size: 2rem; margin: 2.5rem 0 1rem; color: var(--text); }
.container p { font-size: 1.1rem; margin-bottom: 1.5rem; line-height: 1.8; color: var(--text-muted); }

.team-member {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 5px solid var(--algeria-green);
}
.team-member:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}
.team-member strong { 
    display: block; 
    font-size: 1.3rem; 
    color: var(--text); 
    margin-bottom: 8px; 
}
.team-member p { margin-bottom: 0; font-size: 1rem;}

.cta {
  background-color: var(--nav-bg);
  color: white;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 3rem;
  box-shadow: var(--shadow-md);
}

/* Contact Page Hero */
.hero {
  background: linear-gradient(135deg, var(--header-bg) 0%, #222 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); }

/* Contact Form Styling */
.contact-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: bold; font-size: 1.1rem; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--nav-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.error {
  display: none;
  color: var(--italy-red);
  font-size: 0.9rem;
  margin-top: 8px;
  font-weight: bold;
}
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--nav-active);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  margin-top: 10px;
}
.submit-btn:hover { 
    background: #2563eb; 
    transform: translateY(-2px);
}
.success-msg {
  display: none;
  color: #27ae60;
  text-align: center;
  font-weight: bold;
  margin-top: 20px;
  font-size: 1.2rem;
  background: #e8f5e9;
  padding: 15px;
  border-radius: var(--radius-pill);
  border: 1px solid #27ae60;
}

/* =========================================
    FOOTER
   ========================================= */
footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 40px 0;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
