/* =============================
   Twinkling Bliss Global Learning Summits
   Professional Corporate Style — Mobile-first, Flexbox-only CSS
   ============================= */

/* ---- CSS Reset & Base Normalize ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.25rem; }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #2B8AE0; outline-offset: 2px; }

/* ---- Design Tokens ---- */
:root {
  --primary: #0A2E4E;   /* Deep navy */
  --secondary: #0F6C6D; /* Teal */
  --accent: #F5F7FA;    /* Airy light */
  --text: #1F2937;      /* Slate 800 */
  --muted: #6B7280;     /* Slate 500 */
  --border: #E5E7EB;    /* Gray 200 */
  --white: #FFFFFF;
  --focus: #2B8AE0;     /* Accessible focus */
  --shadow: rgba(10,46,78,0.08);
}

/* ---- Typography ---- */
body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--primary);
  margin: 0 0 12px 0;
}
h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; }
p, li { font-size: 16px; color: var(--text); }
small { font-size: 14px; color: var(--muted); }

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* ---- Utility & Accessibility ---- */
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hr { height: 1px; background: var(--border); margin: 20px 0; }

/* ---- Layout Containers (Flex-only) ---- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.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; background: var(--accent); border: 1px solid var(--border); border-radius: 12px; color: var(--text); box-shadow: 0 8px 24px var(--shadow); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ---- Header & Navigation ---- */
header { background: var(--white); border-bottom: 1px solid var(--border); position: relative; z-index: 50; }
header .content-wrapper { padding: 14px 0; }
.logo img { height: 42px; width: auto; }

/* Main nav hidden on mobile */
.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--primary); padding: 8px 10px; border-radius: 6px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--accent); color: var(--secondary); }
.main-nav a[aria-current="page"] { color: var(--secondary); font-weight: bold; }

.header-ctas { display: flex; align-items: center; gap: 12px; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: var(--primary); color: var(--white); transition: background-color .2s ease, transform .2s ease; }
.mobile-menu-toggle:hover { background: #0C3A61; transform: translateY(-1px); }

/* Mobile menu panel */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: 100%; max-width: 92%; background: var(--white); transform: translateX(100%); transition: transform .3s ease; z-index: 999; display: flex; flex-direction: column; padding: 20px; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 8px; color: var(--primary); background: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; transition: background-color .2s ease; }
.mobile-menu-close:hover { background: #EAF0F6; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a { color: var(--text); padding: 12px 8px; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border-bottom: none; }

/* Desktop header layout */
@media (min-width: 1024px) {
  header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .logo img { height: 48px; }
  .main-nav { display: flex; }
  .mobile-menu-toggle, .mobile-menu { display: none; }
}

/* ---- Buttons & Links ---- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--primary); background: var(--white); color: var(--primary); font-weight: 600; transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.button:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px var(--shadow); }
.button.primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.button.primary:hover { background: #0C3A61; }
.button.secondary { background: #E9F2F2; color: var(--secondary); border-color: #BFD6D6; }
.button.secondary:hover { background: #DCEEEE; }
.button:focus-visible { box-shadow: 0 0 0 3px var(--focus); }

/* Text links */
a { color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #0C5B5C; }

/* ---- Sections, Hero & Common Blocks ---- */
main section { padding: 40px 0; }

.breadcrumb { color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--secondary); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.trust-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 8px 0 0; }
.trust-badges li { background: var(--accent); color: var(--primary); border: 1px solid var(--border); border-radius: 20px; padding: 8px 12px; font-size: 14px; }

.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul, .text-section ol { padding-left: 18px; }
.stats { display: flex; flex-direction: column; gap: 8px; background: var(--accent); border-left: 4px solid var(--secondary); padding: 12px 16px; border-radius: 8px; color: var(--primary); }

.event-list { display: flex; flex-wrap: wrap; gap: 20px; }
.event-list > div { flex: 1 1 260px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.event-list > div h3 { margin-bottom: 4px; }
.event-list > div:hover { box-shadow: 0 10px 28px rgba(10,46,78,0.12); }

/* Text + image generic section behavior */
.text-image-section img { border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); }
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

/* ---- Testimonials (High contrast, light background) ---- */
.testimonial-card p { margin: 0; color: var(--text); }
.testimonial-card strong { color: var(--primary); }

/* ---- Footer ---- */
footer { background: var(--primary); color: var(--white); }
footer section { padding: 40px 0; }
footer a { color: #D7E6F5; text-decoration: none; }
footer a:hover { color: var(--white); text-decoration: underline; }
footer .content-wrapper { flex-direction: column; gap: 24px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links nav { display: flex; flex-direction: column; gap: 8px; }
.footer-brand img { height: 48px; }
.footer-contact address { font-style: normal; color: #E6EEF7; }
.footer-cta { display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 1024px) {
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 32px; }
  .footer-links { flex-direction: row; gap: 40px; }
}

/* ---- Tables (if any appear later) ---- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--primary); }

/* ---- Forms (for future use) ---- */
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(15,108,109,.15); }
label { font-weight: 600; color: var(--primary); margin-bottom: 6px; display: inline-block; }

/* ---- Mobile Navigation Visibility Rules ---- */
/* Hide desktop nav on small, show burger; reverse on desktop handled above */
@media (max-width: 1023.98px) {
  .main-nav { display: none; }
}

/* ---- Cookie Consent (Banner & Modal) ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(0,0,0,.08); padding: 16px 20px; z-index: 998; display: flex; flex-direction: column; gap: 12px; transform: translateY(100%); transition: transform .3s ease; }
.cookie-banner[data-open="true"], .cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 16px; }
.cookie-actions .accept { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.cookie-actions .accept:hover { background: #0C5B5C; }
.cookie-actions .reject { background: var(--accent); color: var(--primary); border-color: var(--border); }
.cookie-actions .settings { background: var(--white); color: var(--primary); }

/* Cookie Preferences Modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(10,46,78,0.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1000; }
.cookie-modal[aria-hidden="false"], .cookie-modal.open { display: flex; }
.cookie-modal .modal-content { background: var(--white); width: 100%; max-width: 640px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Simple toggle for cookie categories */
.cookie-toggle { display: flex; align-items: center; gap: 10px; }
.cookie-toggle input { width: 40px; height: 20px; appearance: none; background: #D1D5DB; border-radius: 999px; position: relative; outline: none; transition: background-color .2s ease; }
.cookie-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--white); border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s ease; }
.cookie-toggle input:checked { background: var(--secondary); }
.cookie-toggle input:checked::after { transform: translateX(20px); }

/* ---- Micro-interactions & Motion ---- */
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideInX { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Page-specific Enhancements ---- */
/* Hero emphasis on index and others via first section */
main > section:first-of-type { background: var(--accent); }
main > section:first-of-type h1 { color: var(--primary); }

/* Emphasis blocks */
.emphasis { background: var(--accent); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }

/* ---- Cards for event lists and testimonials already covered ---- */

/* ---- Ensure spacing between generic blocks ---- */
.content-wrapper > * + * { margin-top: 0; }

/* ---- Images inside content ---- */
.text-section img { max-width: 24px; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* ---- Additional Corporate Touches ---- */
blockquote { border-left: 4px solid var(--secondary); padding-left: 14px; color: var(--primary); margin: 0; }

/* ---- High-contrast rules for testimonials and review sections ---- */
[aria-label="Testimonials"], [aria-label="Attendee Stories"], [aria-label="Speaker feedback"] { background: var(--white); }
[aria-label="Testimonials"] .testimonial-card, [aria-label="Attendee Stories"] .testimonial-card, [aria-label="Speaker feedback"] .testimonial-card { background: var(--accent); color: var(--text); }

/* ---- Header link tone for professionalism ---- */
header a { text-decoration: none; }

/* ---- Width behaviors for multi-column feel using flex-wrap (no grid) ---- */
.two-col { display: flex; flex-wrap: wrap; gap: 20px; }
.two-col > * { flex: 1 1 280px; }

/* ---- Alignment helpers ---- */
.align-center { display: flex; align-items: center; justify-content: center; }
.align-between { display: flex; align-items: center; justify-content: space-between; }

/* ---- Print adjustments (optional) ---- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}

/* ---- Specific element refinements per content ---- */
/* Event cards call-to-action spacing */
.event-list > div .button { align-self: flex-start; margin-top: 6px; }

/* Footer spacing safeguards */
footer .footer-links nav a + a { margin-top: 4px; }

/* ---- Ensure no overlaps via gaps and margins ---- */
main section .card, main section .testimonial-card, main section .event-list > div { margin-bottom: 20px; }

/* ---- Additional navigation touch targets ---- */
.main-nav a, .mobile-nav a { min-height: 36px; display: inline-flex; align-items: center; }

/* ---- ARIA current emphasis in mobile nav ---- */
.mobile-nav a[aria-current="page"] { color: var(--secondary); font-weight: 700; }

/* ---- Page-specific breadcrumb spacing ---- */
.breadcrumb { margin-top: 4px; }

/* ---- Header CTA button sizing consistency ---- */
.header-ctas .button { padding: 10px 16px; }

/* ---- Make all unordered lists inside content breathe ---- */
.text-section ul li + li, .text-section ol li + li { margin-top: 6px; }

/* ---- Assure testimonials center alignment on narrow screens ---- */
@media (max-width: 640px) {
  .testimonial-card { flex-direction: column; align-items: flex-start; }
}

/* ---- Desktop layouts for collections using flex (no grid) ---- */
@media (min-width: 1024px) {
  .event-list { justify-content: space-between; }
  .event-list > div { flex: 1 1 30%; }
}

/* ---- End of Styles ---- */
