/* ===========================
   RESET & BASE STYLES
=========================== */
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;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
}
ol, ul {
  list-style: none;
}
a {
  background: transparent;
  text-decoration: none;
  color: inherit;
}
img {
  border: 0;
  max-width: 100%;
  display: block;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
  outline: none;
  border: none;
  background: none;
}

/* ===========================
   CUSTOM PROPERTIES
=========================== */
:root {
  --primary: #25304A;
  --secondary: #E0C488;
  --accent: #F7F6F1;
  --primary-dark: #181f32;
  --secondary-dark: #BFA054;
  --white: #fff;
  --black: #10121B;
  --bg-gradient: linear-gradient(120deg, #e0c488 0%, #f7f6f1 100%);
  --btn-gradient: linear-gradient(90deg, #E0C488 0%, #F7F6F1 100%);
  --font-display: 'Merriweather', serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
  --shadow1: 0 4px 20px rgba(37,48,74,0.08);
  --shadow-card: 0 2px 8px rgba(37,48,74,0.10);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 36px;
  --transition: 0.25s cubic-bezier(.55,0,.1,1);
}

/* ===========================
    BODY, TYPOGRAPHY & CONTAINER
=========================== */
body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--primary);
  font-size: 16px;
  min-height: 100vh;
}
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
h1 {font-size: 2.5rem; line-height: 1.1; margin-bottom: 12px;}
h2 {font-size: 2rem; line-height: 1.13; margin-bottom: 10px;}
h3 {font-size: 1.2rem; margin-bottom: 6px;}

p, label, cite, blockquote {
  font-family: var(--font-body);
  color: var(--primary-dark);
  font-size: 1rem;
  line-height: 1.7;
}
strong { font-weight: 700; }
small { font-size: 0.9em; color: var(--primary-dark); }

blockquote {
  font-style: italic;
  border-left: 4px solid var(--secondary-dark);
  padding-left: 20px;
  color: var(--primary-dark);
}
cite {
  color: var(--secondary-dark);
  font-size: 1em;
  font-weight: 700;
  font-style: normal;
  margin-top: 6px;
}

/* ===========================
   UNIVERSAL BUTTONS & LINKS
=========================== */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow1);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
  margin-top: 10px;
}
.btn-primary {
  background: var(--btn-gradient);
  color: var(--primary);
  border: 1px solid var(--secondary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--secondary);
  color: var(--primary-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(37,48,74,.16);
}
.btn-secondary {
  background: var(--primary);
  color: var(--accent);
  border: 1px solid var(--primary-dark);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--primary-dark);
  color: var(--secondary);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(37,48,74,.16);
}
a {
  transition: color var(--transition), background var(--transition);
}
a:hover, .footer-nav a:hover, .desktop-nav a:hover, .mobile-nav a:hover {
  color: var(--secondary-dark);
  text-decoration: underline;
}

/* ===========================
   HEADER & NAVIGATION (DESKTOP)
=========================== */
header {
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 18px rgba(37,48,74,.04);
  position: sticky;
  top: 0;
  z-index: 1020;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
}
.desktop-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.desktop-nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}
.desktop-nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition);
  margin-top: 4px;
}
.desktop-nav a:hover::after, .desktop-nav a:focus::after {
  width: 100%;
}
.header img, header img {
  height: 48px;
  margin-right: 12px;
}

.mobile-menu-toggle {
  font-size: 2rem;
  background: var(--secondary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 1px solid var(--secondary-dark);
  transition: background var(--transition), color var(--transition);
  margin-left: 10px;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--secondary-dark);
  color: var(--white);
}

/* Hide mobile nav by default for desktop */
.mobile-menu {
  display: none;
}

/* ===========================
   MOBILE NAVIGATION MENU
=========================== */
@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-menu {
    display: flex;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--accent);
    flex-direction: column;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform var(--transition), opacity var(--transition);
    opacity: 0;
    pointer-events: none;
  }
  .mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu-close {
    align-self: flex-end;
    margin: 18px 22px 0 0;
    background: var(--secondary);
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 6px 16px;
    font-size: 1.6rem;
    border: 1px solid var(--secondary-dark);
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
  }
  .mobile-menu-close:hover, .mobile-menu-close:focus {
    background: var(--primary);
    color: var(--secondary);
  }
  .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
    padding: 44px 32px;
    margin-top: 32px;
  }
  .mobile-nav a {
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 12px 0;
    width: 100%;
    transition: background var(--transition), color var(--transition);
  }
  .mobile-nav a:hover, .mobile-nav a:focus {
    background: var(--secondary);
    color: var(--white);
    padding-left: 10px;
  }
}
@media (min-width:1025px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none!important;
  }
}

/* ===========================
   GLOBAL SECTION & LAYOUT
=========================== */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 768px) {
  section { padding: 28px 8px; margin-bottom: 36px; }
}

.content-grid, .feature-grid, .card-container, .card-list, .community-card-deck, .team-bio-list, .rubriche-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.feature-grid, .rubriche-grid {
  gap: 24px;
  justify-content: flex-start;
}
.card-container, .card-list, .community-card-deck, .team-bio-list {
  gap: 24px;
}
@media (max-width: 900px) {
  .feature-grid, .rubriche-grid, .team-bio-list, .community-card-deck, .card-list {
    gap: 16px;
    flex-direction: column;
    align-items: stretch;
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px 22px;
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover, .card:focus {
  box-shadow: 0 12px 32px rgba(37,48,74,.19);
  transform: translateY(-3px) scale(1.03);
}

.community-card-deck {
  flex-wrap: wrap;
  gap: 24px;
}
.community-card {
  flex: 1 1 270px;
  min-width: 260px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 22px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.community-card:hover {
  box-shadow: 0 10px 28px rgba(224,196,136,0.16);
  transform: scale(1.03);
}

.card-list > div {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card-list > div:hover {
  box-shadow: 0 6px 20px rgba(224,196,136,0.14);
  transform: translateY(-2px) scale(1.02);
}

.section-intro, .text-intro {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.text-section {
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.events-list-short, .events-calendar-view .event-cards, .featured-articles-list, .community-stories-list, .article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.events-list-short li, 
.events-calendar-view .event-cards li, 
.featured-articles-list li, 
.community-stories-list li, 
.article-list li {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow1);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
  line-height: 1.65;
}
.events-list-short li:hover, .events-calendar-view .event-cards li:hover, .article-list li:hover, .featured-articles-list li:hover, .community-stories-list li:hover {
  box-shadow: 0 7px 22px rgba(224,196,136,0.16);
  transform: translateY(-2px) scale(1.01);
}

.category-tabs, .category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
  margin-top: 6px;
}
.category-tabs a, .category-menu a {
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 18px;
  transition: background var(--transition), color var(--transition);
}
.category-tabs a:hover, .category-menu a:hover, .category-tabs a.selected, .category-menu a.selected {
  background: var(--secondary);
  color: var(--primary);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.pagination a {
  padding: 6px 13px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--primary-dark);
  transition: background var(--transition), color var(--transition);
}
.pagination a:hover, .pagination a:focus {
  background: var(--secondary);
  color: var(--primary);
}
.pagination span {
  font-weight: bold;
  color: var(--primary);
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
  margin-top: 10px;
}
.search-field input[type="text"] {
  border: 1px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 1rem;
  transition: border var(--transition);
}
.search-field input[type="text"]:focus {
  border: 1.5px solid var(--primary);
  background: var(--white);
}

.mission-statement {
  background: var(--secondary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 1.07em;
}

.editor-in-chief-profile {
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 16px;
  box-shadow: var(--shadow-card);
}

.confirmation-message {
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow1);
}

.map {
  border-left: 4px solid var(--secondary);
  padding-left: 16px;
  margin-top: 16px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-details p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

/* ===========================
   TESTIMONIALS & MICRO-CARDS
=========================== */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow1);
  margin-bottom: 20px;
  flex-direction: column;
}
.testimonial-card blockquote {
  color: var(--primary-dark);
  border-color: var(--secondary-dark);
  font-size: 1.08em;
}
.testimonial-card cite {
  font-size: 1em;
  color: var(--secondary-dark);
  font-weight: 600;
}
.testimonial-card:hover {
  box-shadow: 0 9px 32px rgba(224,196,136,0.17);
  transform: scale(1.03);
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: var(--primary);
  color: var(--secondary);
  padding: 44px 0 24px 0;
  margin-top: 46px;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -4px 24px rgba(37,48,74,0.09);
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
footer img {
  height: 38px;
  margin-bottom: 12px;
}
.footer-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--secondary);
  font-weight: 500;
  font-size: 1rem;
  padding: 7px 0;
  transition: color var(--transition);
}
.footer-nav a:hover {
  color: var(--secondary-dark);
}
.contact-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 10px;
}
.contact-footer img {
  height: 16px;
  margin-right: 8px;
  vertical-align: sub;
  display: inline-block;
}
footer small {
  color: var(--secondary-dark);
  margin-top: 8px;
}

/* ===========================
   LEGAL TEXT
=========================== */
.legal-text {
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 24px 18px;
  color: var(--primary-dark);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  font-size: 1rem;
  line-height: 1.7;
}
.legal-text ul {
  list-style: disc outside;
  padding-left: 25px;
  margin: 15px 0 10px 0;
}
.legal-text a {
  color: var(--primary);
  text-decoration: underline;
  transition: color var(--transition);
}
.legal-text a:hover, .legal-text a:focus {
  color: var(--secondary-dark);
}

/* ===========================
   FEATURE ITEMS
=========================== */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow1);
}

/****************
  RESPONSIVE FLEX PATTERNS  
*****************/
@media (max-width: 768px) {
  .container {
    max-width: 98vw;
    padding: 0 6px;
  }
  .content-wrapper {
    gap: 18px;
  }
  .content-grid, .feature-grid, .card-container, .card-list, .community-card-deck, .team-bio-list, .rubriche-grid {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .events-list-short, .events-calendar-view .event-cards, .featured-articles-list, .community-stories-list, .article-list {
    gap: 13px;
  }
  .section-intro, .text-intro { font-size: 1rem; }
  .testimonial-card { font-size: 1em; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
}

.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: 16px;
  }
}

/* Card spacing pattern */
.card-container, .feature-grid, .rubriche-grid {
  gap: 24px;
}
.card {
  margin-bottom: 20px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/********************
   COMPONENT ANIMATION and TRANSITION
*********************/
.btn-primary, .btn-secondary,
.card, .community-card, .card-list > div, .article-list li, .feature-item {
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition), color var(--transition);
}
a, .desktop-nav a, .footer-nav a {
  transition: color var(--transition), background var(--transition);
}

/********************
   COOKIE CONSENT BANNER
*********************/
.cookie-banner {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--white);
  border-top: 2px solid var(--secondary);
  box-shadow: 0 -2px 14px rgba(37,48,74,0.11);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 22px 10vw 22px 10vw;
  z-index: 9999;
  gap: 24px;
  font-size: 1.05rem;
  color: var(--primary-dark);
  opacity: 0;
  transform: translateY(75px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.cookie-banner.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cookie-banner button {
  margin: 0 5px;
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 6vw 18px 6vw;
    font-size: 0.98rem;
  }
}
.cookie-btn {
  font-size: 1em;
  padding: 8px 17px;
  border-radius: var(--radius-sm);
  border: none;
  margin-left: 8px;
  box-shadow: var(--shadow1);
  cursor: pointer;
  margin-bottom: 0;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.cookie-btn.accept {
  background: var(--secondary);
  color: var(--primary);
  font-weight: 600;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: var(--secondary-dark);
  color: var(--white);
}
.cookie-btn.reject {
  background: var(--white);
  color: var(--primary-dark);
  border: 1.5px solid var(--secondary);
  font-weight: 600;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: var(--primary);
  color: var(--white);
}
.cookie-btn.settings {
  background: var(--accent);
  color: var(--primary);
}
.cookie-btn.settings:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

/* Cookie modal */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 92vw;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 18px 68px rgba(37,48,74,0.22);
  transform: translate(-50%,-38%) scale(0.93);
  opacity: 0;
  z-index: 10000;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  padding: 28px 22px 22px 22px;
  color: var(--primary-dark);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-modal.visible {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1);
  pointer-events: auto;
}
.cookie-modal h3 {
  font-size: 1.18em;
  color: var(--primary);
  margin-bottom: 8px;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 1em;
  justify-content: space-between;
  border-radius: var(--radius-sm);
}
.essential {
  color: var(--secondary-dark); font-weight: 700;
}
.cookie-modal .cookie-btn {
  margin: 12px 8px 0 0;
}
.cookie-modal .modal-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.cookie-modal .close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 1.5em;
  color: var(--primary-dark);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.cookie-modal .close:hover { opacity: 1; }

/* ===========================
   ACCESSIBILITY: FOCUS RINGS
=========================== */
a:focus, button:focus, input:focus {
  outline: 2px solid var(--secondary-dark);
  outline-offset: 2px;
  z-index: 3;
}

/* ===========================
   MISC
=========================== */
::-webkit-scrollbar {
  width: 8px;
  background: var(--accent);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

