/* =====================================================
   SAINT-JOSEPH SCHOOL — REDESIGN 2026
   ===================================================== */

/* Reset & Variables */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0f3f0f;
  --primary-light: #1a5a1a;
  --primary-pale: #e8f5e9;
  --gold: #d4a574;
  --dark: #1a1a2e;
  --text: #3a3a4a;
  --text-light: #6b7280;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --border: #e5e7eb;
  --footer-bg: #1f2937;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* =====================================================
   HEADER
   ===================================================== */
header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img {
  height: 48px;
  transition: transform var(--transition);
}

.logo-link:hover img {
  transform: scale(1.05);
}

/* Desktop Nav */
.nav-desktop ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-desktop a {
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--primary);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 60%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: var(--white);
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  z-index: 10001;
  position: fixed;
  top: 0.85rem;
  right: 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav Overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 10000;
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
}

.nav-mobile-overlay.active {
  display: block;
}

.nav-mobile-overlay ul {
  list-style: none;
}

.nav-mobile-overlay a {
  display: block;
  padding: 1.1rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), padding-left var(--transition);
}

.nav-mobile-overlay a:hover,
.nav-mobile-overlay a.active {
  color: var(--primary);
  padding-left: 0.5rem;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  background: var(--primary);
  color: var(--white);
  padding: 5rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-location {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 2.25rem;
}

.hero-desc .hl {
  color: var(--gold);
  font-weight: 600;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover {
  background: var(--off-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.btn-green {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-green:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(15,63,15,0.25);
}

.btn-outline-green {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-green:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-link {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  border-bottom: 1.5px solid transparent;
  transition: all var(--transition);
}
.btn-link:hover {
  border-bottom-color: var(--primary);
}
.btn-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}
.btn-link:hover svg {
  transform: translateX(3px);
}

/* =====================================================
   SCHOOL ILLUSTRATION
   ===================================================== */
.illustration-wrap {
  display: flex;
  justify-content: center;
  padding: 0 2rem;
  margin-top: -3.5rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.illustration-wrap img {
  max-width: 680px;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}

.illustration-wrap img:hover {
  transform: translateY(-4px) scale(1.01);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
  padding: 5rem 2rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section--white { background: var(--white); }
.section--gray  { background: var(--off-white); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-header .subtitle {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 500;
}

/* Decorative line under h2 */
.section-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin: 0.75rem auto 0;
  border-radius: 3px;
}

/* =====================================================
   OPEN DAY (split layout)
   ===================================================== */
.openday-section {
  padding: 4rem 2rem;
}

.openday-split {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.openday-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.openday-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.openday-photo:hover img {
  transform: scale(1.03);
}

.openday-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(transparent, rgba(15, 63, 15, 0.85));
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

.openday-content {
  padding: 1rem 0;
}

.openday-badge {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.openday-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.openday-date-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.openday-date-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.openday-date-main {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.openday-date-time {
  font-size: 0.92rem;
  color: var(--text-light);
}

.openday-desc {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* =====================================================
   MOSAIC PHOTO GRID
   ===================================================== */
.mosaic-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.mosaic-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.mosaic-item:hover img {
  transform: scale(1.05);
}

.mosaic-large {
  min-height: 340px;
}

.mosaic-tall {
  min-height: 340px;
}

.mosaic-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(15, 63, 15, 0.8));
  color: var(--white);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.mosaic-item:hover .mosaic-overlay {
  transform: translateY(0);
}

.mosaic-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.4rem;
}

.mosaic-overlay p {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.95;
}

/* =====================================================
   INFO CARDS
   ===================================================== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.info-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.info-card:hover::before {
  transform: scaleX(1);
}

.info-icon {
  width: 56px;
  height: 56px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: all var(--transition);
  color: var(--primary);
}

.info-card:hover .info-icon {
  background: var(--primary);
  color: var(--white);
}

.info-card h3 {
  font-size: 1.05rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.info-card .detail {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.info-card .accent {
  color: var(--primary);
  font-weight: 600;
}

/* =====================================================
   PARCOURS CARDS
   ===================================================== */
.parcours-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.parcours-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.parcours-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.parcours-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.parcours-card:hover::after {
  transform: scaleX(1);
}

.parcours-card h3 {
  font-size: 1.15rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.parcours-card h3 .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-pale);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.parcours-card .desc {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.parcours-list {
  list-style: none;
}

.parcours-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.parcours-list li .dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* =====================================================
   VALUES
   ===================================================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: default;
}

.value-card:hover {
  background: var(--off-white);
  transform: translateY(-4px);
}

.value-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--primary);
  transition: all var(--transition);
}

.value-card:hover .value-icon {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
}

.value-card h3 {
  font-size: 1.05rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto;
}

/* =====================================================
   CTA
   ===================================================== */
.cta {
  background: var(--primary);
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.04), transparent 70%);
  pointer-events: none;
}

.cta-inner {
  max-width: 650px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 2.25rem;
  font-size: 1.05rem;
}

.cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: var(--footer-bg);
  color: var(--white);
  padding: 3.5rem 2rem 1.5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.footer-col p {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

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

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity var(--transition), padding-left var(--transition);
}

.footer-col ul a:hover {
  opacity: 1;
  padding-left: 0.3rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.social-link svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.5;
}

/* =====================================================
   SCROLL TO TOP
   ===================================================== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(15,63,15,0.35);
  transition: all var(--transition);
}

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(15,63,15,0.4);
  background: var(--primary-light);
}

.scroll-top.visible {
  display: flex;
}

/* =====================================================
   ANIMATE ON SCROLL
   ===================================================== */
.animate-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-item:nth-child(2) { transition-delay: 0.1s; }
.animate-item:nth-child(3) { transition-delay: 0.2s; }
.animate-item:nth-child(4) { transition-delay: 0.3s; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0 1.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .openday-split {
    gap: 2rem;
  }

  .openday-photo img {
    height: 320px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .info-grid,
  .parcours-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .openday-split {
    grid-template-columns: 1fr;
  }

  .openday-photo img {
    height: 280px;
  }

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

  .mosaic-large,
  .mosaic-tall {
    min-height: 260px;
  }

  /* Show overlay on touch devices */
  .mosaic-overlay {
    transform: translateY(0);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0 1rem;
    height: 60px;
  }

  .logo-link img {
    height: 40px;
  }

  .hero {
    padding: 3.5rem 1.25rem 5rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-btns,
  .cta-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .openday-section {
    padding: 3rem 1.25rem;
  }

  .openday-photo img {
    height: 220px;
  }

  .mosaic-large,
  .mosaic-tall {
    min-height: 200px;
  }

  .illustration-wrap {
    padding: 0 1rem;
    margin-top: -2.5rem;
    margin-bottom: 3rem;
  }

  .section-header h2 {
    font-size: 1.35rem;
  }

  .cta {
    padding: 3.5rem 1.25rem;
  }
}
