/* ================================================================
   Fotógrafos Barcelona – style.css
   Fast, mobile-first, no external dependencies
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --primary:       #1c1c2e;
  --primary-light: #2d2d44;
  --accent:        #f4a261;
  --accent-hover:  #e76f51;
  --bg:            #ffffff;
  --bg-light:      #f7f7fb;
  --text:          #1a1a1a;
  --text-muted:    #666;
  --border:        #e5e5e5;
  --star:          #fbbf24;
  --success:       #16a34a;
  --error:         #dc2626;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.10);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --radius:        10px;
  --radius-lg:     16px;
  --transition:    .2s ease;
  --container:     1120px;
  --font:          'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul   { list-style: none; }

/* ── Container ──────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .65rem 1.4rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-lg  { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm  { padding: .4rem .9rem; font-size: .85rem; }

/* ── Cookie Banner ──────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: var(--primary); color: #e5e5e5;
  padding: 1rem 0; box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}
.cookie-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-inner p { flex: 1; font-size: .9rem; }
.cookie-inner a { color: var(--accent); }
.cookie-actions { display: flex; gap: .75rem; flex-shrink: 0; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo img { height: 38px; width: auto; }

.main-nav { display: flex; gap: 2rem; }
.nav-link { color: rgba(255,255,255,.8); font-weight: 500; font-size: .95rem; transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--accent); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 520px;
  display: flex; align-items: center;
  background: var(--primary) center/cover no-repeat;
  color: #fff;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(28,28,46,.85) 0%, rgba(28,28,46,.55) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding: 5rem 20px;
  text-align: left;
  max-width: 700px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 1rem;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; opacity: .9; margin-bottom: 2rem; }

/* Page hero variants */
.page-hero {
  position: relative; min-height: 260px;
  display: flex; align-items: center;
  background: var(--primary) center/cover no-repeat;
  color: #fff; text-align: center;
}
.page-hero .container { position: relative; z-index: 1; padding: 4rem 20px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .5rem; }
.page-hero p  { opacity: .85; font-size: 1.05rem; }
.page-hero-sm  { min-height: 200px; }
.page-hero-dark { background: var(--primary); }

/* ── Trust bar ──────────────────────────────────────────────────── */
.trust-bar { background: var(--accent); color: var(--primary); padding: .75rem 0; }
.trust-inner {
  display: flex; justify-content: center; align-items: center;
  gap: 2.5rem; flex-wrap: wrap; text-align: center;
}
.trust-item { font-size: .9rem; font-weight: 500; }
.trust-item strong { display: block; font-size: 1.3rem; font-weight: 700; }

/* ── Sections ───────────────────────────────────────────────────── */
.ranking-section, .blog-preview-section { padding: 4rem 0; }
.info-section  { padding: 4rem 0; }
.bg-light { background: var(--bg-light); }

.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: .5rem; }
.section-sub   { color: var(--text-muted); margin-bottom: 2.5rem; }
.text-center   { text-align: center; }
.mt-4 { margin-top: 1.5rem; }

/* ── Photographer cards ─────────────────────────────────────────── */
.ranking-list { display: flex; flex-direction: column; gap: 1.25rem; }

.photographer-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 48px 180px 1fr auto;
  gap: 0;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.photographer-card:hover { box-shadow: var(--shadow); }
.card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.card-rank {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-light);
  font-size: 1.4rem; font-weight: 700; color: var(--text-muted);
  border-right: 1px solid var(--border);
  min-width: 48px;
}
.card-featured .card-rank { background: var(--accent); color: #fff; }

.card-image {
  position: relative; overflow: hidden;
  width: 180px; flex-shrink: 0;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.photographer-card:hover .card-image img { transform: scale(1.04); }
.card-badge {
  position: absolute; top: 10px; left: 0;
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .25rem .6rem .25rem .8rem;
  border-radius: 0 6px 6px 0;
}

.card-body {
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; justify-content: center;
  gap: .4rem; min-width: 0;
}
.card-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }
.card-specialty { color: var(--accent); font-weight: 600; }
.card-response  { color: var(--text-muted); }

.card-name { font-size: 1.2rem; font-weight: 700; }
.card-name a { color: var(--text); }
.card-name a:hover { color: var(--accent); text-decoration: none; }

.card-rating { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.stars { display: flex; gap: 1px; }
.star { font-size: 1rem; }
.star.full  { color: var(--star); }
.star.half  { color: var(--star); opacity: .7; }
.star.empty { color: var(--border); }
.rating-num   { font-weight: 700; font-size: .95rem; }
.rating-count { color: var(--text-muted); font-size: .85rem; }

.card-desc  { font-size: .9rem; color: var(--text-muted); line-height: 1.5; }
.card-tags  { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 20px; padding: .15rem .7rem;
  font-size: .78rem; color: var(--text-muted);
}

.card-action {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-left: 1px solid var(--border);
  min-width: 160px;
  background: var(--bg-light);
}
.card-price { font-size: 1rem; font-weight: 600; }
.price-tier .dim { opacity: .3; }
.affiliate-notice { font-size: .7rem; color: var(--text-muted); }

/* ── Info section ───────────────────────────────────────────────── */
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.info-text h2    { font-size: 1.75rem; margin-bottom: 1rem; }
.info-text p     { color: var(--text-muted); margin-bottom: .75rem; }
.info-criteria   { display: flex; flex-direction: column; gap: 1rem; }
.criteria-item   { display: flex; align-items: flex-start; gap: 1rem; }
.criteria-icon   { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.criteria-item strong { display: block; font-size: 1rem; }
.criteria-item p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ── Blog preview ───────────────────────────────────────────────── */
.blog-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-preview-card {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); display: block; color: var(--text);
  transition: box-shadow var(--transition);
}
.blog-preview-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.blog-preview-card img { width: 100%; height: 200px; object-fit: cover; }
.bp-body { padding: 1.25rem; }
.bp-cat { font-size: .8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.bp-body h3 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
.bp-body p  { font-size: .88rem; color: var(--text-muted); }

/* ── Blog index ─────────────────────────────────────────────────── */
.blog-section { padding: 4rem 0; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow); }
.blog-card-img-link { display: block; overflow: hidden; }
.blog-card-img-link img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-card-img-link img { transform: scale(1.04); }
.blog-card-body { padding: 1.25rem; }
.post-date { font-size: .8rem; color: var(--text-muted); }
.blog-card-title { font-size: 1.1rem; margin: .4rem 0 .5rem; }
.blog-card-title a { color: var(--text); }
.blog-card-title a:hover { color: var(--accent); text-decoration: none; }
.blog-card-excerpt { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; }
.read-more { font-size: .9rem; font-weight: 600; color: var(--accent); }
.empty-msg { color: var(--text-muted); font-size: 1.1rem; text-align: center; padding: 4rem 0; }

/* ── Blog post ──────────────────────────────────────────────────── */
.post-hero {
  position: relative; min-height: 420px;
  display: flex; align-items: flex-end;
  background: var(--primary) center/cover no-repeat; color: #fff;
}
.post-hero-content { position: relative; z-index: 1; padding-bottom: 3rem; }
.post-title   { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .5rem 0; max-width: 800px; }
.post-excerpt { font-size: 1.05rem; opacity: .85; max-width: 700px; }

.post-layout {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 3rem; padding: 3rem 20px; max-width: var(--container); margin: 0 auto;
}
.post-content { min-width: 0; }
.post-content h2 { font-size: 1.6rem; margin: 2rem 0 .75rem; }
.post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
.post-content p  { margin-bottom: 1rem; line-height: 1.8; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: .4rem; line-height: 1.7; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content a { color: var(--accent); }
.post-content strong { font-weight: 600; }
.post-content blockquote {
  border-left: 4px solid var(--accent); margin: 1.5rem 0;
  padding: .75rem 1.25rem; background: var(--bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-muted);
}

.post-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-box {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.sidebar-box h3 { font-size: 1rem; margin-bottom: .5rem; }
.sidebar-box p  { font-size: .88rem; color: var(--text-muted); margin-bottom: 1rem; }

.back-link-wrap { padding: .5rem 20px 3rem; }
.back-link { color: var(--text-muted); font-size: .9rem; }
.back-link:hover { color: var(--accent); }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-section { padding: 4rem 0; }
.contact-layout  { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-form-wrap h2 { margin-bottom: 1.5rem; }

.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius);
  margin-bottom: 1.25rem; font-size: .95rem;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group label span { color: var(--accent); }
.form-group input,
.form-group textarea {
  padding: .7rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: var(--font);
  background: var(--bg); color: var(--text);
  transition: border-color var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244,162,97,.15);
}
.form-privacy { font-size: .8rem; color: var(--text-muted); }
.form-privacy a { color: var(--accent); }

.contact-info h2 { margin-bottom: 1rem; }
.contact-reasons { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.contact-reasons li { font-size: .95rem; }
.contact-reply { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.contact-img  { border-radius: var(--radius-lg); width: 100%; }

/* ── Privacy / Legal ────────────────────────────────────────────── */
.legal-section { padding: 4rem 0; }
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h2 { font-size: 1.3rem; margin: 2.5rem 0 .75rem; }
.legal-content p  { margin-bottom: 1rem; line-height: 1.8; color: var(--text-muted); }
.legal-content ul { margin: .5rem 0 1rem 1.5rem; }
.legal-content ul li { margin-bottom: .4rem; font-size: .95rem; color: var(--text-muted); }
.legal-content a  { color: var(--accent); }

.cookie-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .88rem; }
.cookie-table th, .cookie-table td { border: 1px solid var(--border); padding: .6rem .9rem; text-align: left; }
.cookie-table th { background: var(--bg-light); font-weight: 600; }
.cookie-table code { font-size: .82rem; background: var(--bg-light); padding: .1em .4em; border-radius: 4px; }

/* ── 404 ─────────────────────────────────────────────────────────── */
.error-section  { padding: 6rem 0; text-align: center; }
.error-code     { font-size: 7rem; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.error-title    { font-size: 2rem; margin-bottom: .75rem; }
.error-msg      { color: var(--text-muted); margin-bottom: 2rem; }
.error-actions  { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer  { background: var(--primary); color: rgba(255,255,255,.75); padding: 3.5rem 0 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 3rem; }
.logo-footer img { height: 34px; width: auto; margin-bottom: .75rem; }
.footer-desc { font-size: .88rem; margin-top: .5rem; }
.footer-nav h3, .footer-info h3 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.footer-nav ul  { display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a   { font-size: .9rem; color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-nav a:hover { color: var(--accent); text-decoration: none; }
.footer-info p  { font-size: .85rem; line-height: 1.6; margin-bottom: .75rem; }
.footer-copy    { font-size: .8rem; opacity: .5; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .photographer-card { grid-template-columns: 40px 140px 1fr; }
  .card-action { display: none; }
  .info-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .post-layout  { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .photographer-card { grid-template-columns: 40px 1fr; }
  .card-image { display: none; }
  .main-nav   { display: none; flex-direction: column; gap: 0; }
  .main-nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--primary-light); padding: 1rem 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
  }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .trust-inner  { gap: 1.25rem; }
  .hero-content { text-align: center; margin: 0 auto; }
}
