html {
  background-color: var(--primary-bg);
}

:root {
  --primary-bg: #050505;
  --secondary-bg: #111111;
  --text-main: #f0f0f0;
  --text-muted: #888888;
  --accent: #E63946;
  /* Vibrant Red */
  --accent-hover: #ff4d5a;
  --accent-glow: rgba(230, 57, 70, 0.1);

  /* Centralized Font Definitions */
  --font-header: "sherborne-variable", sans-serif;
  --font-header-settings: "opsz" 12, "wght" 250;
  --font-subheader: 'Inter', sans-serif;
  --font-text: 'Inter', sans-serif;

  /* Legacy Mappings (for backward compatibility if needed, but we will refactor usages) */
  --font-serif: var(--font-header);
  --font-sans: var(--font-text);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lang-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.1);
  font-weight: bold;
}

@media (max-width: 768px) {
  .lang-switcher {
    margin: 1.5rem 0 0 0;
    order: 5;
    /* Appear after the 4 links */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .nav-links.active .lang-switcher {
    animation: fadeUpMenu 0.5s ease forwards;
    animation-delay: 0.5s;
  }
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-main);
  font-family: var(--font-text);
  line-height: 1.6;
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  width: 100%;
}


/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none;
}

/* Smooth Font Loading */
html.wff-loading header,
html.wff-loading footer,
html.wff-loading .container,
html.wff-loading .admin-container,
html.wff-loading .login-card {
  opacity: 0;
}

html.wff-loaded header,
html.wff-loaded footer,
html.wff-loaded .container,
html.wff-loaded .admin-container,
html.wff-loaded .login-card {
  opacity: 1;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-header);
  font-variation-settings: var(--font-header-settings);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
}

/* Reusable Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-family: var(--font-subheader);
  font-size: 1.1rem;
  letter-spacing: 0;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  /* Fix for font rendering */
  backface-visibility: hidden;
  transform: translateZ(0);
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Header */
header {
  padding: 1rem 0;
  /* Reduced padding for sticky state */
  position: fixed;
  /* Changed from absolute to fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /* Increased z-index to stay on top */
  background: rgba(5, 5, 5, 0.75);
  /* Semi-transparent background */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 90px;
  /* Increased from 80px */
  width: auto;
}

.footer-logo {
  height: 60px;
  width: auto;
  margin-bottom: 2rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-logo:hover {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  /* Pushes the entire link group to the right */
}

/* Adjusted for better spacing */
.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  margin-left: 24px;
  /* Matches live site spacing */
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 24px;
  /* Matches live site spacing */
}

/* Custom Pages Navbar Dropdown - Minimalist Black Hover Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 24px;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 16px;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main) !important;
    font-family: var(--font-sans, inherit);
    font-size: 0.9rem !important;
    font-weight: 400;
    text-decoration: none !important;
    margin-left: 0 !important;
    opacity: 0.8;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.active .nav-dropdown-trigger {
    opacity: 1;
    color: var(--accent) !important;
}

.nav-dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-icon,
.nav-dropdown.active .nav-dropdown-icon {
    transform: rotate(180deg);
}

/* Floating Black Minimal Card */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.4rem 0;
    min-width: 170px;
    max-width: 280px;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.95);
    z-index: 1000;
}

.nav-dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-menu a {
    display: block !important;
    margin-left: 0 !important;
    padding: 0.55rem 1.1rem !important;
    color: var(--text-main) !important;
    font-family: var(--font-sans, inherit) !important;
    font-size: 0.88rem !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease !important;
}

.nav-dropdown-menu a:hover {
    opacity: 1 !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-dropdown-menu a.active {
    color: var(--accent) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: transparent !important;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-color: #050505;
  background-image: radial-gradient(circle at center, #2a0a0a 0%, #050505 80%);
  background-size: 200% 200%;
  background-repeat: no-repeat;
  background-position: var(--bg-x, 50%) var(--bg-y, 50%);
  /* Use CSS Vars */
  transition: background-position 15s ease-in-out;
  /* Stability Fixes (Isolated) */
  transform: translateZ(0);
  pointer-events: none;
}


@keyframes drift {

  /* No longer used, but keeping for legacy compatibility if needed */
  0% {
    background-position: 50% 50%;
  }

  100% {
    background-position: 50% 50%;
  }
}

@keyframes drift {
  0% {
    background-position: 10% 20%;
  }

  20% {
    background-position: 80% 10%;
  }

  40% {
    background-position: 60% 80%;
  }

  60% {
    background-position: 10% 60%;
  }

  80% {
    background-position: 90% 40%;
  }

  100% {
    background-position: 30% 90%;
  }
}

.hero-content {
  max-width: 800px;
  z-index: 10;
  padding-top: 60px;
  /* Offset for fixed header */
  transform: translateX(-40px);
  /* Nudge left per user request */
}

.hero h1 {
  font-family: var(--font-header);
  font-weight: 400;
  font-style: italic;
  font-size: 5rem;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

html.wff-loaded .hero h1 {
  animation: fadeUp 1s ease 0.2s both;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 2.5rem;
}

html.wff-loaded .hero p {
  animation: fadeUp 1s ease 0.4s both;
}

.hero .btn {
  /* Initial state handled by animation 'both' */
}

html.wff-loaded .hero .btn {
  animation: fadeUp 1s ease 0.6s both;
}



/* Admin Blue Glow */
.admin-bg {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;

  /* Theme Override: Deep Royal Blue */
  --accent: #1e5dd3;
  --accent-hover: #1646a3;
  --accent-glow: rgba(30, 93, 211, 0.1);
  position: relative;
  /* For the before pseudo element */
}

.admin-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: radial-gradient(circle at center, #050a25 0%, #050505 100%);
  background-size: cover;
  background-position: center;
  pointer-events: none;
  transform: translateZ(0);
}

.dreamy-bg,
.dreamy-bg-blue,
.dreamy-bg-dark-gray {
  background: transparent !important;
  /* Allow pseudo to show */
  position: relative;
}

.dreamy-bg::before,
.dreamy-bg-blue::before,
.dreamy-bg-dark-gray::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-size: 200% 200% !important;
  background-repeat: no-repeat !important;
  background-position: var(--bg-x, 50%) var(--bg-y, 50%) !important;
  transition: background-position 15s ease-in-out !important;
  pointer-events: none;
  transform: translateZ(0);
}

.dreamy-bg::before {
  background-color: #050505 !important;
  background-image: radial-gradient(circle at center, #2a0a0a 0%, #050505 80%) !important;
}

.dreamy-bg-blue::before {
  background-color: #050505 !important;
  background-image: radial-gradient(circle at center, #0a2a5e 0%, #050505 80%) !important;
}

.dreamy-bg-dark-gray::before {
  background-color: #121212 !important;
  background-image: none !important;
}

/* Revert Header to Stable (No Blur Cost) */
body.dreamy-bg header,
body.dreamy-bg-blue header {
  /* Use high opacity instead of blur to match look without render cost */
  background: rgba(5, 5, 5, 0.75) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  /* Remove complex transforms that might blur text */
  transform: none;
  perspective: none;
  backface-visibility: visible;
  will-change: auto;
}


/* Base resets */
body.dreamy-bg,
body.dreamy-bg-blue,
body.dreamy-bg-dark-gray,
#login-overlay.dreamy-bg-blue,
#login-overlay.dreamy-bg-dark-gray {
  background-color: transparent !important;
}

/* Decorative Elements */
.accent-line {
  width: 100px;
  height: 2px;
  background-color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  animation: expandWidth 1s ease forwards;
}

/* Features */
.features {
  padding: 8rem 0;
  background-color: var(--secondary-bg);
}

.section-title {
  font-size: 3rem;
  margin-bottom: 4rem;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
}

.card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  /* Solidified */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
}

/* Footer */
footer {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid #222;
  background-color: #0a0a0a;
  /* Darker gray background */
}

.footer-description {
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.footer-email {
  display: inline-block;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-email:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Newsletter */
.newsletter-section {
  padding: 4rem 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-form {
  max-width: 500px;
  margin: 2rem auto 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: var(--font-text);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.1);
}

.newsletter-form .btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 120px;
}

.copyright {
  color: #444;
  /* Darker than muted */
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandWidth {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    width: 100px;
    opacity: 1;
  }
}

/* Mobile */
.mobile-menu-btn {
  display: none;
}


/* Join Page */
/* Join Page */
.join-page {
  padding: 280px 0 0 0;
  min-height: 90vh;
  /* Occupy most of screen but leave room for footer */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.join-content {
  max-width: 800px;
  margin: 0 auto;
}

.join-content h1 {
  font-size: 4rem;
  margin-bottom: 2rem;
}

.join-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 4rem;
}

.join-content .social-links-container {
  opacity: 1;
}

/* Social Links */
.social-links-container {
  margin-top: 0;
}

.social-links-container h2 {
  display: none;
  /* Hide redundant header */
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.social-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 3.5rem;
  transition: all 0.3s ease;
  opacity: 0.8;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  /* Keep low opacity or make solid if needed, but removing blur */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  transform: scale(1.1);
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(230, 57, 70, 0.15);
  opacity: 1;
  box-shadow: 0 0 30px rgba(230, 57, 70, 0.3);
}

/* Members Page */
.members-page,
.studies-page {
  padding: 180px 0 8rem 0;
  min-height: 80vh;
}

.page-title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.page-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.member-detail-page {
  padding: 180px 0 8rem 0;
  min-height: 80vh;
}

.member-detail-card {
  background: rgba(255, 255, 255, 0.05);
  /* Solidified */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 4rem;
  border-radius: 24px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.member-detail-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.member-detail-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  /* Ensure strict rendering for red text */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.member-role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0;
  /* Removed margin since it's the last element */
  font-size: 0.95rem;
  letter-spacing: 0;
}

.member-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.member-school,
.member-email {
  color: var(--text-muted);
  font-size: 1.1rem;
  display: block;
  text-align: center;
  text-decoration: none;
  transition: color 0.3s ease;
  width: 100%;
}

@media (hover: hover) {
  .member-email:hover {
    color: var(--accent);
  }
}

.member-email:active {
  color: var(--accent);
  opacity: 0.8;
}

.member-email:visited {
  color: var(--text-muted);
}

.member-email:focus {
  color: var(--text-muted);
  outline: none;
}

.member-school i,
.member-email i {
  color: var(--accent);
  margin-right: 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.member-school span,
.member-email span {
  display: inline;
  vertical-align: middle;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
  padding: 2rem 0;
}

.member-card {
  background: rgba(255, 255, 255, 0.05);
  /* Solidified */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(230, 57, 70, 0.1);
}

.member-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #222;
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  font-size: 3rem;
  color: #555;
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  overflow-wrap: break-word;
  word-break: break-word;
}

.member-role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0;
  /* Removed margin since it's the last element */
  font-size: 1.1rem;
  letter-spacing: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  max-width: 800px;
  /* Match card width for alignment if needed, or keeping it left aligned to container */
  margin-left: auto;
  margin-right: auto;
  /* If we want it left-aligned to the card, we need to wrap them or set width */
  width: 100%;
  max-width: 800px;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-5px);
}

/* Announcement Detail Card */
.announcement-detail-card {
  max-width: 800px;
  margin: 4rem auto;
  background: rgba(255, 255, 255, 0.05);
  /* Solidified */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.announcement-detail-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.announcement-detail-date {
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.announcement-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Content Links Styling */
.announcement-content a,
.card p a,
.study-card p a,
.announcement-item p a,
.hero-content p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all 0.3s ease;
}

.announcement-content a:hover,
.card p a:hover,
.study-card p a:hover,
.announcement-item p a:hover,
.hero-content p a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

@media (max-width: 768px) {
  .announcement-detail-card {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .announcement-detail-title {
    font-size: 2.2rem;
  }

  .announcement-detail-date {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .announcement-content {
    line-height: 1.6 !important;
    font-size: 1rem !important;
  }
}

/* Announcements */
.announcement-item {
  background: rgba(255, 255, 255, 0.05);
  /* Solidified */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  text-decoration: none;
  color: inherit;
}

.announcement-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.ann-date {
  display: block;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.announcement-item h3 {
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  overflow-wrap: break-word;
  word-break: break-word;
}

.announcement-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.study-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: rgba(220, 20, 60, 0.2);
  /* Crimson with low opacity */
  color: #ff4d4d;
  /* Bright red text */
  border: 1px solid rgba(220, 20, 60, 0.5);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: break-word;
}



.read-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0;
  text-decoration: underline;
  transition: all 0.3s;
}

.read-more-btn:hover {
  color: var(--accent-hover);
}

/* Announcement Detail Content Images */
/* Announcement Detail Content Images (Full View) */
.announcement-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1rem auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Main Page Announcement Images (Preview) */
/* Main Page Announcement Image Reset */
.announcement-item .line-clamp-3 img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0.5rem auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Expansion Utility - Fade Off Effect */
.line-clamp-3 {
  display: block;
  max-height: 250px;
  /* Fixed height for preview */
  overflow: hidden;
  position: relative;
  /* Gradeint Mask for Fade Out */
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    transform: translateX(0);
    padding: 100px 1.5rem 60px;
    width: 100%;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .container {
    padding: 0 1.5rem;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  header {
    padding: 0.5rem 0;
    width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }

  .logo img {
    height: 70px;
  }


  .mobile-menu-btn {
    display: block;
    background: transparent;
    border: none;
    color: #fff !important;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
    /* Above nav-links */
  }

  /* Animated Hamburger Icon */
  .hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  /* Active State (X shape) */
  .mobile-menu-btn.active .hamburger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Glassmorphism Menu Overlay */
  .nav-links {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .nav-links.active {
    display: flex;
    opacity: 1;
  }

  /* Staggered Animation for Links */
  .nav-links > a,
  .nav-dropdown-trigger {
    margin: 1rem 0;
    font-size: 1.8rem !important;
    font-weight: 300 !important;
    color: #fff !important;
    opacity: 0.85 !important;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .nav-links.active > a,
  .nav-links.active .nav-dropdown-trigger {
    animation: fadeUpMenu 0.5s ease forwards;
  }

  .nav-links.active > a:nth-child(1) {
    animation-delay: 0.1s;
  }

  .nav-links.active > a:nth-child(2) {
    animation-delay: 0.2s;
  }

  .nav-links.active > a:nth-child(3) {
    animation-delay: 0.3s;
  }

  .nav-links.active > a:nth-child(4) {
    animation-delay: 0.4s;
  }

  /* Language Switcher inside Mobile Menu */
  .nav-links .lang-switcher {
    display: flex;
    margin-top: 2rem;
  }

  .nav-links .lang-btn {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
  }

  /* Custom Pages Mobile Accordion */
  .nav-dropdown {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-dropdown::after {
    display: none !important;
  }

  .nav-dropdown-trigger {
    justify-content: center;
    width: 100%;
    margin: 1rem 0 !important;
  }

  .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.2rem 0 1rem 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: none;
    flex-direction: column;
    align-items: center;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: flex !important;
    animation: fadeIn 0.3s ease forwards;
  }

  .nav-dropdown-menu a {
    margin: 0.4rem 0 !important;
    font-size: 1.25rem !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-align: center !important;
    background: transparent !important;
    opacity: 0.85 !important;
    padding: 0.3rem 0 !important;
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a.active {
    color: var(--accent) !important;
    opacity: 1 !important;
  }
}

@keyframes fadeUpMenu {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 8rem 0 4rem 0;
    text-align: left;
  }

  .hero-content {
    transform: none;
    padding-top: 0;
    margin: 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2.2rem;
    text-align: left;
  }

  .grid {
    gap: 2rem;
  }

  .features {
    padding: 4rem 0;
  }

  .join-page {
    padding-top: 120px;
    padding-bottom: 6rem;
    height: auto;
    justify-content: flex-start;
  }

  .join-content h1 {
    font-size: 2.5rem;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-items: center;
    max-width: 300px;
    margin: 0 auto;
  }

  .social-link {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .members-page,
  .member-detail-page,
  .studies-page {
    padding: 140px 0 2rem 0;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .member-detail-card {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .member-detail-title {
    font-size: 1.8rem;
  }

  .member-detail-page {
    padding-top: 100px !important;
  }

  .member-detail-page .member-photo {
    width: 120px !important;
    height: 120px !important;
    margin-bottom: 1rem !important;
  }

  footer {
    padding: 3rem 0;
  }

  /* Announcement Detail Overrides */
  .announcement-detail-card {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .announcement-detail-title {
    font-size: 2.2rem;
  }

  .announcement-detail-date {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .announcement-content {
    line-height: 1.6 !important;
    font-size: 1rem !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

@media (max-width: 768px) {

  .members-grid,
  .grid,
  .studies-grid {
    grid-template-columns: 1fr !important;
  }

  /* Force buttons to span full width when stacked */
  .btn {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin-bottom: 0.5rem;
    box-sizing: border-box !important;
  }

  /* Fix for cards and boxes not scaling down */
  .card,
  .announcement-item,
  .member-card,
  .study-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .newsletter-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .newsletter-input {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .newsletter-form .btn {
    width: 100% !important;
    white-space: nowrap !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    /* Remove min-width to allow perfect match */
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Panel Specific Language Switcher Styling - Blue Index Style */
#admin-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

#admin-lang-switcher .lang-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.5);
  /* Neutral muted for non-active */
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: var(--font-text);
  font-size: 0.9rem;
}

#admin-lang-switcher .lang-btn:hover {
  color: #fff;
}

#admin-lang-switcher span {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  user-select: none;
}

#admin-lang-switcher .lang-btn.active {
  color: #fff !important;
  background: rgba(30, 93, 211, 0.3) !important;
  /* Blue background for active */
  font-weight: bold;
}

@media (max-width: 768px) {
  #admin-lang-switcher {
    margin: 0.5rem 0;
    order: 2;
  }
}

/* ==========================================
   IMMERSIVE PDF FLIPBOOK READER PAGE STYLE
   ========================================== */

.reader-body {
  background-color: #0b0b0b;
  color: #fff;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-text), sans-serif;
  display: flex;
  flex-direction: column;
}

/* Glassmorphic Header */
.reader-header {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 70px !important;
  padding: 0 2rem !important;
  background: rgba(15, 15, 15, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 100 !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
  transition: none !important;
}

.reader-header .back-btn {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.reader-header .back-btn:hover {
  color: var(--accent);
}

.reader-header .doc-title {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
  text-align: center;
}

.reader-header .header-download-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.2);
}

.reader-header .header-download-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
}

/* Immersive Viewport */
.reader-viewport-wrapper {
  flex: 1;
  position: relative;
  background: #080808;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 3D Flipbook Core Classes */
.flipbook-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 2rem;
  box-sizing: border-box;
}

.flipbook-container {
  display: none; /* Shown after load */
  position: relative;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center center;
}

.flipbook-page {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.flipbook-page canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.flipbook-page[data-density="hard"] {
  background: #f7f7f7;
  border-radius: 1px;
}

/* Loading & Progress */
.reader-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  background: #080808;
}

.reader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: reader-spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes reader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.reader-loading-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.reader-progress-bar-bg {
  width: 280px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.reader-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.15s ease-out;
}

/* Floating Bottom Controls */
.reader-controls-bar {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.8);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 90;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reader-control-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.reader-control-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

.reader-control-btn:active:not(:disabled) {
  transform: translateY(0);
}

.reader-control-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.reader-page-info {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  padding: 0 1.2rem;
  min-width: 130px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reader-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.25rem;
}

/* Bottom Thumbnail Drawer */
.reader-thumbnails-drawer {
  height: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 0 solid rgba(255, 255, 255, 0.08);
  z-index: 85;
}

.reader-thumbnails-drawer.active {
  height: 130px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-thumbnails-container {
  display: flex;
  gap: 1.2rem;
  padding: 0.8rem 2rem;
  width: max-content;
  height: 100%;
  align-items: center;
}

.reader-thumb-item {
  height: 85px;
  aspect-ratio: 1 / 1.41;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
  background: #151515;
}

.reader-thumb-item:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.reader-thumb-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1.05);
}

.reader-thumb-item canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reader-thumb-number {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 700;
}

/* Custom Page Builder Container and Default Spacings - Compact & Squished */
.custom-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Strip duplicate paddings from nested containers to prevent double padding shifts */
.custom-page-container .container {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}

/* Enforce squished vertical spacing between direct sibling blocks */
.custom-page-container > * {
  margin-bottom: 1.5rem !important;
}

/* Apply default font, color, and compact spacing to Headings (h1 through h6) */
.custom-page-container h1,
.custom-page-container h2,
.custom-page-container h3,
.custom-page-container h4,
.custom-page-container h5,
.custom-page-container h6 {
  font-family: var(--font-serif);
  color: var(--text-main);
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* h4/h5/h6 inside custom pages use Inter — they are small labels, not display headings */
.custom-page-container h4,
.custom-page-container h5,
.custom-page-container h6 {
  font-family: var(--font-sans);
  font-variation-settings: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.custom-page-container h1 {
  font-size: 2.6rem;
}

.custom-page-container h2 {
  font-size: 2.1rem;
}

.custom-page-container h3 {
  font-size: 1.5rem;
}

/* Apply default styling to standard Paragraphs */
.custom-page-container p:not(.member-role):not(.member-desc) {
  font-family: var(--font-sans);
  color: #e0e0e0;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

/* Specific styling for member roles and descriptions */
.custom-page-container .member-role,
.member-role {
  color: var(--accent) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  margin-bottom: 0.5rem !important;
}

.custom-page-container .member-desc,
.member-desc {
  color: #e0e0e0 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0 !important;
}

/* Align buttons and links */
.custom-page-container .btn {
  margin-bottom: 1.2rem !important;
}

/* Cards automatic layout styling */
.custom-page-container .card {
  padding: 1.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 1.8rem !important;
}

.custom-page-container .card h3 {
  margin-bottom: 0.8rem !important;
}

/* Columns grid auto-aligning */
.custom-page-container .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-bottom: 1.8rem !important;
  width: 100%;
}

/* Preserve image aspect ratio on page resize */
.custom-page-container img {
  max-width: 100% !important;
  height: auto !important;
}

/* Ensure member profile photos always fill the circle completely */
.custom-page-container .member-photo img,
.member-photo img,
.instructors-section img,
.custom-page-container .instructors-section img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
}

/* For vector logo placeholders inside profile circles, scale to fill edge-to-edge */
.custom-page-container .member-photo img[src$=".svg"],
.member-photo img[src$=".svg"],
.instructors-section img[src$=".svg"],
.custom-page-container .instructors-section img[src$=".svg"] {
  object-fit: cover !important;
  transform: scale(1.45) !important;
  padding: 0 !important;
}

/* Horizontal Member Card Layout */
.custom-page-container .member-card-horizontal,
.member-card-horizontal {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
  text-align: left;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 3.5rem !important;
  transition: all 0.3s ease;
}

.custom-page-container .member-card-horizontal:hover,
.member-card-horizontal:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.custom-page-container .member-card-horizontal .member-photo,
.member-card-horizontal .member-photo {
  width: 140px;
  height: 140px;
  min-width: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-page-container .member-card-horizontal .member-photo img,
.member-card-horizontal .member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.custom-page-container .member-card-horizontal .member-info,
.member-card-horizontal .member-info {
  flex: 1;
}

.custom-page-container .member-card-horizontal h3,
.member-card-horizontal h3 {
  margin-top: 0;
  margin-bottom: 0.4rem !important;
  font-size: 1.6rem;
  color: var(--text-main);
}

.custom-page-container .member-card-horizontal .member-role,
.member-card-horizontal .member-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem !important;
}

.custom-page-container .member-card-horizontal .member-desc,
.member-card-horizontal .member-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #e0e0e0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 600px) {
  .custom-page-container .member-card-horizontal,
  .member-card-horizontal {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .custom-page-container .member-card-horizontal .member-photo,
  .member-card-horizontal .member-photo {
    margin-bottom: 1.5rem;
  }

  .custom-page-container {
    padding: 0 0.8rem !important;
  }

  .instructors-section,
  .project-info-section,
  .cta-section {
    padding: 2rem 0.2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Force grid containers to single column 100% width on mobile */
  .instructors-section > div,
  .project-info-section > div,
  .cta-section > div,
  .custom-page-container .grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Card paddings and box sizing */
  .instructors-section div[style*="background"],
  .project-info-section div[style*="background"],
  .cta-section div[style*="background"],
  .custom-page-container .card {
    padding: 1.5rem 1rem !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Typography fitting */
  .instructors-section h2,
  .project-info-section h2,
  .cta-section h2,
  .custom-page-container h2 {
    font-size: 1.7rem !important;
    word-break: break-word !important;
  }

  .instructors-section h3,
  .project-info-section h3,
  .cta-section h3,
  .custom-page-container h3 {
    font-size: 1.2rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .cta-section a.btn,
  .instructors-section a.btn,
  .project-info-section a.btn {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.88rem !important;
    padding: 0.75rem 0.5rem !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  .instructors-section div[style*="background"],
  .project-info-section div[style*="background"],
  .cta-section div[style*="background"] {
    padding: 1.2rem 0.75rem !important;
  }
}

/* ==========================================================================
   Online Ders Projesi & Custom Page Component Styles
   ========================================================================== */
.online-ders-page-wrapper {
  width: 100%;
  box-sizing: border-box;
  background-color: transparent;
  color: var(--text-main);
  padding-bottom: 4rem;
}

.online-ders-hero-grid {
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 2.5rem !important;
  align-items: center !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 4rem 1.5rem 3rem !important;
  box-sizing: border-box !important;
}

.online-ders-features-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  margin-top: 2rem !important;
  box-sizing: border-box !important;
}

.online-ders-instructors-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 1rem !important;
  margin-bottom: 2rem !important;
  box-sizing: border-box !important;
}

.online-ders-instructor-card {
  background: rgba(13, 21, 39, 0.75) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  border-radius: 16px !important;
  padding: 1.6rem 0.9rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
  box-sizing: border-box !important;
}

.online-ders-info-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.8rem !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 3rem 1.5rem !important;
  box-sizing: border-box !important;
}

.online-ders-cta-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 3rem 1.5rem 2rem !important;
  box-sizing: border-box !important;
}

@media (max-width: 992px) {
  .online-ders-instructors-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .online-ders-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .online-ders-hero-grid,
  .online-ders-instructors-grid,
  .online-ders-info-grid,
  .online-ders-cta-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .online-ders-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Color theme card variants */
.cta-card-blue {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  border-radius: 18px !important;
  padding: 2.2rem 1.5rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.cta-card-green {
  background: rgba(6, 30, 24, 0.85) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-radius: 18px !important;
  padding: 2.2rem 1.5rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.cta-card-purple {
  background: rgba(24, 16, 38, 0.85) !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  border-radius: 18px !important;
  padding: 2.2rem 1.5rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.cta-icon-blue {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.15) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.cta-icon-green {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.15) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.cta-icon-purple {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.15) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.cta-btn-blue {
  margin-top: auto;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.cta-btn-green {
  margin-top: auto;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #059669 !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.cta-btn-purple {
  margin-top: auto;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #7c3aed !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.cta-section a.btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Override global .btn red border/color for instructor outline buttons */
.instructors-section a.btn,
.instructors-section a.btn.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.instructors-section a.btn:hover,
.instructors-section a.btn.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

/* Override global .btn red for project info section */
.project-info-section a.btn {
  border: 1px solid rgba(30, 93, 211, 0.4);
  color: #60a5fa;
  background: rgba(30, 93, 211, 0.2);
  outline: none;
  box-shadow: none;
}

/* Image Size Caps for Builder & Page */
.hero-banner-section img,
.custom-page-container .hero-banner-section img {
  max-width: 280px !important;
  height: auto !important;
  margin: 0 auto !important;
}

/* Hide broken Company Logo images */
img[alt="Company Logo"]:not([src]),
img[alt="Company Logo"][src=""],
img[alt="Company Logo"][src="#"] {
  display: none !important;
}


