/* ==========================================================================
   COFFEE SHOP & BAKERY - STYLESHEET (style.css)
   A clean, beginner-friendly CSS stylesheet with warm, cozy cafe aesthetic.
   ========================================================================== */

/* --- CSS Variables / Color Palette --- */
:root {
  --primary-color: #8B4513;       /* Mentor Palette: Primary (#8B4513) */
  --primary-dark: #5c2c0d;        /* Deep Saddle Brown */
  --primary-light: #d4a373;       /* Warm Latte */
  --accent-color: #8B4513;        /* Warm Accent (#8B4513) */
  --bg-color: #FFF8DC;            /* Mentor Palette: Secondary/background Cornsilk (#FFF8DC) */
  --card-bg: #ffffff;             /* Crisp Card White */
  --text-main: #2C2C2C;           /* Mentor Palette: Dark text (#2C2C2C) */
  --text-muted: #5a5047;          /* Soft Muted Text */
  --border-color: #e8dbbe;        /* Warm Border */
  --shadow-sm: 0 2px 4px rgba(139, 69, 19, 0.08);
  --shadow-md: 0 6px 16px rgba(139, 69, 19, 0.12);
  --font-heading: 'Georgia', 'Playfair Display', serif;
  --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --max-width: 1100px;
}

/* --- Base Reset & Typography --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Container Utility --- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Screen Reader Only Utility for WCAG Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Header & Navigation Bar --- */
.site-header {
  background-color: #3b2314;       /* Requirement 4: Dark brown background */
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;                  /* Requirement 5: White text */
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.logo:hover {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.75rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #ffffff;                  /* Requirement 5: White navigation text */
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Requirement 3: Highlight current/active page */
.nav-links a.active {
  background-color: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
}

/* Requirement 8: Mobile Nav Toggle Button (Hamburger) with WCAG 44x44px touch target */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.25rem;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.nav-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* --- Main Content Layout --- */
main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

/* --- Landing Page Continuous Sections --- */
.landing-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-color);
}

.landing-section:last-of-type {
  border-bottom: none;
  padding-bottom: 1rem;
}

#home.landing-section {
  padding-top: 0;
}

/* --- Page Header Banner --- */
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.page-header h1,
.page-header h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.category-title {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* --- Hero Section (Home) --- */
.hero {
  background: linear-gradient(rgba(59, 35, 20, 0.82), rgba(59, 35, 20, 0.82)), url('https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: 5rem 1.5rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.hero p {
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent-color);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.btn:hover {
  background-color: #9c581e;
  border-color: #9c581e;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-dark);
  border-color: #ffffff;
}

/* --- Cards & Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.1rem;
}

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 0.6rem;
  display: inline-block;
  line-height: 1;
}

.card h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-badge {
  display: inline-block;
  background-color: #f3ece3;
  color: var(--accent-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.team-card {
  text-align: center;
  align-items: center;
}

.team-card .team-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.team-card h3 {
  margin-bottom: 0.25rem;
}

.team-role {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* --- Operating Hours Section --- */
.hours-section {
  margin-top: 3.5rem;
  text-align: center;
}

.hours-section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
}

.hours-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 1.05rem;
}

.hours-card p {
  color: var(--text-main);
}

.hours-card p strong {
  color: var(--primary-dark);
}

/* --- Menu Item Styling --- */
.menu-category {
  margin-bottom: 3rem;
}

.menu-category h2 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--border-color);
  padding: 1rem 0;
}

.menu-item-info h4 {
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.menu-item-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.menu-price {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 1.15rem;
  margin-left: 0.5rem;
}

.menu-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
}

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.menu-card-header h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.2rem;
  margin: 0;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: var(--border-color);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(43, 33, 24, 0.85));
  color: #ffffff;
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Contact & Forms --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.contact-info {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.contact-info-block {
  margin-bottom: 1.5rem;
}

.contact-info-block h3,
.contact-info-block h4 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-info-block p {
  color: var(--text-muted);
}

.contact-info-block a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-info-block a:hover {
  color: var(--primary-dark);
}

.contact-form {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #fff;
  color: var(--text-main);
  transition: border-color 0.2s ease, outline 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary-color);
}

.form-message {
  display: none;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

/* --- Location Map Section --- */
.map-section {
  margin-top: 3rem;
}

.map-heading {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--card-bg);
}

.map-container iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

/* --- Footer --- */
.site-footer {
  background-color: #3b2314;       /* Consistent dark brown theme */
  color: #f3ece3;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
  border-top: 3px solid var(--primary-light);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
  font-family: var(--font-heading);
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  color: #d4a373;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: #f3ece3;
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-light);
}

/* Footer Social Media Links */
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social span {
  font-size: 0.9rem;
  color: #d4a373;
  font-weight: 500;
}

.footer-social a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-social a:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  /* Footer responsive layout */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  /* Show hamburger button on screens below 768px */
  .nav-toggle {
    display: inline-flex;
  }

  /* Hide navigation links by default on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #3b2314;       /* Dark brown dropdown matching header */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid var(--accent-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
    text-align: center;
  }

  /* When hamburger menu is toggled open via JavaScript */
  .nav-links.open {
    display: flex;
  }

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

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 85%;
    margin: 0 auto;
    padding: 0.6rem 1rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

  /* On mobile single column, Owner naturally sits at the top */
  #team-jubair-ahmad {
    order: -1;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 3.5rem 1.25rem;
    margin-bottom: 2.25rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* Mobile Screens (576px and below) */
@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
