/* ==========================================================================
   EXPONENCE EDTECH PLATFORM - COMPONENTS CSS
   Theme: Light Theme (Clean White & Slate)
   Colors: Vibrant Orange (Primary) & Electric Blue (Complementary Secondary)
   ========================================================================== */

/* Announcement Top Bar */
.announcement-bar {
  background: linear-gradient(90deg, #fff7ed 0%, #eff6ff 100%);
  border-bottom: 1px solid rgba(255, 107, 0, 0.15);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  text-align: center;
  position: relative;
  z-index: 101;
  color: var(--text-main);
}

.announcement-bar span {
  color: var(--text-muted);
}

.announcement-bar a {
  color: var(--orange-primary);
  font-weight: 600;
  margin-left: 0.5rem;
}

.announcement-bar a:hover {
  color: var(--blue-complementary);
}

/* Site Header Nav */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-highlight);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--grad-orange-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px var(--orange-glow);
}

/* Desktop Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--orange-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange-primary);
  border-radius: 2px;
}

/* Paid Highlight Link Pill */
.nav-link-paid {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  color: var(--orange-primary) !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.12);
  animation: pulse-paid 3s infinite alternate;
}

@keyframes pulse-paid {
  0% { box-shadow: 0 2px 8px rgba(255, 107, 0, 0.12); }
  100% { box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3); }
}

.nav-link-paid:hover {
  background: var(--orange-primary);
  color: #ffffff !important;
}

/* Mega Menu Dropdown */
.has-dropdown {
  position: relative;
}

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 740px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 120;
}

.has-dropdown:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.mega-group h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mega-item {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.mega-item:hover {
  background: #fff7ed;
  color: var(--orange-primary);
  padding-left: 0.85rem;
}

.mega-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: #ffffff;
  z-index: 200;
  padding: 2rem 1.5rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  transition: right var(--transition-normal);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.close-drawer {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Subject & Segment Cards */
.segment-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  height: 100%;
  box-shadow: var(--shadow-sm);
}

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

.segment-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.segment-card-paid .segment-icon {
  background: #eff6ff;
  color: var(--blue-complementary);
}

.segment-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.segment-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Resource Item Card */
.resource-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.resource-card:hover {
  border-color: var(--blue-complementary);
  box-shadow: var(--shadow-md);
}

.resource-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-highlight);
}

.resource-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* Filter Controls UI */
.filter-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.filter-select, .search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus, .search-input:focus {
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

/* Modal Reader Drawer */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
}

.modal-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

/* Site Footer (Clean Dark Slate contrast for strong professional structure) */
.site-footer {
  background: #0f172a;
  color: #f8fafc;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.site-footer p {
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--orange-bright);
  padding-left: 0.3rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #64748b;
}

@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
