/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #faf5ef;
  color: #4b3b2b;
  padding: 0 1rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #876445;
  padding: 10px 20px;
  color: #fff;
}

.logo img { height: 50px; }

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
nav ul li a {
  color: #f4eee8;
  text-decoration: none;
  font-weight: 600;
}
nav ul li a:hover,
nav ul li a:focus { text-decoration: underline; }

#hamburger {
  background: none;
  border: none;
  color: #f4eee8;
  font-size: 28px;
  cursor: pointer;
  display: none;
}

main { max-width: 900px; margin: 20px auto; }

h1, h2 {
  color: #5a4a33;
  margin-bottom: 10px;
}

section {
  margin-bottom: 20px;
  background: #f4eee8;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 1px 1px 3px #d9cbbd;
}

footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  background-color: #876445;
  color: #f4eee8;
  font-size: 0.9rem;
}

/* Mobile styles */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background-color: #876445;
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 10px;
    border-radius: 8px;
  }
  nav.show ul { display: flex; }
  #hamburger { display: block; }
}

.button-group {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn {
  padding: 14px 28px;
  font-size: 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
}
.btn-primary {
  background-color: #6B8E23;
  color: #fff;
  border: 2px solid #6B8E23;
}
.btn-primary:hover { background-color: #556B2F; border-color: #556B2F; }
.btn-secondary {
  background-color: #8B4513;
  color: #fff;
  border: 2px solid #8B4513;
}
.btn-secondary:hover { background-color: #5C3317; border-color: #5C3317; }

.paypal-button { margin-bottom: 30px; }

.subscription-options {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 30px;
}
.plan {
  background: #f4f1ec;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.plan h2 { margin-bottom: 10px; color: #6b4e2e; }
.plan p  { margin-bottom: 15px; }
.paypal-button { margin-bottom: 10px; }

.alert.success {
  background: #d4edda;
  padding: 10px;
  border-left: 4px solid #28a745;
  margin-bottom: 15px;
}
.admin-message { background: #f9f9f9; padding: 10px; margin-bottom: 10px; }

.btn-sm {
  padding: 5px 8px;
  background: #cc0000;
  color: #fff;
  text-decoration: none;
  font-size: 0.9em;
  border-radius: 4px;
}
.alert.error {
  background: #f8d7da;
  border-left: 4px solid #dc3545;
  padding: 10px;
  margin-bottom: 10px;
}
.message-box { background: #f5f5f5; padding: 10px; border-radius: 5px; margin-bottom: 10px; }
.btn-sm {
  background: #cc0000;
  color: #fff;
  padding: 4px 8px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ===== MOBILE ULTRA-COMPACT OVERRIDES (global) ===== */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { font-size: 13px; line-height: 1.5; padding: 0 2px !important; }

  main { max-width: 100% !important; width: 100% !important; margin: 8px auto !important; padding: 0 2px !important; }

  /* Cards/sections: 100% width + 2px padding */
  .card, section, .blog-post, .fgs-card, .fgs-list-card, .services-card, .resources-card,
  .profile-container .card, .container .card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 10px !important;
  }

  /* Tables: full width + tight cells */
  table, .children-table, .timeline table, .data-table, .table {
    width: 100% !important;
    table-layout: auto !important;
  }
  table th, table td,
  .children-table th, .children-table td,
  .table th, .table td {
    padding: 2px !important;
    font-size: 0.92rem !important;
    vertical-align: top;
  }

  /* Headings smaller */
  h1, .page-title { font-size: 1.2rem !important; margin: 6px 0 10px !important; }
  h2 { font-size: 1.05rem !important; }
  h3 { font-size: 0.98rem !important; }
  p, li, small { font-size: 0.92rem !important; }

  /* Buttons tighter */
  .btn { padding: 6px 10px !important; font-size: 0.92rem !important; }

  /* Images scale */
  img { max-width: 100% !important; height: auto !important; }
}
