/* AFOC Static Site - CSS approximation of original Squarespace design */
:root {
  --primary: #1a1a1a;
  --text: #333;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --accent: #c45c26;
  --header-height: 80px;
  --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* ========== HEADER ========== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 56px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #333;
  border-radius: 2px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: #f9f5f2;
}

.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-links a {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 16px;
}

.social-links a:hover {
  color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  height: 380px;
  background: #1a1a1a center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* ========== MAIN CONTENT ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 30px;
  color: #222;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 50px;
  align-items: start;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.intro-text p {
  margin-bottom: 1.2em;
  font-size: 1.05rem;
}

.intro-text .lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: #222;
}

.intro-text .muted {
  color: var(--text-light);
  font-size: 0.98rem;
}

.junta {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid #eee;
  font-size: 0.95rem;
  color: #555;
}

/* Gallery / Slider */
.gallery-box {
  position: relative;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.gallery-nav:hover {
  background: #fff;
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: #fff;
  overflow-x: auto;
}

.gallery-thumbs img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  border: 2px solid transparent;
}

.gallery-thumbs img.active,
.gallery-thumbs img:hover {
  opacity: 1;
  border-color: var(--accent);
}

/* ========== PAGES COMMON ========== */
.section {
  margin-bottom: 40px;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
  letter-spacing: 0.03em;
}

.list-events, .list-links, .list-forjadors {
  list-style: none;
}

.list-events li,
.list-forjadors li {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.list-events li:last-child,
.list-forjadors li:last-child {
  border-bottom: none;
}

.event-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-right: 10px;
  min-width: 110px;
}

.event-title {
  font-weight: 500;
}

/* Forjadors grid */
.forjadors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.forjador-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 16px 18px;
  transition: box-shadow 0.2s;
}

.forjador-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.forjador-card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: #222;
}

.forjador-card .loc {
  font-size: 0.9rem;
  color: #777;
}

/* Links page categories */
.links-cat {
  margin-bottom: 36px;
}

.links-cat h2 {
  background: #f5f5f5;
  padding: 10px 16px;
  margin: 0 0 12px;
  border-radius: 4px;
  font-size: 1.1rem;
}

.links-cat ul {
  list-style: none;
  padding-left: 8px;
}

.links-cat li {
  padding: 6px 0;
}

.links-cat a {
  color: #1a5a8a;
}

.links-cat a:hover {
  text-decoration: underline;
}

/* Contact */
.contact-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 28px;
  max-width: 520px;
}

.contact-box p {
  margin-bottom: 1em;
}

.contact-email {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}

.contact-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-block;
  background: #222;
  color: #fff !important;
  padding: 12px 28px;
  border: none;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent);
}

/* ========== FOOTER ========== */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 40px 20px 30px;
  margin-top: 60px;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand strong {
  color: #fff;
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #aaa;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1100px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
  }

  .social-links {
    margin-left: auto;
  }

  .hero {
    height: 260px;
  }

  .container {
    padding: 28px 16px;
  }

  .forjadors-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.note {
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
  margin-top: 1.5em;
}

/* Mapa original de Google My Maps d'AFOC */
.google-map-wrap {
  width: 100%;
  margin: 28px 0 36px;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
}
.google-map-wrap iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
}
.forjador-card .forjador-details {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.55;
}
.forjador-card .forjador-details div { margin: 3px 0; }
.forjador-card .forjador-details a { color: #555; word-break: break-word; }
.forjador-card .forjador-details a:hover { color: var(--accent); }
@media (max-width: 768px) { .google-map-wrap iframe { height: 500px; } }
