/* --- CSS RESET & NORMALIZATION --- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  background: #FFFDF9;
  color: #1B3556;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
img {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
  border: 0;
}
button, input[type="button"], input[type="submit"] {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

/* ------ BRAND FONTS ------ */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&display=swap');

body {
  font-family: 'Apple SD Gothic Neo', 'Nanum Gothic', 'Malgun Gothic', 'Arial', sans-serif;
  background: #FFFDF9;
  color: #1B3556;
  font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Arial', sans-serif;
  color: #1B3556;
  font-weight: bold;
  letter-spacing: -0.5px;
}
h1 { font-size: 2.5rem; margin-bottom: 16px; }
h2 { font-size: 2rem; margin-bottom: 12px; }
h3 { font-size: 1.32rem; margin-bottom: 8px; }
h4, h5, h6 { font-size: 1rem; }

p, li, dd {
  font-family: 'Apple SD Gothic Neo', 'Nanum Gothic', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #263449;
}
strong {
  color: #F9B233;
  font-weight: 700;
}

.subheading {
  color: #81521e;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 20px;
}

/* ------ LAYOUT CONTAINERS ------ */
.container {
  width: 100%;
  max-width: 1140px;
  padding: 0 20px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 12px 0 #F5EEE4;
}
@media (max-width: 768px) {
  .section {
    padding: 28px 12px;
    margin-bottom: 32px;
  }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 1px 8px 0 rgba(249,178,51,0.09);
  padding: 28px 22px;
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 16px 0 rgba(249,178,51,0.25);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #FFF7EA;
  border-radius: 16px;
  box-shadow: 0 1.5px 7px rgba(193,142,32,0.09);
  margin-bottom: 20px;
  color: #1B3556;
  line-height: 1.5;
}
.testimonial-card p {
  color: #53350a;
  font-size: 1.1rem;
}
.testimonial-card img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ------- HEADER & NAVIGATION ------- */
header {
  background: #fff;
  border-bottom: 1px solid #F7F1EA;
  box-shadow: 0 2px 10px 0 #f5eedc11;
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 101;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}
.logo img {
  height: 46px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 1.05rem;
}
.main-nav a {
  color: #1B3556;
  padding: 5px 12px;
  border-radius: 16px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus {
  background: #F9B23310;
  color: #F9B233;
}

/* --- Responsive Nav --- */
.mobile-menu-toggle {
  display: none;
  font-size: 2.2rem;
  background: none;
  color: #F9B233;
  border: none;
  margin-left: 24px;
  padding: 4px 12px;
  border-radius: 16px;
  transition: background 0.2s;
  position: relative;
  z-index: 201;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: #fdeac6;
}
@media (max-width: 990px) {
  .main-nav,
  .btn-primary[href="membership.html"] {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #FFFDF8;
  box-shadow: 0 8px 32px rgba(139,81,15,0.12);
  z-index: 202;
  transform: translateX(-100vw);
  transition: transform 0.35s cubic-bezier(.23,.78,.67,.97);
  padding: 0 0;
  visibility: hidden;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.3rem;
  margin: 24px 24px 0 0;
  color: #D27700;
  background: none;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  transition: background 0.18s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: #FFF0DA;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: 58px;
}
.mobile-nav a {
  color: #1B3556;
  font-size: 1.34rem;
  padding: 12px 0;
  border-radius: 16px;
  background: transparent;
  transition: color 0.18s, background 0.18s;
  width: 85vw;
  text-align: center;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #F9B233;
  background: #FFF5E3;
}

/* ------ BUTTONS & INTERACTION ------ */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  border-radius: 28px;
  font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 700;
  font-size: 1.13rem;
  padding: 12px 32px;
  margin-top: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(249,178,51,0.14);
  transition: background 0.21s, color 0.18s, box-shadow 0.18s, transform 0.16s;
}
.btn-primary {
  background: #F9B233;
  color: #1B3556;
}
.btn-primary:hover,
.btn-primary:focus {
  background: #ffd27b;
  color: #824700;
  box-shadow: 0 3px 22px 0 #F9B2332c;
  transform: translateY(-2px) scale(1.04);
}
.btn-secondary {
  background: #fff;
  border: 2px solid #F9B233;
  color: #C88720;
}
.btn-secondary:hover,
.btn-secondary:focus {
  border-color: #FFD180;
  color: #ea8f00;
  background: #FFF5C6;
  transform: translateY(-2px) scale(1.04);
}
a.btn-primary,
a.btn-secondary {
  text-decoration: none;
}

/* LISTS */
ul, ol {
  margin-left: 1.1em;
  margin-bottom: 7px;
}
ul li, ol li {
  margin-bottom: 7px;
  padding-left: 0;
  color: #3d321e;
}
.feature-list li {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
  background: #FFF4E2;
  padding: 18px 20px;
  border-radius: 14px;
  min-width: 0;
  box-shadow: 0 0.5px 3px #ffd6801e;
}
.feature-list li img {
  width: 48px; height: 48px;
  object-fit: contain;
  margin-right: 2px;
}

/* CATEGORY LIST & FILTER BUTTONS */
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
}
.category-list li {
  background: #FFF5E3;
  color: #A3730C;
  border-radius: 13px;
  font-size: 1rem;
  padding: 8px 20px;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.category-list li:hover {
  background: #ffe2ab;
  color: #DC8A00;
}
button {
  background: #FFF4E2;
  color: #BF9002;
  border-radius: 12px;
  font-size: 1rem;
  border: none;
  margin-left: 6px;
  margin-top: 1px;
  padding: 6px 16px;
  font-family: inherit;
  transition: background .14s, color .14s, box-shadow .15s;
}
button:hover, button:focus {
  background: #FFE8AF;
  color: #F9B233;
}

/* --- INPUTS --- */
input[type='search'], input[type='text'], input, textarea {
  width: 100%;
  padding: 11px 16px;
  font-size: 1rem;
  border-radius: 16px;
  border: 1px solid #e9decc;
  background: #FFF8EA;
  outline: none;
  margin: 6px 0 16px 0;
  transition: border 0.18s, box-shadow 0.18s;
  font-family: 'Apple SD Gothic Neo', 'Nanum Gothic', Arial, sans-serif;
}
input[type='search']:focus, input:focus, textarea:focus {
  border: 1.5px solid #F9B233;
  box-shadow: 0 0 0 2px #fff8ed;
}

/* --- TABLES (Membership table) --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 12px 0;
  background: #FFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0.5px 6px #f9b23321;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #F5EEE2;
  text-align: left;
  font-size: 1rem;
}
th {
  background: #FFF7EA;
  font-family: 'Nanum Gothic', sans-serif;
  color: #C88720;
  font-weight: bold;
}
tr:last-child td { border-bottom: none; }

/* --- FOOTER --- */
footer {
  background: #FFF7EA;
  border-top: 1px solid #F7E3BE;
  padding: 36px 0 24px 0;
  margin-top: 60px;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  gap: 26px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-logo img {
  width: 54px; height: 54px;
}
.footer-nav {
  display: flex;
  gap: 28px;
  margin: 0 20px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 1.02rem;
  color: #9A7A40;
  padding: 3px 7px;
  border-radius: 10px;
  transition: color 0.16s, background 0.15s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: #fff1d5;
  color: #F9B233;
}
.footer-contact p {
  color: #736044;
  font-size: 0.96rem;
  margin-bottom: 3px;
}

@media (max-width: 960px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

/* --- HERO, TEASERS, CTAS --- */
.hero, .about-hero, .books-hero, .events-hero, .cafe-hero, .membership-hero, .contact-hero, .thank-you-message {
  background: #FFF4E2;
  border-radius: 0 0 28px 28px;
  padding: 46px 0 40px 0;
  margin-bottom: 44px;
  box-shadow: 0 8px 26px #FFE2AD0e;
}
.hero h1, .about-hero h1, .books-hero h1, .events-hero h1, .cafe-hero h1, .membership-hero h1, .contact-hero h1 {
  color: #BF9002;
  margin-bottom: 10px;
}
.hero .subheading {
  color: #593F19;
  font-size: 1.24rem;
}
.hero .btn-primary {
  margin-top: 28px;
}
@media (max-width: 768px) {
  .hero, .about-hero, .books-hero, .events-hero, .cafe-hero, .membership-hero, .contact-hero, .thank-you-message {
    padding: 28px 0 24px 0;
    margin-bottom: 18px;
    border-radius: 0 0 20px 20px;
  }
}

.membership-cta, .signup-cta, .events-teaser, .about-preview, .book-recommendations, .contact-teaser {
  background: #FFF7EA;
  border-radius: 18px;
  margin-bottom: 32px;
  box-shadow: 0 1px 8px #FFE5BA30;
  padding: 36px 20px;
}
.membership-cta h2, .signup-cta h2, .about-preview h2, .book-recommendations h2, .contact-teaser h2, .events-teaser h2 {
  color: #C88720;
}

@media (max-width: 768px) {
  .membership-cta, .signup-cta, .events-teaser, .about-preview, .book-recommendations, .contact-teaser {
    padding: 18px 10px;
    border-radius: 10px;
  }
}

/* --- REVIEWS/TESTIMONIALS --- */
.reviews h2 {
  color: #F9B233;
  margin-bottom: 20px;
}

.reviews .testimonial-card {
  background: #FFF4E2;
  color: #583F14;
}

/* --- FAQ, POLICY --- */
dt {
  font-weight: bold;
  color: #BF9002;
  margin: 12px 0 5px 0;
  font-size: 1.1rem;
}
dd {
  margin-left: 16px;
  margin-bottom: 11px;
  color: #553a07;
}

.privacy-policy, .gdpr-policy, .cookies-policy, .terms-of-use {
  background: #FFF9F1;
  border-radius: 18px;
  box-shadow: 0 1.5px 10px #ffe4b220;
  padding: 38px 30px;
  margin-bottom: 60px;
}
.privacy-policy h1, .gdpr-policy h1, .cookies-policy h1, .terms-of-use h1 {
  color: #F9B233;
}

@media (max-width: 768px) {
  .privacy-policy, .gdpr-policy, .cookies-policy, .terms-of-use {
    padding: 18px 6px;
  }
}

/* --- CUSTOM FLEX LAYOUTS (MANDATORY CLASSES) --- */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- RESPONSIVE LAYOUT --- */
@media (max-width: 1024px) {
  .main-nav {
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 8px;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 0 4px;
  }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.32rem; }
  h3 { font-size: 1.08rem; }
}

/* ------ COOKIE CONSENT BANNER & MODAL ------ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #FFF7EA;
  color: #593F19;
  border-top: 2px solid #FFE0AC;
  box-shadow: 0 -1px 16px #CC974210;
  padding: 24px 16px 24px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 401;
  animation: cookieBannerIn 0.45s cubic-bezier(.18,.8,.24,.98);
  flex-wrap: wrap;
}
@keyframes cookieBannerIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  margin-right: 30px;
  font-size: 1.01rem;
  color: #593F19;
}
.cookie-banner .cookie-btn {
  margin-right: 12px;
  margin-bottom: 0;
  padding: 9px 25px;
  border-radius: 18px;
  font-size: 1rem;
  font-family: 'Nanum Gothic','Apple SD Gothic Neo',sans-serif;
  box-shadow: 0 0.5px 5px #fde2a82f;
  border: none;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.cookie-banner .cookie-btn.accept {
  background: #F9B233;
  color: #fff;
}
.cookie-banner .cookie-btn.accept:hover {
  background: #ffd070;
  color: #BF9002;
}
.cookie-banner .cookie-btn.reject {
  background: #ffe8b0;
  color: #C88720;
}
.cookie-banner .cookie-btn.reject:hover {
  background: #ffd070;
  color: #BF9002;
}
.cookie-banner .cookie-btn.settings {
  background: #fff;
  border: 1.4px solid #F9B233;
  color: #C88720;
}
.cookie-banner .cookie-btn.settings:hover {
  background: #FFF0DA;
}
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 7px 18px 10px;
    gap: 12px;
  }
  .cookie-banner p, .cookie-banner .cookie-btn { margin-right: 0; }
}

.cookie-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, 80vh) scale(.95);
  min-width: 324px;
  width: 95vw;
  max-width: 410px;
  background: #FFFDE8;
  color: #633d00;
  border-radius: 22px;
  box-shadow: 0 7px 40px #C8872025;
  padding: 32px 24px 20px 24px;
  z-index: 402;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, transform 0.32s cubic-bezier(.23,.78,.67,.97);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.cookie-modal h3 {
  color: #C88720;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 10px 0;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
}
.cookie-category input[type='checkbox'] {
  accent-color: #F9B233;
  width: 17px; height: 17px;
  cursor: pointer;
}
.cookie-category.essential input[type='checkbox'] {
  accent-color: #ccc;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: flex-end;
}
.cookie-modal .cookie-btn {
  padding: 9px 21px;
  font-size: 1rem;
  border-radius: 13px;
}
@media (max-width: 520px) {
  .cookie-modal {
    min-width: 0;
    width: 98vw;
    padding: 14px 5px 16px 7px;
  }
  .cookie-modal-actions {
    flex-direction: column;
    gap: 7px;
  }
}

/* ------ ANIMATIONS ------ */
a, button, .btn-primary, .btn-secondary {
  transition: background 0.21s, color 0.17s, box-shadow 0.22s, border .16s, transform .13s;
}
section, .card, .testimonial-card, .cookie-banner, .cookie-modal {
  transition: box-shadow 0.19s, background 0.13s;
}

/* ------ UTILITIES, SPACING, MISC ------ */
.mb-20 { margin-bottom: 20px; }
.mb-32 { margin-bottom: 32px; }
.mb-60 { margin-bottom: 60px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* --- FORCE FLEXBOX: FORBID GRID/COLUMNS (REMINDER) --- */
/* All layouts use only display: flex; No display: grid/columns anywhere. */

/* === COLOR ACCESSIBILITY: TESTIMONIALS & REVIEW TEXT === */
.reviews .testimonial-card,
.testimonial-card {
  background: #FFF7EA;
  color: #2E230B;
  font-weight: 500;
  box-shadow: 0 1.3px 7px #ffa60011;
}

/* --- MINIMUM SPACING --- */
.card, .testimonial-card, .section, .about-preview, .book-recommendations, .membership-cta, .contact-teaser, .signup-cta {
  margin-bottom: 20px;
}
.card-container, .content-grid, .feature-list, .category-list {
  gap: 20px;
}

/* --- SCROLLBAR FRIENDLY --- */
::-webkit-scrollbar {
  width: 8px; background: #FFE9B9;
}
::-webkit-scrollbar-thumb {
  background: #F9B233; border-radius: 14px;
}

/* --- ACCESSIBILITY (FOCUS VISIBLE) --- */
a:focus, button:focus, input:focus {
  outline: 2px solid #F9B233;
  outline-offset: 2px;
}

/* --- PRINT FRIENDLY (OPTIONAL) --- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { background: #fff !important; }
}