/* =============================================
   SHARED.CSS — Estils comuns Projecte Share
   ============================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --red: #E32219;
  --red-dark: #B81912;
  --dark: #1A1C1E;
  --dark2: #2C2F33;
  --text: #4A4E54;
  --text-light: #7A7F88;
  --bg: #F7F5F2;
  --white: #FEFEFE;
  --border: rgba(0,0,0,0.07);
  --font: 'Poppins', sans-serif;
  --serif: 'Playfair Display', serif;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.12);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* =====================
   NAVIGATION
   ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 5%;
  transition: padding 0.4s ease;
}
.nav.scrolled,
.nav.force-solid { padding: 12px 5%; }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  border-radius: 100px;
  padding: 10px 0;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
  background: transparent;
  box-shadow: none;
}

.nav.scrolled .nav-inner,
.nav.force-solid .nav-inner {
  background: rgba(252,251,249,0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 2px 24px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.5);
  padding: 10px 32px;
}

.nav.force-solid { padding-top: 20px; }

.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.4s ease;
  text-decoration: none;
}
.nav-logo span { color: var(--red); }
.nav.scrolled .nav-logo,
.nav.force-solid .nav-logo { color: var(--dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.92);
  transition: color 0.4s ease;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav.scrolled .nav-links a,
.nav.force-solid .nav-links a { color: var(--dark); }

.nav-cta {
  background: var(--red) !important;
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  transition: background 0.3s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

/* Botó secundari nav (outline) — pàgines interiors */
.nav-cta-outline {
  border: 1.5px solid var(--dark);
  color: var(--dark) !important;
  padding: 7px 20px;
  border-radius: 100px;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s !important;
}
.nav-cta-outline:hover {
  background: var(--dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.nav-cta-outline::after { display: none !important; }

/* ── GTranslate: botó globus (pàgines interiors) ── */
.nav-lang {
  display: flex;
  align-items: center;
  margin-left: 4px;
  position: relative;
}
.nav-lang::after { display: none !important; }

/* =====================
   PAGE HERO (interior)
   ===================== */
.page-hero {
  position: relative;
  padding: 160px 5% 80px;
  background: var(--dark);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,28,30,0.6) 0%, rgba(26,28,30,0.85) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.page-hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}

.page-hero-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: #fff;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero-title em { font-style: italic; color: var(--red); }

.page-hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  line-height: 1.75;
}

/* =====================
   LAYOUT COMMONS
   ===================== */
.section { padding: 100px 5%; }
.section-inner { max-width: 1280px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--dark);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.section-title em { font-style: italic; color: var(--red); }

.section-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 560px;
  margin-top: 14px;
  line-height: 1.8;
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  padding: 15px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s;
  box-shadow: 0 6px 24px rgba(227,34,25,0.3);
  text-decoration: none;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(227,34,25,0.4); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
  border: 2px solid var(--dark);
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-outline:hover { background: var(--dark); color: #fff; transform: translateY(-2px); }

.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  padding: 16px 36px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 8px 32px rgba(227,34,25,0.4);
  text-decoration: none;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(227,34,25,0.5); }

/* =====================
   SCROLL ANIMATIONS
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =====================
   PLACEHOLDER PHOTOS
   ===================== */
.ph-africa { background: linear-gradient(135deg, #5c3a1e, #8b5a2b); }
.ph-group  { background: linear-gradient(135deg, #2d4a5c, #3d6b85); }
.ph-school { background: linear-gradient(135deg, #4a5c2d, #6b8540); }
.ph-dark   { background: linear-gradient(135deg, #1a1c1e, #2c2f33); }
.ph-red    { background: linear-gradient(135deg, #b81912, #e32219); }

.photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  font-family: monospace;
  letter-spacing: 0.5px;
  line-height: 1.5;
  background-image: repeating-linear-gradient(45deg,rgba(255,255,255,0.03) 0,rgba(255,255,255,0.03) 1px,transparent 0,transparent 50%);
  background-size: 20px 20px;
}

/* =====================
   3D TILT / FLOAT IMAGES
   ===================== */
@keyframes floatImg {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  30%     { transform: translateY(-10px) rotate(0.4deg); }
  70%     { transform: translateY(-6px) rotate(-0.3deg); }
}

.tilt-img {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: default;
  transform-style: preserve-3d;
  animation: floatImg 5.5s ease-in-out infinite;
  will-change: transform;
  transition: box-shadow 0.3s ease;
}

/* =====================
   PAGINATION (shared)
   ===================== */
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  font-family: var(--font);
}
.page-num:hover,
.page-num.active { background: var(--red); border-color: var(--red); color: #fff; }

/* =====================
   FOOTER
   ===================== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 60px 5% 32px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand h3 span { color: var(--red); }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; margin-bottom: 20px; }

.footer-social { display: flex; gap: 10px; }
.footer-social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: all 0.3s;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.footer-social-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

.footer-col h4 {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.5); transition: color 0.3s; }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); transition: color 0.3s; }
.footer-bottom a:hover { color: #fff; }
