/* Gabriel Messenger V134 — professional responsive layout
   Loaded last so it safely normalises the public header, carousel and content on phones/tablets. */

html, body { max-width: 100%; overflow-x: clip; }
img, video, iframe { max-width: 100%; }
.gm-main .container-fluid, #gmMasterHeader .container-fluid { width: 100%; }

/* Header and navigation */
#gmMasterHeader .gm-brand { min-width: 0; }
#gmMasterHeader .gm-brand-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.08; }
#gmMasterHeader .gm-brand-text strong,
#gmMasterHeader .gm-brand-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(40vw, 31rem); }
#gmMasterHeader .gm-top-global-search { min-width: 0; }
#gmMasterHeader .gm-menu-right { flex-wrap: nowrap; }
#gmMasterHeader .gm-lang-btn,
#gmMasterHeader .gm-account-btn { min-width: 0; max-width: 15rem; }
#gmMasterHeader .gm-lang-btn > span,
#gmMasterHeader .gm-account-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Carousel: stable layout with no oversized blank area */
.gm-carousel-shell { width: 100%; overflow: hidden; background: #eadca7; }
.gm-carousel-v100-slider,
.gm-carousel-v100-inner,
.gm-carousel-v100 .carousel-item,
.gm-carousel-v100-frame { width: 100%; }
.gm-carousel-v100-inner { aspect-ratio: 1900 / 550; min-height: 0 !important; }
.gm-carousel-v100 .carousel-item,
.gm-carousel-v100-frame { height: 100%; }
.gm-carousel-v100-frame { display: block; overflow: hidden; background: #eadca7; }
.gm-carousel-v100-img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
}
.gm-carousel-v100-control { width: clamp(2.75rem, 7vw, 5.25rem) !important; opacity: .86; }
.gm-carousel-v100-control .carousel-control-prev-icon,
.gm-carousel-v100-control .carousel-control-next-icon {
  width: clamp(1.75rem, 3vw, 2.75rem);
  height: clamp(1.75rem, 3vw, 2.75rem);
  padding: .35rem;
  border-radius: 50%;
  background-color: rgba(54, 17, 5, .55);
  background-size: 54% 54%;
  box-shadow: 0 .25rem .85rem rgba(0,0,0,.2);
}
.gm-carousel-v100-indicators { margin-bottom: clamp(.35rem, 1.2vw, .85rem); gap: .35rem; }
.gm-carousel-v100-indicators [data-bs-target] {
  width: clamp(1.25rem, 3vw, 2.2rem);
  height: .25rem;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background-clip: border-box;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* General content responsiveness */
.gm-section, .gm-detail, .gm-form-page { width: 100%; }
.gm-richtext, .gm-richtext * { overflow-wrap: anywhere; }
.gm-richtext img, .gm-richtext table, .gm-richtext iframe { max-width: 100% !important; }
.gm-richtext table, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gm-card-img, .gm-gallery-card img { aspect-ratio: 16 / 9; height: auto; }
.gm-two-col { align-items: start; }
.gm-footer .row > * { min-width: 0; }

@media (max-width: 1199.98px) {
  #gmMasterHeader .gm-navbar { padding: .55rem .75rem; }
  #gmMasterHeader .gm-navbar > .container-fluid { align-items: center; }
  #gmMasterHeader .gm-toggler { margin: 0; border: 1px solid rgba(102,55,0,.35); box-shadow: 0 .2rem .65rem rgba(56,25,0,.12); }
  #gmMasterHeader #gmNavbarContent {
    margin-top: .55rem;
    padding: .65rem;
    border: 1px solid rgba(126,76,8,.25);
    border-radius: .85rem;
    background: rgba(255,248,218,.98);
    box-shadow: 0 .8rem 2rem rgba(68,33,0,.15);
  }
  #gmMasterHeader .gm-menu-list { gap: .15rem; }
  #gmMasterHeader .gm-menu-item > .nav-link {
    width: 100%;
    justify-content: space-between;
    border-radius: .55rem;
    padding: .7rem .75rem !important;
  }
  #gmMasterHeader .gm-menu-item > .nav-link i { margin-right: .45rem; }
  #gmMasterHeader .gm-dropdown {
    position: static !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
    margin: .15rem 0 .4rem;
    box-shadow: none;
    border: 1px solid rgba(126,76,8,.18);
  }
  #gmMasterHeader .gm-menu-right {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: .5rem !important;
    padding-top: .55rem;
    border-top: 1px solid rgba(126,76,8,.2);
  }
  #gmMasterHeader .gm-menu-right .dropdown,
  #gmMasterHeader .gm-lang-btn,
  #gmMasterHeader .gm-account-btn { width: 100%; max-width: none; }
  #gmMasterHeader .gm-lang-btn,
  #gmMasterHeader .gm-account-btn { justify-content: center; }
}

@media (max-width: 991.98px) {
  #gmMasterHeader { position: sticky; top: 0; }
  #gmMasterHeader .gm-topbar { padding: .45rem 0; }
  #gmMasterHeader .gm-brand-logo-frame { flex: 0 0 auto; }
  #gmMasterHeader .gm-v112-vatican-logo { width: 42px !important; height: 42px !important; }
  #gmMasterHeader .gm-brand-text strong { font-size: 1.05rem; }
  #gmMasterHeader .gm-brand-text small { font-size: .65rem; }
  #gmMasterHeader .gm-top-search-mobile { padding: .45rem .75rem; }
  #gmMasterHeader .gm-top-search-mobile .gm-top-global-search { width: 100%; }

  .gm-carousel-v100-inner { aspect-ratio: 16 / 5.25 !important; }
  .gm-main { padding-top: 1.35rem; }
  .gm-section { margin-bottom: 2rem; }
  .gm-section-title, .gm-page-head { align-items: flex-start; }
  .gm-footer { padding-top: 2rem; }
}

@media (max-width: 767.98px) {
  #gmMasterHeader .gm-topbar .container-fluid { padding-inline: .75rem !important; }
  #gmMasterHeader .gm-brand-text strong,
  #gmMasterHeader .gm-brand-text small { max-width: calc(100vw - 5.5rem); }
  #gmMasterHeader .gm-brand-text strong { font-size: .98rem; }
  #gmMasterHeader .gm-brand-text small { display: none; }

  /* A useful mobile banner height while preserving the centre of 1900×550 artwork. */
  .gm-carousel-v100-inner { aspect-ratio: 2.35 / 1 !important; min-height: 150px !important; max-height: 250px; }
  .gm-carousel-v100-img { object-position: center center !important; }
  .gm-carousel-v100-control { width: 2.75rem !important; }
  .gm-carousel-v100-indicators { margin-bottom: .35rem; }

  .gm-main > .container-fluid { padding-inline: .85rem !important; }
  .gm-section-title, .gm-page-head,
  .gm-rating-panel, .gm-contact-card { flex-direction: column; align-items: stretch; }
  .gm-two-col { grid-template-columns: 1fr !important; }
  .gm-span-2 { grid-column: auto; }
  .gm-card-body, .gm-detail-body, .gm-form-card, .gm-auth-card { padding: 1rem; }
  .gm-table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .gm-footer .row { row-gap: 1.5rem; }
}

@media (max-width: 479.98px) {
  #gmMasterHeader .gm-v112-vatican-logo { width: 38px !important; height: 38px !important; }
  #gmMasterHeader .gm-brand { gap: .5rem; }
  #gmMasterHeader .gm-brand-text strong { font-size: .9rem; }
  #gmMasterHeader .gm-navbar { padding-inline: .55rem; }
  #gmMasterHeader .gm-menu-right { grid-template-columns: 1fr; }
  #gmMasterHeader .gm-lang-btn,
  #gmMasterHeader .gm-account-btn { min-height: 2.65rem; }

  .gm-carousel-v100-inner { aspect-ratio: 2 / 1 !important; min-height: 145px !important; max-height: 210px; }
  .gm-carousel-v100-control { width: 2.4rem !important; }
  .gm-carousel-v100-control .carousel-control-prev-icon,
  .gm-carousel-v100-control .carousel-control-next-icon { width: 1.7rem; height: 1.7rem; }
  .gm-carousel-v100-indicators [data-bs-target] { width: 1.15rem; }

  .gm-main { padding-bottom: 2rem; }
  .gm-section-title h2, .gm-page-head h1 { font-size: 1.55rem; }
  .gm-primary-btn, .gm-outline-btn, .gm-link-btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .gm-carousel-v100 .carousel-item { transition-duration: .01ms !important; }
}


/* V135 mobile non-sticky header */
@media (max-width:767.98px){
header,.top-header,.main-header,.navbar,.navbar-wrapper,.sticky-top,.fixed-top,.gm-header,.gm-navbar{
position:static !important;
top:auto !important;
}
body{padding-top:0!important;}
html{scroll-padding-top:0!important;}
}
