/* ===== MITCON Custom Styles ===== */

/* --- CSS Custom Properties --- */
:root {
  --primary-blue: #0265A3;
  --primary-teal: #01B7AC;
  --dark-navy: #242D44;
  --about-blue: #5A70AA;
  --bg-gray: #F2F2F2;
  --text-dark: #1E1E1E;
  --gradient-primary: linear-gradient(to right, #0265A3, #01B7AC);
  --gradient-about: linear-gradient(to right, #5A70AA 19%, #242D44);
}

/* --- FOUC Prevention --- */
#site-header {
  min-height: 100px;
  background: linear-gradient(to right, #0265A3, #01B7AC);
}

@media (min-width: 1024px) {
  #site-header {
    min-height: 130px;
  }
}

#site-footer {
  min-height: 300px;
}

/* --- Gradient Text Utility --- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-about {
  background: var(--gradient-about);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Marquee Animation --- */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  background-color: var(--dark-navy);
}

.marquee-track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  font-size: 10.5px;
}

@media (min-width: 1024px) {
  .marquee-item {
    gap: 24px;
    padding: 0 48px;
    font-size: 16px;
  }
}

.marquee-item .label {
  color: var(--primary-teal);
  font-weight: 600;
}

.marquee-item .text {
  color: white;
  font-weight: 600;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-section img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-logo-blur {
  position: absolute;
  top: 4px;
  left: 7px;
  z-index: 2;
}

.hero-logo-blur::before {
  content: '';
  position: absolute;
  inset: -5px;
  background: linear-gradient(106deg, rgba(184,186,212,0.7) 9%, rgba(251,248,251,0.7) 63%);
  filter: blur(5px);
  border-radius: 4px;
  z-index: -1;
}

.hero-logo-blur img {
  width: 91px;
  height: auto;
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .hero-logo-blur {
    top: 10px;
    left: 24px;
  }
  .hero-logo-blur::before {
    inset: -10px;
    filter: blur(15px);
    border-radius: 8px;
  }
  .hero-logo-blur img {
    width: 302px;
  }
}

/* --- About Section --- */
.about-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #5A70AA 19%, #242D44);
}

.about-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
}

.about-pattern img {
  width: 130%;
  height: 130%;
  object-fit: cover;
  transform: translate(-10%, -8%);
}

/* --- About Small Image Float Animation --- */
@keyframes floatReveal {
  0%, 15% {
    transform: translateY(0);
  }
  40%, 65% {
    transform: translateY(-10px);
  }
  90%, 100% {
    transform: translateY(0);
  }
}

.about-image-float {
  animation: floatReveal 2.4s ease infinite;
  padding: 4px;
  background: white;
  border-radius: 24px;
}

.about-image-float img {
  border-radius: 20px;
}

.about-image-main {
  border: 3px solid white;
  border-radius: 9px;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .about-image-main {
    border: 4px solid white;
    border-radius: 12px;
  }
}

.about-image-small {
  border: 3px solid white;
  border-radius: 24px;
  overflow: hidden;
}

.about-image-small.about-image-float {
  overflow: visible;
  border: none;
}

@media (min-width: 1024px) {
  .about-image-small {
    border: 4px solid white;
  }
  .about-image-small.about-image-float {
    border: none;
  }
}

/* --- Host Cards --- */
.host-card {
  background: white;
  border-radius: 24px;
  padding: 24px;
  flex-shrink: 0;
}

/* Mobile: increased width to match SCIENTIFIC COMMITTEE */
.host-card {
  width: 100%;
  max-width: 400px;
}

.host-card .host-photo {
  width: 124.8px;
  height: 111.6px;
  object-fit: cover;
  object-position: top;
  border-radius: 5px;
  margin: 0 auto;
  display: block;
}

/* 1024px (lg) screen adjustments */
@media (min-width: 1024px) {
  .host-card {
    width: 280px;
  }
  .host-card .host-photo {
    width: 100%;
    height: 220px;
    border-radius: 12px;
  }
}

/* 1280px (xl) and above - original design */
@media (min-width: 1280px) {
  .host-card {
    width: 360px;
  }
  .host-card .host-photo {
    height: 279px;
  }
}

/* --- Carousel --- */
.hosts-carousel {
  overflow: hidden;
  width: 100%;
}

.hosts-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
}

/* Mobile: stack vertically */
@media (max-width: 1023px) {
  .hosts-track {
    flex-direction: column;
    align-items: center;
  }
}

/* Desktop: adjust gap for 1024px */
@media (min-width: 1024px) {
  .hosts-track {
    justify-content: center;
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  .hosts-track {
    gap: 24px;
  }
}

/* --- Keynote Section --- */
.keynote-card {
  background: var(--bg-gray);
  border-radius: 20px;
  padding: 28px 20px;
}

@media (min-width: 1024px) {
  .keynote-card {
    border-radius: 40px;
    padding: 48px 56px;
  }
}

/* --- Clinical Pills --- */
.clinical-pill {
  background: var(--gradient-primary);
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.96px;
}

@media (min-width: 768px) {
  .clinical-pill {
    font-size: 16px;
  }
}

/* Mobile: vertical with icon on top */
@media (max-width: 1023px) {
  .clinical-pill {
    flex-direction: column;
    padding: 24px 16px;
  }
}

@media (min-width: 1024px) {
  .clinical-pill {
    flex-direction: column;
    padding: 24px 24px;
    text-align: center;
  }
}

/* --- Attend Cards --- */
.attend-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  width: 298px;
  height: 319px;
  cursor: pointer;
}

.attend-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attend-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 31%, rgba(0,0,0,0.6) 65%, black 100%);
  transition: background 0.4s ease;
}

.attend-card:hover .overlay {
  background: rgba(0,0,0,0.6);
}

.attend-card .label {
  position: absolute;
  bottom: 16%;
  left: 12%;
  right: 12%;
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 21px;
  text-align: center;
  line-height: normal;
  transition: bottom 0.4s ease;
}

.attend-card:hover .label {
  bottom: 50%;
  transform: translateY(50%);
}

.attend-card .description {
  position: absolute;
  bottom: 8%;
  left: 10%;
  right: 10%;
  color: white;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 400;
  font-size: 16px;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (min-width: 1024px) and (max-width: 1279px) {

  .attend-card .label {
    font-size: 18px;
  }

  .attend-card .description {
    font-size: 14px;
  }

}

.attend-card:hover .description {
  opacity: 1;
  transform: translateY(0);
}

/* --- Attend Staggered Layout --- */
.attend-staggered {
  gap: 24px;
}

.attend-card.attend-offset {
  margin-top: 41px;
}

/* --- Carousel Dots --- */
.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  width: 40px;
  border-radius: 6px;
  background: var(--gradient-primary);
}

/* --- Hero Arrow Buttons --- */
.hero-arrow-btn {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.2s;
  z-index: 5;
}

.hero-arrow-btn:hover {
  opacity: 0.8;
}

/* --- Arrow Buttons --- */
.arrow-btn {
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.arrow-btn:hover {
  opacity: 0.8;
}

/* --- Footer --- */
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

/* --- Hamburger Button --- */
.hamburger-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-btn svg {
  transition: all 0.3s;
}

/* --- Mobile Nav Drawer --- */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  max-width: 280px;
  background: white;
  z-index: 49;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  background: linear-gradient(to right, #0265A3, #01B7AC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  border-bottom: 1px solid #D9D9D9;
  transition: opacity 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  opacity: 0.7;
}

/* --- Clinical Case Image --- */
.clinical-image {
  border-radius: 24px;
  overflow: hidden;
  width: 100%;
}

.clinical-image img {
  width: 100%;
  height: 299px;
  object-fit: cover;
}

/* --- Committee Cards - Optimized --- */

/* Main desktop card (for Secretary and Patrons) */
.committee-card {
  background: white;
  border: 3.5px solid #0265A3;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

/* Mobile card */
.committee-card-mobile {
  background: white;
  border: 3px solid #0265A3;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  height: auto;
}

/* Small card (if needed for other sections) */
.committee-card-sm {
  background: white;
  border: 2.5px solid #0265A3;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

/* Large card for Scientific Committee (4 in a row) */
.committee-card-lg {
  background: white;
  border: 3.5px solid #0265A3;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: 220px;
}

/* 1024px specific adjustments */
@media (min-width: 1024px) {
  .committee-card-lg {
    max-width: 210px;
  }
}

/* Larger screens */
@media (min-width: 1280px) {
  .committee-card-lg {
    max-width: 240px;
  }
}

/* Image scaling for better coverage */
.committee-card img,
.committee-card-mobile img,
.committee-card-lg img {
  transition: transform 0.3s ease;
}

/* Optional hover effect */
.committee-card:hover img,
.committee-card-mobile:hover img,
.committee-card-lg:hover img {
  transform: scale(1.05);
}

/* --- FAQ Accordion --- */
.faq-item {
  overflow: hidden;
  border-radius: 12px;
}

.faq-trigger {
  border: none;
  outline: none;
  transition: border-radius 0.3s;
}

.faq-item.open .faq-trigger {
  border-radius: 12px 12px 0 0;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  background: #242D44;
  border-radius: 0 0 12px 12px;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-content {
  max-height: 300px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* ===== SPEAKERS MODAL STYLES ===== */

.speakers-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.speakers-modal.active {
  display: flex;
}

.speakers-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

.speakers-modal-content {
  position: relative;
  background: white;
  border-radius: 24px;
  max-width: 800px; /* Reduced from 1100px */
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10000;
  animation: slideUp 0.4s ease;
  padding: 60px 20px 40px;
}

@media (min-width: 768px) {
  .speakers-modal-content {
    padding: 70px 40px 50px;
  }
}

@media (min-width: 1024px) {
  .speakers-modal-content {
    max-width: 900px; /* Reduced from 1100px */
    padding: 80px 50px 60px; /* Reduced horizontal padding */
  }
}

/* Close Button - NOW STICKY */
.speakers-modal-close {
  position: absolute; 
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid #0265A3;
  color: #0265A3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.speakers-modal-close:hover {
  background: #0265A3;
  color: white;
  transform: rotate(90deg);
}

@media (min-width: 768px) {
  .speakers-modal-close {
    width: 48px;
    height: 48px;
    top: 20px;
    right: 20px;
  }
}

.speakers-modal-header {
  margin-bottom: 30px;
  text-align: center;
}

@media (min-width: 768px) {
  .speakers-modal-header {
    margin-bottom: 40px;
  }
}

.speakers-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .speakers-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; /* Reduced from 24px */
  }
}

@media (min-width: 1024px) {
  .speakers-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px; /* Reduced from 30px */
  }
}

/* Speaker Card - REDUCED WIDTH */
.speaker-modal-card {
  background: #F2F2F2;
  border-radius: 16px;
  padding: 18px; /* Reduced from 20px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px; /* Reduced from 16px */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 380px; /* NEW: Added max width */
  margin: 0 auto; /* Center the card */
}

.speaker-modal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(2, 101, 163, 0.15);
}

@media (min-width: 768px) {
  .speaker-modal-card {
    padding: 20px; /* Reduced from 24px */
    gap: 16px; /* Reduced from 18px */
  }
}

/* Speaker Image - BIGGER */
.speaker-modal-image {
  width: 100%;
  max-width: 220px; /* Increased from 180px */
  height: 220px; /* Increased from 180px */
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .speaker-modal-image {
    max-width: 240px; /* Increased from 200px */
    height: 240px; /* Increased from 200px */
  }
}

.speaker-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.speaker-modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  width: 100%;
}

.speaker-modal-name {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #1E1E1E;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .speaker-modal-name {
    font-size: 20px;
  }
}

.speaker-modal-topic {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 14px;
  color: #1E1E1E;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

@media (min-width: 768px) {
  .speaker-modal-topic {
    font-size: 15px;
  }
}

.speaker-modal-topic img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Speaker Actions - ALIGNED VERTICALLY */
.speaker-modal-actions {
  display: flex;
  flex-direction: column; /* Stacked on mobile */
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .speaker-modal-actions {
    flex-direction: row; /* Parallel on desktop */
    gap: 8px;
  }
}

.speaker-modal-time {
  background: linear-gradient(to right, #0265A3, #01B7AC);
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 20px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .speaker-modal-time {
    font-size: 14px;
    padding: 10px 18px;
  }
}

.speaker-modal-register {
  background: white;
  border: 2px solid #0265A3;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .speaker-modal-register {
    padding: 8px 18px;
  }
}

.speaker-modal-register:hover {
  background: #0265A3;
}

.speaker-modal-register:hover .gradient-text {
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.speaker-modal-register .gradient-text {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
}

@media (min-width: 768px) {
  .speaker-modal-register .gradient-text {
    font-size: 14px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.speakers-modal-content::-webkit-scrollbar {
  width: 8px;
}

.speakers-modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.speakers-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #0265A3, #01B7AC);
  border-radius: 10px;
}

.speakers-modal-content::-webkit-scrollbar-thumb:hover {
  background: #0265A3;
}

body.modal-open {
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
}