/*
 * File: css/custom.css
 * Purpose: WAMS site-specific styles and full responsive overrides.
 *          Centralises all inline styles extracted from PHP templates and adds
 *          mobile-first breakpoint rules for every component.
 */

/* =============================================================================
   BASE SITE ELEMENTS
   ============================================================================= */

/* Bootstrap 4 doesn't ship display-5/6; define it to match the template */
.display-5 {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.2;
}

/* Site logo */
.site-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
}

/* Main content area minimum height — desktop only */
.blog-main {
  min-height: 400px;
}

/* Remove min-height for programme page */
.blog-main-flush {
  min-height: 0;
}

/* Jumbotron brand colour */
.wams-jumbotron {
  background-color: #f58220;
  border-radius: 0 !important;   /* full-width flush on all sizes */
}

/* Language switcher pill button */
.lang-switch a {
  display: inline-block;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch a:hover,
.lang-switch a:focus {
  background-color: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
}

/* Google Maps embed */
.map-iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 280px;     /* mobile default */
}

/* Programme heading block */
.programme-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.programme-block h1 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.programme-block h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.programme-block h3 {
  font-size: 0.95rem;
}

/* Speaker / participant figure captions */
.figure-caption {
  font-size: 0.78rem;
  line-height: 1.4;
}

/* =============================================================================
   RESPONSIVE — SMALL  (≥576px)
   ============================================================================= */
@media (min-width: 576px) {

  .display-5 {
    font-size: 2.25rem;
  }

  .site-logo {
    max-width: 360px;
  }

  .map-iframe {
    height: 350px;
  }

  .programme-block h1 { font-size: 1.4rem; }
  .programme-block h2 { font-size: 1.2rem; }
  .programme-block h3 { font-size: 1.05rem; }
}

/* =============================================================================
   RESPONSIVE — MEDIUM  (≥768px)
   ============================================================================= */
@media (min-width: 768px) {

  .display-5 {
    font-size: 2.5rem;
  }

  .site-logo {
    max-width: 400px;
  }

  .map-iframe {
    height: 450px;
  }

  .programme-block h1 { font-size: 1.75rem; }
  .programme-block h2 { font-size: 1.4rem;  }
  .programme-block h3 { font-size: 1.2rem;  }
}

/* =============================================================================
   RESPONSIVE — EXTRA-SMALL only  (<576px)
   ============================================================================= */
@media (max-width: 575px) {

  /* No min-height on tiny screens */
  .blog-main {
    min-height: 0;
  }

  /* Jumbotron tighter padding */
  .wams-jumbotron {
    padding: 1rem !important;
  }

  /* Jumbotron headline */
  .wams-jumbotron h1.display-5 {
    font-size: 1.25rem;
  }

  .wams-jumbotron .lead {
    font-size: 0.95rem;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
  }

  /* Blog header tighter */
  .blog-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Speaker figures full-width centred */
  .figure {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 1.25rem;
  }

  /* Participant single figure */
  .figure .figure-img {
    max-width: 180px;
  }

  /* h3 page headings */
  .blog-main h3.border-bottom {
    font-size: 1.2rem;
  }

  /* Programme table: tighter cells */
  .table-sm td {
    padding: 0.25rem;
    font-size: 0.82rem;
  }

  /* Programme time column fixed narrow */
  .table-sm td:first-child {
    white-space: nowrap;
    width: 80px;
  }
}

/* =============================================================================
   RESPONSIVE — LARGE only  (≥992px)
   ============================================================================= */
@media (min-width: 992px) {

  .lang-switch {
    margin-left: 1.25rem;
  }
}

/* =============================================================================
   NAVBAR MOBILE FIXES
   ============================================================================= */

/* Language toggle inside collapsed nav on mobile */
@media (max-width: 991px) {
  .lang-switch {
    padding: 0.4rem 0.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0.25rem;
  }

  /* Tighter nav-link left padding on mobile */
  .navbar-nav .nav-link {
    padding-left: 0.15rem;
  }

  /* Dropdown items indented */
  .navbar-nav .dropdown-menu {
    border: none;
    padding-left: 0.75rem;
    background: transparent;
    box-shadow: none;
  }

  .navbar-nav .dropdown-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
  }
}

/* =============================================================================
   TABLE UTILITIES
   ============================================================================= */

/* Ensure all responsive-wrapped tables scroll smoothly on iOS */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

