/* ==========================================================================
   PsyFi Solutions — Main Stylesheet
   ========================================================================== */

:root {
  /* Brand palette extracted directly from the PSY-FI logo */
  --color-primary: #E5097F;      /* logo magenta/pink — buttons, links, CTAs */
  --color-primary-dark: #2E6600; /* deep logo green — headers, footer, headings */
  --color-accent: #FF6600;       /* logo orange — hover states, highlights */
  --color-lime: #6DE100;         /* bright logo lime green — flourishes, badges */
  --color-bg: #FCFDF9;           /* clean off-white with a faint green cast */
  --color-bg-alt: #F1FAEA;       /* soft green tint for alternating sections */
  --color-text: #232E1F;
  --color-text-muted: #566251;
  --color-white: #ffffff;
  --color-border: #E1EAD9;

  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'Poppins', Arial, sans-serif;

  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(46, 102, 0, 0.10);
  --shadow-md: 0 8px 24px rgba(46, 102, 0, 0.16);
  --container-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--color-bg-alt); }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-title p { margin-top: 8px; }

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--color-accent); color: var(--color-white); transform: translateY(-2px); }
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: var(--color-white); }

/* ---------------- Top bar ---------------- */
.topbar {
  background: var(--color-primary-dark);
  color: #dfeae7;
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #dfeae7; }
.topbar a:hover { color: var(--color-accent); }
.topbar__social a { margin-right: 14px; }
.topbar__contact span { margin-left: 18px; }

/* ---------------- Header / nav ---------------- */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__logo img { height: 56px; width: auto; }
.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--color-primary-dark);
  cursor: pointer;
}
.nav__menu {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav__menu > li { position: relative; }
.nav__menu > li > a {
  display: block;
  padding: 12px 14px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
}
.nav__menu > li > a:hover,
.nav__menu > li.active > a { color: var(--color-primary); }

.nav__menu .has-dropdown > a::after {
  content: '▾';
  margin-left: 4px;
  font-size: 0.7rem;
}
.dropdown {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a { display: block; padding: 9px 20px; font-size: 0.9rem; line-height: 1.4; }
.dropdown li a:hover { background: var(--color-bg-alt); }
.dropdown .has-dropdown { position: relative; }
.dropdown .dropdown { top: 0; left: 100%; }

.nav__cta { margin-left: 12px; }
.nav__menu > li.nav__cta > a,
.nav__menu > li.nav__cta > a:hover { color: var(--color-white); }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(120deg, var(--color-bg-alt) 0%, var(--color-bg) 60%);
  padding: 64px 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero__eyebrow {
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.hero ul {
  padding-left: 20px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}
.hero ul li { margin-bottom: 8px; }
.hero__art { text-align: center; }
.hero__art img { margin: 0 auto; max-width: 340px; width: 100%; }

/* ---------------- Page header (inner pages) ---------------- */
.page-header {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 56px 0;
  text-align: center;
}
.page-header h1 { color: var(--color-white); margin-bottom: 8px; }
.page-header .breadcrumb { color: #b9d3cf; font-size: 0.9rem; }
.page-header .breadcrumb a { color: #d9ece8; }

/* ---------------- Feature grid / cards ---------------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card > img[src*="icon-"] { height: 56px; width: auto; margin: 0 auto 16px; }
.card > img:not([src*="icon-"]) { width: 100%; height: auto; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.92rem; }

/* ---------------- Stats ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.stat__num {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--color-primary);
  font-weight: 700;
}
.stat__label { font-weight: 600; color: var(--color-text); }
.stat__desc { font-size: 0.88rem; }

/* ---------------- Two column content ---------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split ul { padding-left: 20px; color: var(--color-text-muted); }

/* ---------------- Team ---------------- */
.team-card { text-align: center; }
.team-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 4px solid var(--color-bg-alt);
}
.team-card h3 { margin-bottom: 4px; }
.team-card .role { color: var(--color-accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }
.team-card p { font-size: 0.88rem; }

/* ---------------- Events / cards with image ---------------- */
.event-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.event-card img { width: 100%; }
.event-card img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 4/5; object-fit: cover; }
.event-card__body { padding: 18px; margin-top: auto; }

/* ---------------- FAQ ---------------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 4px;
  font-weight: 600;
  color: var(--color-primary-dark);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  color: var(--color-accent);
  font-size: 1.3rem;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p { padding: 0 4px 18px; }

/* ---------------- Contact form ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}
.contact-info li {
  list-style: none;
  margin-bottom: 22px;
}
.contact-info .label { font-weight: 600; color: var(--color-primary-dark); display: block; margin-bottom: 4px; }

.form {
  background: var(--color-white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 14px 0 6px;
  color: var(--color-text);
}
.form input,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
}
.form button { margin-top: 20px; width: 100%; }
.form-message { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.form-message--success { background: #e3f3e9; color: #256b3f; }
.form-message--error { background: #fbe6e6; color: #a13030; }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-top: 32px; }
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #c8d9d5;
  padding: 64px 0 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 { color: var(--color-white); font-family: var(--font-body); font-size: 1rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #c8d9d5; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-about .logo-chip {
  display: inline-block;
  background: var(--color-white);
  padding: 12px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.footer-about img { height: 60px; display: block; }
.footer-about p { color: #c8d9d5; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  margin-right: 8px;
  color: var(--color-white);
}
.footer-social a:hover { background: var(--color-accent); }
.footer-bottom {
  text-align: center;
  padding: 22px 0;
  font-size: 0.82rem;
  color: #9db5af;
}
.footer-bottom a { color: #c8d9d5; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 28px; }
.hit-counter { display: inline-flex; align-items: center; gap: 6px; }
.hit-counter strong { color: var(--color-white); font-weight: 600; letter-spacing: .03em; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.1); padding: 2px 10px; border-radius: 20px; }

/* ---------------- Utility ---------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* ---------------- Responsive ----------------
   Breakpoints:
   1180px  small laptops / iPad landscape — tighter nav
    991px  iPad portrait & small tablets — hamburger menu, 2-column grids
    600px  phones — single column, 16px side gutters
    380px  small phones — tighter type and buttons
------------------------------------------------ */
img { height: auto; }
.nav__toggle { width: 44px; height: 44px; line-height: 1; border-radius: 8px; }
.nav__toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
iframe, video { max-width: 100%; }
table { display: block; max-width: 100%; overflow-x: auto; }
h1, h2, h3 { overflow-wrap: break-word; }
.grid > * { min-width: 0; }
/* desktop: 2nd-level menus open to the left so they never run off-screen */
@media (min-width: 992px) {
  .dropdown .dropdown { left: auto; right: 100%; }
}

@media (max-width: 1180px) {
  .nav__menu { gap: 0; }
  .nav__menu > li > a { padding: 12px 10px; font-size: 0.92rem; }
}

@media (max-width: 991px) {
  /* header & hamburger menu */
  .topbar__contact span:first-child { display: none; }
  .site-header .container { position: relative; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: var(--shadow-md);
    display: none;
    padding: 8px 0;
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__menu.open { display: flex; }
  .nav__menu > li { border-bottom: 1px solid var(--color-border); }
  .nav__menu > li:last-child { border-bottom: 0; }
  .nav__menu > li > a { padding: 14px 24px; font-size: 1rem; }
  .nav__menu .has-dropdown > a { display: flex; justify-content: space-between; align-items: center; }
  .nav__menu .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    min-width: 0;
    padding: 0 0 8px 16px;
    border-radius: 0;
  }
  .nav__menu .has-dropdown.open > .dropdown { display: block; }
  .nav__menu .dropdown li a { display: block; padding: 11px 24px; }
  .dropdown .dropdown { left: auto; }

  /* layout */
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero__art { order: -1; }
  .hero__art img { max-width: 260px; }
  .hero ul { text-align: left; display: inline-block; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid { gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
  .page-header { padding: 44px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .topbar__social { display: none; }
  .topbar .container { justify-content: center; }
  .topbar__contact { text-align: center; font-size: 0.8rem; }
  .topbar__contact span { margin: 0 6px; }
  .nav__logo img { height: 46px; }
  .hero { padding: 40px 0; }
  .hero__art img { max-width: 200px; }
  .section { padding: 48px 0; }
  .section-title { margin-bottom: 32px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  #gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stats { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding-top: 48px; }
  .footer-bottom { flex-direction: column; gap: 8px; padding-bottom: 80px; }
  .map-embed iframe { height: 260px; }
  .page-header { padding: 36px 0; }
  .back-to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 380px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  .btn { padding: 12px 22px; font-size: 0.92rem; }
  .topbar__contact span:nth-child(3) { display: none; }
}
