/*
 * === AAKHAR APP: MAIN STYLESHEET ===
 */

/* === 1. Root Variables === */
:root {
  --theme-color: #ec6207;
  --text-dark: #333;
  --text-light: #f4f4f4;
  --bg-light: #f9f9f9;
  --border-radius: 8px;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* === 2. Global Styles (Reset) === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-light);
  color: var(--text-dark);
  
  /* Flex layout for sticky footer */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* === 3. App Shell Layout (Header, Nav, Main, Footer) === */
header {
  background-color: var(--theme-color);
  color: var(--text-light);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav {
  display: flex;
  justify-content: center;
  background-color: #fff;
  box-shadow: var(--shadow);
}

.main-nav a {
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover:not(.active) {
  background-color: #eee;
}

.main-nav a.active {
  background-color: var(--theme-color);
  color: var(--text-light);
}

#app-content {
  /* This makes the main content area grow to fill available space */
  flex-grow: 1;

  /* Constrain content width and center it */
  width: 90%;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}

footer {
  background-color: #444;
  color: var(--text-light);
  text-align: center;
  padding: 1.5rem;
  /* margin-top: auto; This is handled by flex-grow on main */
}

/* === 4. Common Component & Utility Classes === */

/* A generic card for flashcards, recall items, etc. */
.card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* A generic button */
.btn {
  display: inline-block;
  background-color: var(--theme-color);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-icon {
  font-size: 1.25rem;
  padding: 0.5rem 0.75rem;
  line-height: 1; /* Helps vertically center the emoji */
}

/* New Secondary Button Style */
.btn-secondary {
  display: inline-block;
  background-color: #666;
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #444;
  opacity: 1; /* Override default hover opacity if needed */
}

/* For error messages */
.error {
  color: #D8000C; /* Red */
  background-color: #FFD2D2;
  padding: 1rem;
  border-radius: var(--border-radius);
}

/* Card structure */
.card-header {
  padding-bottom: 1rem; /* Add some space before content */
}
/* Ensure h2 in header has no bottom margin */
.card-header h2 {
  margin-bottom: 0;
}

/* * .card-content is visible by default on desktop. 
 * It will be hidden by responsive.css on mobile. 
 */
.card-content {
  /* No special styles needed for desktop */
}

/* === 5. Component: Acknowledgements (About Page) === */

.team-grid {
  display: grid;
  /* Create a responsive grid: 1 column on mobile, 2 on tablet, 3 on desktop */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.team-member {
  text-align: center;
}

.team-member-img {
  width: 120px;
  height: 120px;
  border-radius: 50%; /* Makes the image circular */
  object-fit: cover; /* Ensures image covers the space without stretching */
  border: 3px solid var(--theme-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
}

.team-member h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.team-member p {
  font-size: 0.9rem;
  color: #666;
}

/* Endorsement Profile Style */
.endorsement-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: var(--border-radius);
}
.endorsement-profile .team-member-img {
  width: 80px;
  height: 80px;
  margin-bottom: 0;
}
.endorsement-profile h3 {
  margin-bottom: 0.25rem;
}

/* === 6. Hamburger Menu (Desktop-First) === */

.hamburger-btn {
  display: none; /* Hidden on desktop by default */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  
  /* Positioning */
  position: absolute;
  top: 1.5rem; /* Adjust to vertically center */
  right: 1.5rem;
  z-index: 110; /* Above nav */
}

.hamburger-bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--text-light); /* White bars */
  transition: 0.3s;
}

/* === 7. Component: About Page Specifics === */

/* Translation Grid */
.translation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two columns */
  gap: 1.5rem;
}
.lang-col p {
  margin-bottom: 1rem;
}
.lang-col:last-child {
  padding-left: 1.5rem;
  border-left: 2px solid #eee;
}

/* Hide "Add to Home" card on desktop */
#add-to-home-card {
  display: none;
  margin-bottom: 1.5rem;
}

/* Map Image Styling */
.map-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

/* * Hide the Header and Nav when the home page is active.
 * This works for both desktop and mobile.
 */
.home-page-active header,
.home-page-active .main-nav {
  display: none;
}

/* * Remove the padding/margins from the main content area
 * ONLY on the home page, allowing it to fill the screen.
 */
.home-page-active #app-content {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}