/* ========================================
   Costa Brava Guides / About Girona
   Mediterranean Watercolor Theme
   ======================================== */

:root {
  --cream: #f5efe0;
  --sand: #dcd7ca;
  --terracotta: #cd2653;
  --dark: #1a1a2e;
  --text: #333;
  --text-light: #6d6d6d;
  --white: #fff;
  --sea-blue: #1b6ca8;
  --sea-light: #4a9bd9;
  --olive: #5a7247;
  --warm-orange: #e8915a;
  --cbg-dark: #0d3b54;
  --cbg-green: #2d8f5e;
  --radius: 12px;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  line-height: 1.25;
  color: var(--dark);
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--sea-blue); }

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

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

/* ---- HEADER / NAV ---- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--dark);
}

.site-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.site-brand h1 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.site-brand .brand-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-main {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-main a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-main a:hover,
.nav-main a.active {
  background: var(--cream);
  color: var(--terracotta);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: var(--transition);
}

/* ---- HERO ---- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--cream) 0%, #e8dcc8 50%, #d4e4d9 100%);
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 16px;
  color: var(--dark);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ---- ICON SPRITE SYSTEM ---- */
/*
  Icon packs are PNG sprite sheets:
  - icons-coastal.png: 3x3 grid (1024px = ~341px per icon)
  - icons-nature.png: 2x2 grid (1024px = ~512px per icon)
  - icons-scenes.png: 2x2+1 layout (irregular)
  - icons-delights.png: 3x3-ish grid
  - icons-beach.png: 2x2 grid
*/

.wc-icon {
  display: inline-block;
  background-size: 300% 300%; /* 3x3 grid default */
  background-repeat: no-repeat;
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.wc-icon--lg {
  width: 120px;
  height: 120px;
}

.wc-icon--xl {
  width: 160px;
  height: 160px;
}

/* Coastal icons (3x3 grid) */
.wc-icon--coastal { background-image: url('../images/icons-coastal.png'); }
.wc-icon--sailboat    { background-position: 0% 0%; }
.wc-icon--agave       { background-position: 50% 0%; }
.wc-icon--castle      { background-position: 100% 0%; }
.wc-icon--shell       { background-position: 0% 50%; }
.wc-icon--umbrella    { background-position: 50% 50%; }
.wc-icon--parasol     { background-position: 100% 50%; }
.wc-icon--buoy        { background-position: 0% 100%; }
.wc-icon--waves       { background-position: 50% 100%; }
.wc-icon--olives      { background-position: 100% 100%; }

/* Nature icons (2x2 grid) */
.wc-icon--nature { background-image: url('../images/icons-nature.png'); background-size: 200% 200%; }
.wc-icon--octopus { background-position: 0% 0%; }
.wc-icon--gecko   { background-position: 100% 0%; }
.wc-icon--fish    { background-position: 0% 100%; }
.wc-icon--cactus  { background-position: 100% 100%; }

/* Scenes icons (custom layout - 2 top, 2 middle, 1 bottom) */
.wc-icon--scenes { background-image: url('../images/icons-scenes.png'); background-size: 200% 250%; }
.wc-icon--church     { background-position: 0% 0%; }
.wc-icon--dali-house { background-position: 100% 0%; }
.wc-icon--speedboat  { background-position: 0% 50%; }
.wc-icon--beach-view { background-position: 100% 50%; }
.wc-icon--ruins      { background-position: 50% 100%; }

/* Delights icons (irregular grid ~3x3) */
.wc-icon--delights { background-image: url('../images/icons-delights.png'); background-size: 300% 300%; }
.wc-icon--couple      { background-position: 0% 0%; }
.wc-icon--windsurf    { background-position: 50% 0%; }
.wc-icon--olives2     { background-position: 100% 0%; }
.wc-icon--paella      { background-position: 0% 50%; }
.wc-icon--sardine     { background-position: 100% 50%; }
.wc-icon--ham         { background-position: 100% 50%; }
.wc-icon--tomato      { background-position: 0% 100%; }
.wc-icon--bread       { background-position: 50% 100%; }

/* ---- SECTIONS ---- */
section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
  padding: 20px 0;
}

.section-divider .wc-icon {
  width: 40px;
  height: 40px;
  opacity: 0.6;
}

.section-divider::before,
.section-divider::after {
  content: '';
  height: 1px;
  width: 80px;
  background: var(--sand);
}

/* ---- BLOG CARDS ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.blog-card__icon-bar {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-card__icon-bar .wc-icon {
  width: 120px;
  height: 120px;
}

.blog-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.blog-card__cat {
  background: var(--cream);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terracotta);
}

.blog-card__title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-card__title a {
  color: var(--dark);
}
.blog-card__title a:hover {
  color: var(--terracotta);
}

.blog-card__excerpt {
  color: var(--text-light);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.6;
}

.blog-card__link {
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-card__link::after {
  content: '\2192';
  transition: transform var(--transition);
}

.blog-card:hover .blog-card__link::after {
  transform: translateX(4px);
}

/* Card icon-bar color variations */
.blog-card--food .blog-card__icon-bar { background: linear-gradient(135deg, #fef3e6, #fde8d0); }
.blog-card--culture .blog-card__icon-bar { background: linear-gradient(135deg, #e6f0f8, #d0e4f5); }
.blog-card--places .blog-card__icon-bar { background: linear-gradient(135deg, #e8f5e9, #d0edce); }
.blog-card--opinion .blog-card__icon-bar { background: linear-gradient(135deg, #f3e8f9, #e8d5f5); }
.blog-card--guide .blog-card__icon-bar { background: linear-gradient(135deg, #fff8e1, #ffecb3); }

/* ---- BLOG POST (full article) ---- */
.post-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(135deg, var(--cream) 0%, #e8dcc8 100%);
}

.post-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 800px;
  margin: 0 auto 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-light);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-meta .cat {
  background: var(--terracotta);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

.post-content p {
  margin-bottom: 1.5em;
}

.post-content h2 {
  font-size: 1.6rem;
  margin: 2em 0 0.8em;
}

.post-content h3 {
  font-size: 1.3rem;
  margin: 1.8em 0 0.6em;
}

.post-content blockquote {
  border-left: 4px solid var(--terracotta);
  padding: 16px 24px;
  margin: 1.5em 0;
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

.post-content ul, .post-content ol {
  margin: 1em 0 1.5em 1.5em;
}

.post-content li {
  margin-bottom: 0.5em;
}

.post-content .info-box {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 24px;
  margin: 2em 0;
}

.post-content .info-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  margin-bottom: 8px;
}

.post-icon-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---- COSTA BRAVA GUIDES SECTION ---- */
.cbg-section {
  background: var(--cbg-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cbg-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--cbg-dark) 0%, #164f6e 50%, #1a5c40 100%);
  opacity: 0.95;
}

.cbg-section > * { position: relative; z-index: 1; }

.cbg-section .section-header h2 { color: var(--white); }
.cbg-section .section-header p { color: rgba(255,255,255,0.7); }

.cbg-logo {
  width: 260px;
  margin: 0 auto 32px;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.guide-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.guide-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.guide-card .wc-icon {
  margin: 0 auto 16px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
}

.guide-card h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.guide-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  line-height: 1.5;
}

.guide-card__link {
  display: inline-block;
  margin-top: 16px;
  color: var(--warm-orange);
  font-weight: 600;
  font-size: 0.85rem;
}

.guide-card__link:hover {
  color: #ffb88a;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--terracotta);
  color: var(--white);
}
.btn--primary:hover {
  background: #b81e45;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(205, 38, 83, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.btn--dark {
  background: var(--dark);
  color: var(--white);
}

/* ---- BLOG LISTING PAGE ---- */
.page-header {
  padding: 48px 0 32px;
  background: linear-gradient(135deg, var(--cream) 0%, #e8dcc8 100%);
}

.page-header h1 {
  font-size: 2.5rem;
}

.page-header p {
  color: var(--text-light);
  margin-top: 8px;
  font-size: 1.05rem;
}

/* ---- POST NAV ---- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
  border-top: 1px solid var(--sand);
  padding-top: 32px;
}

.post-nav a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-main { display: none; }
  .nav-toggle { display: block; }

  body.nav-open .nav-main {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--sand);
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .hero { padding: 48px 0 40px; }
  .hero-icons { gap: 12px; }
  .hero-icons .wc-icon { width: 56px; height: 56px; }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .post-content { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .guides-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 12px 16px; }
  .site-brand h1 { font-size: 1.1rem; }
}
