/* ========================================
   RESPONSIVE FIXES - ICSEAT 2026
   Enhances mobile/tablet experience
   ======================================== */

/* --- Global Responsive Fixes --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* Make iframes responsive */
iframe {
  max-width: 100%;
}

/* Page header background - ensure cover on all screens */
header.page-header {
  background-size: cover !important;
  background-position: center !important;
}

/* Responsive tables - horizontal scroll */
.entry-content table,
.featured_page_content table,
.content table,
.textwidget table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* wp-block-table responsive wrapper */
figure.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
}

figure.wp-block-table table {
  min-width: 500px;
}

figure.wp-block-table table td {
  padding: 10px 15px;
  border: 1px solid #ddd;
  white-space: normal;
  word-wrap: break-word;
}

/* wp-block-list proper spacing */
ul.wp-block-list,
ol.wp-block-list {
  padding-left: 20px;
}

ul.wp-block-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Google Maps responsive */
.map-section .textwidget.custom-html-widget {
  position: relative;
  width: 100%;
  padding: 0;
}

.map-section iframe {
  width: 100%;
  height: 600px;
}

.map-section {
  margin-bottom: 0;
  padding-bottom: 0;
}

.map-section .widget .textwidget {
  height: auto !important;
}

.map-section + .newsletter-section {
  margin-top: 0;
  padding-top: 0;
}

.map-section + .newsletter-section .blossomthemes-email-newsletter-wrapper {
  padding-top: 60px;
}

/* Speaker modal full-screen on mobile */
.widget_rrtc_description_widget .rtc-team-holder-modal.show {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.98);
  overflow-y: auto;
  padding: 20px;
}

.widget_rrtc_description_widget .rtc-team-holder-modal .close_popup {
  position: sticky;
  top: 0;
  display: block;
  text-align: right;
  font-size: 0;
  padding: 10px;
  z-index: 10001;
}

.widget_rrtc_description_widget .rtc-team-holder-modal .close_popup::after {
  content: "\00d7";
  font-size: 32px;
  color: #333;
  background: #f0f0f0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Contact form replacement - better spacing */
.contact-form-replacement {
  text-align: center;
  padding: 20px 0;
}

.contact-form-replacement a[href^="mailto:"] {
  word-break: break-all;
}

/* wp-block-columns responsive */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.wp-block-column {
  flex: 1 1 300px;
  min-width: 0;
}

/* ========================================
   TABLET: max-width 1024px
   ======================================== */
@media screen and (max-width: 1024px) {

  /* Banner title scaling */
  .banner-caption .banner-title {
    font-size: 1.8em !important;
  }

  .banner-caption .banner-title:nth-of-type(3) {
    font-size: 2em !important;
  }

  .banner-desc {
    font-size: 1.2em !important;
  }

  /* Countdown timer */
  .banner-countdown .countdown-wrap {
    padding: 10px 15px;
  }

  /* Sticky sidebar smaller on tablet */
  .easy-sticky-sidebar.sticky-cta {
    --width: min(90%, 400px);
  }

  .easy-sticky-sidebar .sticky-sidebar-content {
    max-width: 280px;
  }

  .easy-sticky-sidebar .sticky-sidebar-image {
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .easy-sticky-sidebar .sticky-sidebar-text {
    font-size: 14px !important;
    padding: 10px 16px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-button div {
    font-size: 18px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-call-to-action {
    font-size: 16px !important;
    padding: 10px 16px !important;
  }
}

/* ========================================
   MOBILE: max-width 767px
   ======================================== */
@media screen and (max-width: 767px) {

  /* --- Typography --- */
  .banner-caption .banner-title {
    font-size: 1.3em !important;
    line-height: 1.3;
  }

  .banner-caption .banner-title:nth-of-type(3) {
    font-size: 1.6em !important;
  }

  .banner-desc {
    font-size: 1em !important;
  }

  .banner-desc p {
    font-size: 0.95em;
  }

  h1.page-title {
    font-size: 1.8em;
  }

  .widget-title {
    font-size: 1.6em;
  }

  h2.widget-title {
    font-size: 1.5em;
  }

  /* --- Banner Section --- */
  .banner-caption .container {
    padding: 0 15px;
  }

  .banner-caption .btn-wrap {
    margin-top: 15px;
  }

  .banner-caption .btn-wrap a {
    padding: 10px 20px;
    font-size: 0.85em;
    margin-bottom: 8px;
  }

  .site-banner .countdown-wrap {
    width: 22%;
    min-width: 60px;
    padding: 8px 5px;
    margin: 5px;
  }

  .site-banner .countdown-wrap .days,
  .site-banner .countdown-wrap .hours,
  .site-banner .countdown-wrap .minutes,
  .site-banner .countdown-wrap .seconds {
    font-size: 1.5em;
  }

  .site-banner .countdown-wrap .smalltext {
    font-size: 0.7em;
  }

  /* --- Counter/Stats Section --- */
  .counter-section .widget_raratheme_companion_stat_counter_widget {
    width: 50%;
    margin-bottom: 20px;
  }

  .counter-section .widget_raratheme_companion_stat_counter_widget .widget-title {
    font-size: 1em;
  }

  /* --- Speaker Cards --- */
  .speakers-section .widget_rrtc_description_widget {
    width: 100% !important;
    margin: 0 0 30px 0 !important;
  }

  .widget_rrtc_description_widget .rtc-team-inner-holder {
    flex-direction: column;
  }

  .widget_rrtc_description_widget .image-holder {
    width: 100%;
    margin-bottom: 15px;
  }

  .widget_rrtc_description_widget .image-holder img {
    max-width: 250px;
    margin: 0 auto;
    display: block;
  }

  .widget_rrtc_description_widget .text-holder {
    width: 100%;
    text-align: center;
  }

  .widget_rrtc_description_widget .description {
    text-align: justify;
    font-size: 0.9em;
    line-height: 1.6;
  }

  /* Speaker modal mobile */
  .widget_rrtc_description_widget .rtc-team-holder-modal.show {
    padding: 15px;
  }

  .rtc-team-holder-modal .rtc-team-inner-holder-modal {
    flex-direction: column;
  }

  .rtc-team-holder-modal .image-holder {
    text-align: center;
    margin-bottom: 15px;
  }

  .rtc-team-holder-modal .image-holder img {
    max-width: 200px;
    height: auto;
  }

  /* --- Contact Section --- */
  .contact-form-section .container {
    padding: 0 15px;
  }

  .contact-form-section .widget {
    width: 100% !important;
    margin: 0 0 20px 0;
  }

  .contact-list li {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .contact-form-replacement a[href^="mailto:"] {
    padding: 12px 20px !important;
    font-size: 0.9em;
    display: block;
    max-width: 100%;
  }

  /* --- Map Section --- */
  .map-section iframe {
    height: 400px;
  }

  /* --- Newsletter Section --- */
  .newsletter-section {
    padding: 30px 0;
  }

  .blossomthemes-email-newsletter-wrapper .text-holder h3 {
    font-size: 1.3em;
  }

  .blossomthemes-email-newsletter-wrapper .text-holder span {
    font-size: 0.9em;
  }

  /* --- Footer --- */
  .top-footer .grid.column-2 {
    display: flex;
    flex-direction: column;
  }

  .top-footer .grid.column-2 .col {
    width: 100%;
    float: none;
    margin-bottom: 30px;
  }

  .top-footer .textwidget p {
    font-size: 0.9em;
    line-height: 1.7;
  }

  .bottom-footer .copyright {
    font-size: 0.85em;
    text-align: center;
    display: block;
    padding: 15px;
  }

  .site-footer .social-networks {
    text-align: center;
  }

  .site-footer .social-networks li {
    display: inline-block;
  }

  /* --- Subpage Layouts --- */
  header.page-header {
    padding: 40px 0;
    margin-bottom: 30px;
    background-size: cover !important;
    background-position: center !important;
  }

  .page-header .container {
    padding: 0 15px;
  }

  .page-header .breadcrumb {
    font-size: 0.85em;
  }

  /* Content + Sidebar stacking */
  #primary.content-area {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
  }

  #secondary.widget-area {
    width: 100% !important;
    float: none !important;
    margin-top: 30px;
  }

  .entry-content {
    font-size: 0.95em;
    line-height: 1.7;
  }

  /* Tables mobile */
  .entry-content table {
    font-size: 0.85em;
  }

  .entry-content table td,
  .entry-content table th {
    padding: 8px 10px;
    white-space: nowrap;
  }

  /* Featured page content - Icon Text widgets */
  .rtc-itw-holder .icon-holder {
    margin-top: 20px;
  }

  .rtc-itw-holder .icon-holder img {
    max-width: 100%;
    height: auto;
  }

  /* wp-block-columns stacking */
  .wp-block-columns {
    flex-direction: column;
  }

  .wp-block-column {
    flex-basis: 100%;
    width: 100%;
  }

  /* Sticky sidebar mobile optimization */
  .easy-sticky-sidebar {
    max-width: 90vw;
  }

  .easy-sticky-sidebar.sticky-cta {
    --width: min(90%, 320px);
  }

  /* When collapsed on mobile, hide content and only show the button tab */
  .easy-sticky-sidebar.sticky-cta.shrink {
    right: 0 !important;
    width: auto !important;
  }

  .easy-sticky-sidebar.sticky-cta.shrink .sticky-sidebar-container {
    display: none !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-button {
    font-size: 14px !important;
    padding: 8px 10px;
    --buttonWidth: 36px;
  }

  .easy-sticky-sidebar .sticky-sidebar-button div {
    font-size: 14px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-content {
    max-width: 85vw;
  }

  .easy-sticky-sidebar .sticky-sidebar-text {
    font-size: 12px !important;
    padding: 8px 12px !important;
    line-height: 1.4;
  }

  .easy-sticky-sidebar .sticky-sidebar-image {
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .easy-sticky-sidebar .sticky-sidebar-text img {
    max-width: 60%;
    height: auto;
    display: block;
    margin: 5px auto 0;
  }

  .easy-sticky-sidebar .sticky-sidebar-call-to-action {
    font-size: 13px !important;
    padding: 8px 12px !important;
  }

  /* Banner title pseudo-elements (logos) */
  .banner-title:first-of-type::before,
  .banner-title:first-of-type::after {
    width: 80px !important;
    height: 80px !important;
  }

  .banner-title:first-of-type {
    padding-top: 40px !important;
  }

  /* Article content images */
  .entry-content img,
  .featured_page_content img {
    height: auto !important;
    max-width: 100%;
  }

  .entry-content figure {
    margin: 0 0 20px 0;
    max-width: 100%;
  }

  .entry-content figure img {
    width: 100%;
    height: auto;
  }

  /* About section featured widget */
  .widget-featured-holder .img-holder {
    max-width: 100%;
  }

  /* Registration fee / tables with line-height */
  .content table,
  .featured_page_content table {
    line-height: 1.5;
  }
}

/* ========================================
   SMALL MOBILE: max-width 480px
   ======================================== */
@media screen and (max-width: 480px) {

  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Banner */
  .banner-caption .banner-title {
    font-size: 1.1em !important;
  }

  .banner-caption .banner-title:nth-of-type(3) {
    font-size: 1.3em !important;
  }

  .banner-desc {
    font-size: 0.9em !important;
  }

  .banner-caption .btn-wrap a {
    font-size: 0.8em;
    padding: 8px 16px;
  }

  /* Countdown */
  .banner-countdown {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-banner .countdown-wrap {
    width: 45%;
    margin: 4px;
  }

  /* Counter - single column on very small */
  .counter-section .widget_raratheme_companion_stat_counter_widget {
    width: 100%;
  }

  /* Speaker name/designation */
  .widget_rrtc_description_widget .name {
    font-size: 0.95em;
  }

  .widget_rrtc_description_widget .designation {
    font-size: 0.8em;
  }

  /* Page header */
  header.page-header {
    padding: 30px 0;
  }

  h1.page-title {
    font-size: 1.4em;
  }

  /* Footer */
  .menu-footer-container ul.menu {
    padding: 0;
  }

  .menu-footer-container ul.menu li {
    margin-bottom: 8px;
  }

  /* Newsletter */
  .blossomthemes-email-newsletter-wrapper .text-holder h3 {
    font-size: 1.1em;
  }

  /* Sticky sidebar compact on small screens */
  .easy-sticky-sidebar.sticky-cta {
    --width: min(90%, 270px);
  }

  .easy-sticky-sidebar .sticky-sidebar-content {
    max-width: 80vw;
  }

  .easy-sticky-sidebar .sticky-sidebar-button {
    --buttonWidth: 30px;
    padding: 6px 8px;
  }

  .easy-sticky-sidebar .sticky-sidebar-button div {
    font-size: 12px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-text {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-image {
    height: 60px;
  }

  .easy-sticky-sidebar .sticky-sidebar-text img {
    max-width: 50%;
  }

  .easy-sticky-sidebar .sticky-sidebar-call-to-action {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* Tables scroll hint */
  .entry-content table td,
  .entry-content table th {
    min-width: 100px;
  }

  /* About section text */
  .featured_page_content p,
  .entry-content p {
    font-size: 0.9em;
    line-height: 1.7;
  }
}

/* ========================================
   EXTRA SMALL: max-width 360px
   ======================================== */
@media screen and (max-width: 360px) {

  .banner-caption .banner-title {
    font-size: 0.95em !important;
  }

  .banner-caption .banner-title:nth-of-type(3) {
    font-size: 1.1em !important;
  }

  .site-banner .countdown-wrap {
    width: 44%;
  }

  .site-banner .countdown-wrap .days,
  .site-banner .countdown-wrap .hours,
  .site-banner .countdown-wrap .minutes,
  .site-banner .countdown-wrap .seconds {
    font-size: 1.2em;
  }

  .contact-list li a {
    font-size: 0.85em;
    word-break: break-all;
  }

  .easy-sticky-sidebar.sticky-cta {
    --width: min(90%, 240px);
  }

  .easy-sticky-sidebar .sticky-sidebar-button {
    --buttonWidth: 26px;
    padding: 5px 6px;
  }

  .easy-sticky-sidebar .sticky-sidebar-button div {
    font-size: 10px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-text {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }

  .easy-sticky-sidebar .sticky-sidebar-image {
    height: 45px;
  }

  .easy-sticky-sidebar .sticky-sidebar-text img {
    max-width: 45%;
  }

  .easy-sticky-sidebar .sticky-sidebar-call-to-action {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }
}
