/* ============================================================
   COOLSCHOOL — COLLEGE OF LANGUAGES
   Custom CSS — Tailwind CDN handles utility classes
   ============================================================ */

/* 1. CSS Custom Properties */
:root {
  --brand-green: #0D1F3C;
  --brand-gold: #8B1A2B;
  /* Lighter variant of brand-gold (same hue/saturation, lifted lightness),
     used ONLY where gold text sits directly on a brand-green background.
     Base --brand-gold on brand-green measured 1.78:1 contrast (WCAG AA
     needs 4.5:1). This variant measures 4.79:1. Do not use on white/light
     backgrounds — base --brand-gold already passes there (9.21:1). */
  --brand-gold-on-dark: #E16073;
}

/* 2. Base */
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
::selection { background-color: var(--brand-green); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--brand-green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-gold); }
:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

/* 3. View routing */
[data-view] { display: none; }
[data-view].view-active { display: block; }

/* 4. Hover Shine */
.hover-shine { position: relative !important; overflow: hidden !important; }
.hover-shine::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  border-radius: inherit;
  background-image: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.45) 50%, transparent 75%, transparent 100%);
  background-size: 250% 250%, 100% 100%;
  background-position: 200% 0, 0 0;
  background-repeat: no-repeat;
  transition: background-position 0s ease;
  transition-duration: 1000ms;
  pointer-events: none;
}
.hover-shine:hover::before { background-position: -100% 0, 0 0; }

/* 5. Scroll-in animations */
.scroll-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.scroll-fade.visible { opacity: 1; transform: translateY(0); }

.scroll-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.scroll-left.visible { opacity: 1; transform: translateX(0); }

.scroll-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.scroll-right.visible { opacity: 1; transform: translateX(0); }

.scroll-up {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1.0s ease, transform 1.0s ease;
}
.scroll-up.visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: 0.15s; }
.d2 { transition-delay: 0.35s; }
.d3 { transition-delay: 0.55s; }
.d4 { transition-delay: 0.75s; }

/* 6. Load animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-in    { animation: fadeInUp 1.0s ease both; }
.anim-in-d2 { animation: fadeInUp 1.0s ease 0.3s both; }
.anim-in-d4 { animation: fadeInUp 1.0s ease 0.6s both; }

/* 7. Pulse dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.pulse-dot { animation: pulse 2s ease-in-out infinite; }

/* 8. Floating squares (offer section) */
@keyframes fltSq1 {
  from { opacity: 0; transform: translate(-100px, 100px) rotate(-45deg); }
  to   { opacity: 0.08; transform: translate(0, 0) rotate(0deg); }
}
@keyframes fltSq2 {
  from { opacity: 0; transform: translate(100px, 100px) rotate(45deg); }
  to   { opacity: 0.05; transform: translate(0, 0) rotate(12deg); }
}
@keyframes fltSq3 {
  from { opacity: 0; transform: translateY(-100px) rotate(90deg); }
  to   { opacity: 0.03; transform: translateY(0) rotate(45deg); }
}
.flt-sq1 { animation: fltSq1 2.2s ease-out both; }
.flt-sq2 { animation: fltSq2 2.6s ease-out 0.3s both; }
.flt-sq3 { animation: fltSq3 2.0s ease-out 0.6s both; }

/* 9. Navigation */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}
#main-nav.scrolled {
  background-color: var(--brand-green);
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1rem;
  display: flex; justify-content: space-between; align-items: center; height: 4rem;
}
@media (min-width: 1024px) { .nav-inner { padding: 0 2rem; } }

.nav-logo { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; border: none; background: none; padding: 0; }
.nav-logo-primary { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.nav-logo-sub { display: block; font-family: Inter, sans-serif; font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.25em; }

#main-nav:not(.scrolled) .nav-logo-primary,
#main-nav:not(.scrolled) .nav-logo-sub { color: var(--brand-green); }
#main-nav:not(.scrolled) .nav-logo-sub { color: #6b7280; }
#main-nav.scrolled .nav-logo-primary { color: #fff; }
#main-nav.scrolled .nav-logo-sub { color: #9ca3af; }

.nav-desktop { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }

.nav-link {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: Inter, sans-serif; font-size: 0.8125rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
  transition: color 0.2s;
}
#main-nav:not(.scrolled) .nav-link { color: var(--brand-green); }
#main-nav:not(.scrolled) .nav-link:hover { color: var(--brand-gold); }
#main-nav.scrolled .nav-link { color: #fff; }
#main-nav.scrolled .nav-link:hover { color: rgba(255,255,255,0.75); }

/* Nav tagline ("Łódź · od 1992"): white bg when not scrolled (base gold
   passes, 9.21:1), brand-green bg when scrolled (needs the safe variant). */
#main-nav:not(.scrolled) .nav-tagline { color: var(--brand-gold); }
#main-nav.scrolled .nav-tagline { color: var(--brand-gold-on-dark); }

/* Offer dropdown */
.nav-dropdown { position: relative; }
.nav-dd-menu {
  position: absolute; left: 0; top: calc(100% + 0.5rem);
  width: 13rem; background: #fff; color: #1f2937;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12); border: 1px solid #f3f4f6; padding: 0.5rem 0;
  opacity: 0; transform: scale(0.95); transform-origin: top left;
  pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.nav-dropdown:hover .nav-dd-menu { opacity: 1; transform: scale(1); pointer-events: auto; }
.dd-item {
  display: block; width: 100%; text-align: left; padding: 0.5rem 1rem;
  font-family: Inter, sans-serif; font-size: 0.75rem; font-weight: 600;
  border: none; background: none; cursor: pointer; color: inherit; text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.dd-item:hover { background: rgba(13,31,60,0.07); color: var(--brand-green); }

/* Language switcher */
.lang-sw { display: flex; align-items: center; gap: 0.25rem; border: 1px solid; border-color: rgba(13,31,60,0.2); padding: 0.25rem 0.5rem; }
#main-nav.scrolled .lang-sw { border-color: rgba(255,255,255,0.2); }
.lang-btn {
  background: none; border: none; cursor: pointer;
  padding: 0.125rem 0.375rem; border-radius: 2px;
  font-family: Inter, sans-serif; font-size: 0.6875rem; font-weight: 700;
  transition: background-color 0.15s, color 0.15s;
}
.lang-btn.active { background-color: var(--brand-gold); color: #fff; }
#main-nav:not(.scrolled) .lang-btn:not(.active) { color: rgba(13,31,60,0.55); }
#main-nav.scrolled .lang-btn:not(.active) { color: rgba(255,255,255,0.55); }

/* Mobile nav */
.mobile-btns { display: flex; align-items: center; gap: 0.75rem; }
@media (min-width: 1024px) { .mobile-btns { display: none; } }
.hamburger-btn { background: none; border: none; cursor: pointer; padding: 0.25rem; line-height: 0; }
#main-nav:not(.scrolled) .hamburger-btn { color: var(--brand-green); }
#main-nav.scrolled .hamburger-btn { color: #fff; }

#mobile-menu {
  display: none; background-color: var(--brand-green); color: #fff;
  border-top: 1px solid rgba(255,255,255,0.1);
}
#mobile-menu.open { display: block; }
.mob-link {
  display: block; width: 100%; text-align: left; padding: 0.875rem 1.25rem;
  font-family: Inter, sans-serif; font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: #fff;
  border: none; border-bottom: 1px solid rgba(255,255,255,0.07);
  background: none; cursor: pointer; text-decoration: none;
  transition: color 0.2s;
}
.mob-link:hover { color: var(--brand-gold); }

/* 10. Hero */
#hero {
  position: relative; min-height: 90vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--brand-green);
}
@media (min-width: 768px) { #hero { min-height: 100svh; } }
#hero-bg { position: absolute; inset: 0; will-change: transform; }
#hero-video { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh; transform: translate(-50%, -50%); pointer-events: none; border: 0; filter: brightness(0.7) contrast(1.05); }
#hero-overlay { position: absolute; inset: 0; background: rgba(13,31,60,0.55); backdrop-filter: blur(0.5px); }
.hero-live-badge {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 20;
  display: flex; align-items: center; gap: 0.375rem;
  background: rgba(13,31,60,0.8); backdrop-filter: blur(4px);
  padding: 0.3rem 0.625rem; border: 1px solid rgba(255,255,255,0.1);
  font-family: monospace; font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.1em; color: #d1d5db;
}

/* 11. Stats bar */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stats-item { padding-top: 1rem; }
@media (min-width: 768px) {
  .stats-item { padding-top: 0; border-left: 1px solid rgba(255,255,255,0.1); }
  .stats-item:first-child { border-left: none; }
}
.count-value {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.25rem; font-weight: 700; color: var(--brand-gold);
  display: block;
}
@media (min-width: 640px) { .count-value { font-size: 2.5rem; } }

/* 12. About image hover effect */
.about-img-wrap { position: relative; display: inline-block; width: 100%; }
.about-img-border {
  position: absolute; inset: -0.75rem;
  border: 1px solid var(--brand-gold); pointer-events: none; z-index: 1;
  transform: translate(6px, 6px); transition: transform 0.5s ease;
}
.about-img-wrap:hover .about-img-border { transform: translate(-6px, -6px); }
.about-badge {
  position: absolute; bottom: -1.25rem; right: -1.25rem; z-index: 10;
  background: #fff; padding: 0.875rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.125rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-left: 3px solid var(--brand-gold);
}

/* 13. Trophy stat boxes */
.trophy-box {
  border: 1px solid rgba(139,26,43,0.3); background: rgba(0,0,0,0.2);
  padding: 2rem; text-align: center; position: relative;
  transition: border-color 0.3s;
}
.trophy-box:hover { border-color: rgba(139,26,43,0.8); }
.tc { position: absolute; width: 8px; height: 8px; background: var(--brand-gold); }
.tc-tl { top: 0; left: 0; }
.tc-tr { top: 0; right: 0; }
.tc-bl { bottom: 0; left: 0; }
.tc-br { bottom: 0; right: 0; }

/* 14. Testimonial cards */
.testimonial-card { transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.testimonial-card:hover { transform: translateY(-6px); box-shadow: 0 15px 30px -5px rgba(13,31,60,0.08); }

/* 15. Teacher image hover */
.teacher-card { overflow: hidden; }
.teacher-card .tc-img { filter: grayscale(100%); transition: filter 0.7s ease, transform 0.7s ease; }
.teacher-card:hover .tc-img { filter: grayscale(0%); transform: scale(1.05); }
.tc-img-round { filter: grayscale(100%); transition: filter 0.7s ease, transform 0.7s ease; }
.teacher-card:hover .tc-img-round { filter: grayscale(0%); transform: scale(1.1); }

/* 16. Gallery lightbox */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.93); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
#lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: #fff; font-size: 2rem;
  cursor: pointer; line-height: 1; opacity: 0.7; transition: opacity 0.2s;
}
#lightbox-close:hover { opacity: 1; }
#lightbox-caption {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-family: Inter, sans-serif; font-size: 0.75rem; color: #d1d5db;
  white-space: nowrap; max-width: 80vw; overflow: hidden; text-overflow: ellipsis;
}

/* 17. Registration modal */
#modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 9000; display: none; align-items: center; justify-content: center; padding: 1rem;
}
#modal-overlay.open { display: flex; }
#modal-box {
  background: #fff; width: 100%; max-width: 32rem;
  max-height: 90vh; overflow-y: auto;
  position: relative; box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

/* 18. Cookie banner */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 8000;
  background: var(--brand-green); color: #fff;
  padding: 1.25rem 1.5rem; box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  display: block;
}
#cookie-banner.hidden { display: none !important; }

/* 19. Form inputs */
.fi { display: flex; flex-direction: column; gap: 0.375rem; }
.fi-label {
  font-family: Inter, sans-serif; font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-green);
}
.fi-input {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db; font-size: 0.8125rem;
  color: #1f2937; outline: none; font-family: Inter, sans-serif;
  background: #fff; transition: border-color 0.2s; border-radius: 0;
}
.fi-input:focus { border-color: var(--brand-green); box-shadow: 0 0 0 2px rgba(13,31,60,0.06); }
.fi-input::placeholder { color: #9ca3af; font-size: 0.75rem; }

/* 20. News teaser hover */
.news-teaser { transition: border-color 0.3s; }
.news-teaser:hover { border-color: rgba(139,26,43,0.4); }
.news-teaser:hover .news-title { color: var(--brand-gold); }

/* 20a. News body (expandable HTML content) */
.news-full-body { border-top: 1px solid #f0eeec; margin-top: -0.25rem; }
.news-body-inner { font-family: sans-serif; }
.nbi-p { font-size: 0.8125rem; color: #4b5563; line-height: 1.65; margin-bottom: 0.6rem; }
.nbi-accent { color: var(--brand-gold) !important; }
.nbi-h4 {
  font-family: serif; font-weight: 700; font-size: 0.8125rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--brand-green); margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.35rem; border-bottom: 2px solid var(--brand-gold);
}
.nbi-table-wrap { overflow-x: auto; margin-bottom: 0.5rem; }
.nbi-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; font-family: sans-serif; }
.nbi-table th {
  background: var(--brand-green); color: #fff;
  padding: 0.45rem 0.75rem; text-align: left;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.6875rem;
}
.nbi-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid #e5e7eb; color: #374151; }
.nbi-table tbody tr:nth-child(even) { background: #f9f8f7; }
.nbi-table tbody tr:hover { background: rgba(139,26,43,0.04); }
.nbi-cert-img {
  max-width: 380px; width: 100%; display: block;
  margin: 1.25rem auto 0; box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border: 1px solid #e5e7eb;
}
.news-expand-btn:hover { background: rgba(139,26,43,0.05) !important; }

/* 21. Accreditation badges */
.accred-badge {
  border: 1px solid rgba(13,31,60,0.1); background: rgba(13,31,60,0.05);
  padding: 0.75rem; text-align: center;
  display: flex; flex-direction: column; justify-content: center; min-height: 75px;
}

/* 22. Teacher spotlight (exams page) */
.teacher-spotlight { border: 1px solid rgba(139,26,43,0.4); transition: box-shadow 0.3s; }
.teacher-spotlight:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.1); }

/* 23. Section decorators */
.section-tag {
  font-family: Inter, sans-serif; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--brand-green); display: block;
}
.gold-rule { width: 3rem; height: 4px; background: var(--brand-gold); }
.gold-rule-sm { width: 1.5rem; height: 2px; background: var(--brand-gold); }

/* 24. Page headers (subview pages) */
.page-header {
  background: var(--brand-green);
  animation: fadeInUp 1.0s ease both;
  position: relative; overflow: hidden;
}
.page-header::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,26,43,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* 25. Exam card */
.exam-card { border: 1px solid #e5e7eb; transition: border-color 0.2s, box-shadow 0.2s; }
.exam-card:hover { border-color: rgba(13,31,60,0.2); box-shadow: 0 2px 10px rgba(0,0,0,0.04); }

/* 26. Spacing for fixed nav */
.pt-nav { padding-top: 4rem; }

/* 27. Offer cards slide */
.offer-card { border: 1px solid #e5e7eb; display: flex; flex-direction: column; justify-content: space-between; transition: border-color 0.3s, box-shadow 0.3s, opacity 1.0s ease, transform 1.0s ease; }
.offer-card:hover { border-color: rgba(13,31,60,0.25); box-shadow: 0 12px 30px rgba(0,0,0,0.07); }

/* 28. Level/Exam CEFR cards */
.level-cefr-card {
  background: #fff; border: 1px solid #e5e7eb;
  display: flex; flex-direction: column; gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.level-cefr-card:hover { border-color: rgba(13,31,60,0.2); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.level-card-head {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
}
.level-cefr-code {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem; font-weight: 900; line-height: 1; min-width: 3.5rem;
  color: var(--brand-gold);
}
.level-card-body { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.625rem; flex: 1; }
.level-detail-row { display: block; font-size: 0.75rem; font-family: Inter, sans-serif; line-height: 1.6; }
.level-detail-label { display: inline; font-weight: 700; color: var(--brand-green); }
.level-detail-val { color: #4b5563; }
.level-card-foot { padding: 1rem 1.5rem; border-top: 1px solid #f3f4f6; }

/* 29. Assessment notice box */
.assessment-box {
  border: 1px solid rgba(139,26,43,0.25); border-left: 4px solid var(--brand-gold);
  background: rgba(139,26,43,0.025); padding: 1.5rem 2rem;
}

/* 30. News category filter tabs */
.news-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.news-filter-btn {
  font-family: Inter, sans-serif; font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 0.5rem 1.25rem;
  border: 1px solid #e5e7eb; background: #fff; cursor: pointer; color: #6b7280;
  transition: all 0.15s;
}
.news-filter-btn:hover { border-color: var(--brand-green); color: var(--brand-green); }
.news-filter-btn.active { background: var(--brand-green); border-color: var(--brand-green); color: #fff; }

/* 31. Sidebar dark info box */
.sidebar-briefing {
  background: var(--brand-green); color: #fff; padding: 1.5rem;
}
.sidebar-briefing-title {
  font-family: Inter, sans-serif; font-size: 0.625rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand-gold-on-dark);
}
.sidebar-cal-entry {
  padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-cal-entry:last-child { border-bottom: none; }
.sidebar-cal-date { font-weight: 700; font-size: 0.75rem; color: var(--brand-gold); }
.sidebar-cal-name { font-size: 0.75rem; color: #fff; }
.sidebar-cal-note { font-size: 0.625rem; color: rgba(255,255,255,0.55); }
