:root {
  --gal-blue:#28a9df;
  --gal-navy:#071653;
  --gal-red:#e3a13a;
  --gal-gold:#e3a13a;
  --gal-ink:#27304f
}
html,body {
  max-width:100%;
  overflow-x:hidden;
  margin:0;
  background:#f7fcfe;
  font-family:'Poppins',sans-serif
}
* {
  box-sizing:border-box
}
.gallery-hero {
  position:relative;
  min-height:370px;
  padding:58px 20px 105px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:#fff;
  text-align:center;
  background:radial-gradient(circle at 82% 22%,rgba(227,161,58,.28),transparent 24%),linear-gradient(125deg,rgba(7,22,83,.94),rgba(21,52,127,.82)),url('../images/galeria1/slider-img1.jpg') no-repeat center/cover
}
.gallery-hero::before {
  content:'';
  position:absolute;
  width:270px;
  height:270px;
  left:-100px;
  top:-90px;
  border:45px solid rgba(255,255,255,.07);
  border-radius:50%
}
.gallery-hero::after {
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:85px;
  background:#f7f9fc;
  clip-path:polygon(0 72%,8% 62%,18% 70%,29% 50%,40% 63%,53% 42%,66% 62%,79% 48%,90% 65%,100% 50%,100% 100%,0 100%)
}
.gallery-hero-content {
  position:relative;
  z-index:2;
  max-width:900px;
  padding:0
}
.gallery-chip {
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  margin-bottom:1.1rem;
  padding:.58rem 1rem;
  border:1px solid rgba(255,255,255,.25);
  border-radius:999px;
  color:#fff3b8;
  background:rgba(255,255,255,.1);
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase
}
.gallery-hero h1 {
  margin:0;
  color:#fff;
  font-size:clamp(3rem,7vw,5.2rem);
  font-weight:900;
  line-height:1.02;
  letter-spacing:-.05em;
  text-shadow:0 5px 16px rgba(3,21,50,.28)
}
.gallery-hero h1 span {
  color:var(--gal-gold)
}
.gallery-hero p {
  max-width:680px;
  margin:1rem auto 0;
  color:rgba(255,255,255,.87);
  font-size:clamp(1rem,2vw,1.15rem);
  line-height:1.65
}
.gallery-wrapper {
  width:calc(100% - 48px);
  max-width:1180px;
  margin:-72px auto 70px;
  position:relative;
  z-index:10
}
.gallery-intro {
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:1.4rem;
  margin-bottom:1.5rem;
  padding:1.45rem;
  border:1px solid #e4eaf0;
  border-radius:25px;
  background:#fff;
  box-shadow:0 22px 55px rgba(8,43,98,.12)
}
.gallery-intro-icon {
  width:76px;
  height:76px;
  display:grid;
  place-items:center;
  border-radius:21px;
  color:#fff;
  background:linear-gradient(145deg,var(--gal-blue),var(--gal-navy));
  font-size:2rem;
  transform:rotate(-3deg)
}
.gallery-intro small {
  display:block;
  margin-bottom:.3rem;
  color:var(--gal-red);
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase
}
.gallery-intro h2 {
  margin:0 0 .4rem;
  color:var(--gal-ink);
  font-size:clamp(1.4rem,3vw,2rem);
  font-weight:800
}
.gallery-intro p {
  margin:0;
  color:#607086;
  line-height:1.7
}
.gallery-list {
  display:grid;
  gap:1.5rem
}
.gallery-card {
  padding:clamp(1.1rem,2.5vw,1.7rem);
  overflow:hidden;
  border:1px solid #e4eaf0;
  border-radius:26px;
  background:#fff;
  box-shadow:0 18px 45px rgba(8,43,98,.1)
}
.gallery-card-header {
  display:flex;
  align-items:center;
  gap:.9rem;
  margin-bottom:1rem
}
.gallery-card-icon {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  flex:0 0 48px;
  border-radius:15px;
  color:#fff;
  background:var(--gal-blue)
}
.gallery-card h2 {
  margin:0 0 .2rem;
  color:var(--gal-navy);
  font-size:1.35rem;
  font-weight:800
}
.gallery-card-header p {
  margin:0;
  color:#718096;
  font-size:.82rem
}
.gallery-carousel {
  overflow:hidden;
  border-radius:19px;
  background:#0f172a;
  box-shadow:0 10px 25px rgba(8,43,98,.14)
}
.gallery-carousel .carousel-item {
  position:relative;
  background:#0f172a
}
.media-frame {
  position:relative;
  width:100%;
  height:520px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden
}
.media-frame img,.media-frame iframe {
  display:block;
  width:100%;
  height:100%;
  border:0;
  object-fit:contain
}
.media-frame.image-frame::before {
  content:'';
  position:absolute;
  inset:-22px;
  background-image:var(--media-bg);
  background-size:cover;
  background-position:center;
  filter:blur(18px) brightness(.62);
  transform:scale(1.12)
}
.media-frame.image-frame img {
  position:relative;
  z-index:1;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:100%
}
.custom-caption {
  position:absolute!important;
  z-index:4;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  padding:18px 24px!important;
  color:#1e293b!important;
  text-align:center!important;
  background:rgba(255,255,255,.86)!important;
  border-top:1px solid rgba(255,255,255,.6);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px)
}
.custom-caption h5 {
  margin:0 0 .25rem;
  color:#0f172a;
  font-size:1.08rem;
  font-weight:800
}
.custom-caption p {
  margin:0;
  color:#334155;
  font-size:.88rem;
  font-weight:500
}
.gallery-carousel .carousel-control-prev-icon,.gallery-carousel .carousel-control-next-icon {
  width:2.8rem;
  height:2.8rem;
  border-radius:50%;
  background-color:rgba(8,43,98,.9);
  background-size:55%
}
.gallery-carousel .carousel-indicators {
  z-index:6
}
.gallery-carousel .carousel-indicators [data-bs-target] {
  width:9px;
  height:9px;
  border:2px solid #fff;
  border-radius:50%;
  background:#fff
}
.gallery-carousel .carousel-indicators .active {
  width:25px;
  border-radius:999px;
  background:var(--gal-gold)
}
.gallery-empty {
  padding:3rem 1.5rem;
  border:1px dashed #bfd2df;
  border-radius:24px;
  color:#718096;
  background:#fff;
  text-align:center
}
.gallery-empty i {
  display:block;
  margin-bottom:.8rem;
  color:#9bb3c4;
  font-size:3rem
}
.gallery-empty h2 {
  color:var(--gal-navy);
  font-size:1.25rem;
  font-weight:800
}
@media(max-width:768px) {
  .gallery-hero {
    min-height:330px;
    padding:48px 18px 90px
  }
  .gallery-wrapper {
    width:calc(100% - 24px);
    margin:-48px auto 50px
  }
  .gallery-intro {
    grid-template-columns:1fr;
    text-align:center
  }
  .gallery-intro-icon {
    margin:auto
  }
  .gallery-card {
    border-radius:20px
  }
  .media-frame {
    height:340px
  }
  .custom-caption {
    padding:11px 14px!important
  }
  .custom-caption h5 {
    font-size:.95rem
  }
  .custom-caption p {
    font-size:.76rem
  }
}
/* GALERIA ALINEADA CON VIDA EN GENESIS */ .gallery-hero-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  margin-top:1.6rem
}
.gallery-hero-actions a {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 18px;
  border:2px solid var(--gal-gold);
  border-radius:13px;
  color:#fff;
  font-size:.86rem;
  font-weight:800;
  text-decoration:none;
  transition:.25s
}
.gallery-hero-actions a:last-child {
  color:var(--gal-navy);
  background:var(--gal-gold)
}
.gallery-hero-actions a:hover {
  transform:translateY(-3px);
  box-shadow:0 12px 25px rgba(0,0,0,.2)
}
.gallery-intro {
  border-color:rgba(7,22,83,.08);
  box-shadow:0 20px 48px rgba(7,22,83,.12)
}
.gallery-intro-icon {
  background:linear-gradient(145deg,var(--gal-navy),#15347f);
  box-shadow:0 11px 24px rgba(7,22,83,.22)
}
.gallery-card {
  position:relative;
  border-color:rgba(7,22,83,.08);
  box-shadow:0 18px 42px rgba(7,22,83,.1);
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease
}
.gallery-card:hover {
  transform:translateY(-5px);
  border-color:rgba(227,161,58,.42);
  box-shadow:0 25px 52px rgba(7,22,83,.15)
}
.gallery-card-icon {
  background:linear-gradient(145deg,var(--gal-navy),#15347f);
  box-shadow:0 8px 18px rgba(7,22,83,.2)
}
.gallery-card:nth-child(even) .gallery-card-icon {
  background:linear-gradient(145deg,#c98521,var(--gal-gold))
}
.gallery-carousel .carousel-control-prev-icon,.gallery-carousel .carousel-control-next-icon {
  background-color:rgba(7,22,83,.92)
}
.gallery-return {
  padding:0 20px 78px;
  background:#f7f9fc
}
.gallery-return__inner {
  display:grid;
  grid-template-columns:58px 1fr auto;
  align-items:center;
  gap:18px;
  width:min(1180px,100%);
  margin:auto;
  padding:25px 28px;
  border:1px solid rgba(227,161,58,.45);
  border-radius:24px;
  color:#fff;
  background:linear-gradient(125deg,#071653,#15347f);
  box-shadow:0 18px 42px rgba(7,22,83,.18)
}
.gallery-return__icon {
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:17px;
  color:var(--gal-navy);
  background:var(--gal-gold);
  font-size:1.4rem
}
.gallery-return h2 {
  margin:0 0 3px;
  color:#fff;
  font-size:1.35rem;
  font-weight:800
}
.gallery-return p {
  margin:0;
  color:rgba(255,255,255,.75);
  font-size:.88rem
}
.gallery-return a {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 17px;
  border-radius:12px;
  color:var(--gal-navy);
  background:var(--gal-gold);
  font-weight:800;
  text-decoration:none
}
@media(max-width:700px) {
  .gallery-hero-actions {
    flex-direction:column
  }
  .gallery-hero-actions a {
    justify-content:center;
    width:100%
  }
  .gallery-return__inner {
    grid-template-columns:50px 1fr
  }
  .gallery-return__icon {
    width:50px;
    height:50px
  }
  .gallery-return a {
    grid-column:1/-1;
    justify-content:center
  }
  .media-frame {
    height:300px
  }
}
/* TITULO SUPERIOR Y DESCRIPCION DE GALERIA */ .gallery-card-header {
  position:relative;
  margin-bottom:1.15rem;
  padding:0 4px
}
.gallery-card-header>div:last-child {
  min-width:0
}
.gallery-card-meta {
  display:inline-flex!important;
  align-items:center;
  gap:7px;
  margin-top:5px!important;
  padding:6px 10px;
  border-radius:999px;
  color:#5e6b82!important;
  background:#f3f5f9;
  font-size:.74rem!important;
  font-weight:700
}
.gallery-card-meta i {
  color:var(--gal-gold)
}
.gallery-carousel {
  position:relative;
  border:1px solid rgba(255,255,255,.1);
  border-radius:22px;
  box-shadow:0 16px 36px rgba(7,22,83,.2)
}
.gallery-carousel .carousel-item {
  position:relative;
  padding-top:0
}
.media-topbar {
  position:absolute;
  z-index:8;
  top:16px;
  right:18px;
  left:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none
}
.media-upload-title {
  display:flex;
  align-items:center;
  gap:10px;
  max-width:min(76%,720px);
  padding:11px 15px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:14px;
  color:#fff;
  background:rgba(7,22,83,.86);
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  font-size:.96rem;
  font-weight:800
}
.media-upload-title i {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  flex:0 0 30px;
  border-radius:9px;
  color:var(--gal-navy);
  background:var(--gal-gold)
}
.media-upload-title span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.media-position {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:60px;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  color:#fff;
  background:rgba(7,22,83,.8);
  box-shadow:0 8px 20px rgba(0,0,0,.2);
  font-size:.78rem;
  font-weight:800;
  backdrop-filter:blur(10px)
}
.custom-caption {
  padding:17px 24px!important;
  text-align:left!important
}
.custom-caption .caption-label {
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:6px;
  color:var(--gal-navy);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase
}
.custom-caption .caption-label i {
  color:#c98521
}
.custom-caption p {
  color:#42516a!important;
  font-size:.91rem!important;
  line-height:1.55
}
.gallery-carousel .carousel-control-prev,.gallery-carousel .carousel-control-next {
  z-index:7;
  width:9%;
  opacity:.95
}
.gallery-carousel .carousel-control-prev-icon,.gallery-carousel .carousel-control-next-icon {
  border:2px solid rgba(255,255,255,.78);
  box-shadow:0 8px 20px rgba(0,0,0,.28)
}
.gallery-carousel .carousel-indicators {
  margin-bottom:6px
}
@media(max-width:768px) {
  .media-topbar {
    top:10px;
    right:10px;
    left:10px
  }
  .media-upload-title {
    max-width:78%;
    padding:8px 10px;
    font-size:.78rem
  }
  .media-upload-title i {
    width:25px;
    height:25px;
    flex-basis:25px
  }
  .media-position {
    min-width:50px;
    padding:7px 9px;
    font-size:.68rem
  }
  .custom-caption {
    padding:12px 14px!important
  }
  .custom-caption p {
    font-size:.78rem!important
  }
  .gallery-carousel .carousel-control-prev,.gallery-carousel .carousel-control-next {
    width:13%
  }
}
/* DESCRIPCION DEBAJO DE LA FOTOGRAFIA */ .gallery-carousel .custom-caption  {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 92px;
    padding: 18px 24px 20px !important;
    border-top: 4px solid var(--gal-gold);
    color: var(--gal-ink) !important;
    text-align: left !important;
    background: #fff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.gallery-carousel .custom-caption .caption-label  {
    margin-bottom: 7px;
    color: #a56815;
}
.gallery-carousel .custom-caption p  {
    margin: 0;
    color: #536078 !important;
    font-size: .92rem !important;
    line-height: 1.65;
}
.gallery-carousel .carousel-indicators  {
    display: none;
}
.gallery-carousel .carousel-control-prev, .gallery-carousel .carousel-control-next  {
    bottom: 92px;
}
@media (max-width: 768px)  {
    .gallery-carousel .custom-caption  {
        min-height: 82px;
        padding: 14px 16px 17px !important;
  }
    .gallery-carousel .carousel-control-prev,   .gallery-carousel .carousel-control-next  {
        bottom: 82px;
  }
}
/* PANEL INFERIOR SIN CAROUSEL CAPTION */ .gallery-carousel .media-description  {
    position: relative;
    z-index: 5;
    display: block;
    width: 100%;
    margin: 0;
    padding: 17px 24px 19px;
    border-top: 4px solid var(--gal-gold);
    color: var(--gal-ink);
    text-align: left;
    background: #fff;
}
.gallery-carousel .media-description .caption-label  {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: #a56815;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.gallery-carousel .media-description p  {
    width: 100%;
    margin: 0;
    color: #536078;
    font-size: .91rem;
    line-height: 1.6;
}
.gallery-carousel .carousel-control-prev, .gallery-carousel .carousel-control-next  {
    top: 0;
    bottom: auto;
    height: 520px;
}
@media (max-width: 768px)  {
    .gallery-carousel .media-description  {
        padding: 14px 16px 17px;
  }
    .gallery-carousel .media-description p  {
        font-size: .8rem;
  }
    .gallery-carousel .carousel-control-prev,   .gallery-carousel .carousel-control-next  {
        height: 300px;
  }
}
/* Controles compactos y centrados sobre la fotografia */ .gallery-carousel .carousel-control-prev, .gallery-carousel .carousel-control-next  {
      position: absolute !important;
      top: 260px !important;
      bottom: auto !important;
      width: 52px !important;
      height: 52px !important;
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 50% !important;
      background: transparent !important;
      opacity: 1 !important;
      transform: translateY(-50%) !important;
      filter: none !important;
      z-index: 8 !important;
}
.gallery-carousel .carousel-control-prev  {
   left: 20px !important;
}
.gallery-carousel .carousel-control-next  {
   right: 20px !important;
}
.gallery-carousel .carousel-control-prev-icon, .gallery-carousel .carousel-control-next-icon  {
      display: block !important;
      width: 48px !important;
      height: 48px !important;
      flex: 0 0 48px !important;
      border: 2px solid rgba(255,255,255,.78) !important;
      border-radius: 50% !important;
      background-color: #0b246c !important;
      background-size: 46% 46% !important;
      box-shadow: 0 8px 22px rgba(5,20,66,.26) !important;
}
.gallery-carousel .carousel-control-prev:hover .carousel-control-prev-icon, .gallery-carousel .carousel-control-next:hover .carousel-control-next-icon  {
      background-color: #df9824 !important;
      transform: scale(1.08);
}
@media (max-width: 700px)  {
      .gallery-carousel .carousel-control-prev,     .gallery-carousel .carousel-control-next  {
            top: 150px !important;
            width: 44px !important;
            height: 44px !important;
  }
      .gallery-carousel .carousel-control-prev  {
     left: 10px !important;
  }
      .gallery-carousel .carousel-control-next  {
     right: 10px !important;
  }
      .gallery-carousel .carousel-control-prev-icon,     .gallery-carousel .carousel-control-next-icon  {
            width: 42px !important;
            height: 42px !important;
            flex-basis: 42px !important;
  }
}
/* Catalogo de galerias con apertura en ventana emergente */ .gallery-list {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px
}
.gallery-card {
  padding:0;
  cursor:pointer
}
.gallery-card-trigger {
  position:relative;
  display:block;
  width:100%;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:25px;
  color:inherit;
  background:#fff;
  text-align:left
}
.gallery-card-cover {
  position:relative;
  height:270px;
  overflow:hidden;
  background:#0f172a
}
.gallery-card-cover img {
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease
}
.gallery-card-trigger:hover .gallery-card-cover img {
  transform:scale(1.07)
}
.gallery-card-overlay {
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding:20px;
  color:#fff;
  background:linear-gradient(180deg,transparent 34%,rgba(4,15,55,.9))
}
.gallery-card-count,.gallery-card-open {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(7,22,83,.88);
  font-size:.72rem;
  font-weight:800;
  backdrop-filter:blur(8px)
}
.gallery-card-open {
  width:42px;
  height:42px;
  justify-content:center;
  padding:0;
  color:var(--gal-navy);
  background:var(--gal-gold);
  font-size:1rem
}
.gallery-card-content {
  padding:20px 21px 22px
}
.gallery-card-content small {
  color:#a56815;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase
}
.gallery-card-content h2 {
  margin:7px 0 6px;
  font-size:1.18rem
}
.gallery-card-content p {
  margin:0;
  color:#718096;
  font-size:.8rem
}
.gallery-modal .modal-dialog {
  max-width:min(1180px,calc(100% - 32px));
  margin:24px auto
}
.gallery-modal .modal-content {
  overflow:hidden;
  border:0;
  border-radius:26px;
  background:#fff;
  box-shadow:0 30px 80px rgba(7,22,83,.3)
}
.gallery-modal .modal-header {
  padding:16px 20px;
  border-bottom:1px solid #e8edf5;
  background:#fff
}
.gallery-modal .modal-title {
  display:flex;
  align-items:center;
  gap:11px;
  color:var(--gal-navy);
  font-size:1.12rem;
  font-weight:800
}
.gallery-modal .modal-title i {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  color:var(--gal-navy);
  background:var(--gal-gold)
}
.gallery-modal .modal-body {
  padding:0;
  background:#0f172a
}
.gallery-modal .gallery-carousel {
  border:0;
  border-radius:0;
  box-shadow:none
}
.gallery-modal .btn-close {
  padding:10px;
  border-radius:50%;
  background-color:#eef2f8;
  opacity:1
}
@media(max-width:980px) {
  .gallery-list {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}
@media(max-width:620px) {
  .gallery-list {
    grid-template-columns:1fr;
    gap:18px
  }
  .gallery-card-cover {
    height:235px
  }
  .gallery-modal .modal-dialog {
    max-width:calc(100% - 16px);
    margin:8px auto
  }
  .gallery-modal .modal-content {
    border-radius:18px
  }
}
/* Capa y cierre robusto del modal */ body.modal-open .gallery-wrapper {
  z-index:1060
}
.gallery-modal {
  z-index:1070!important;
  background:rgba(4,15,55,.72)
}
.gallery-modal.show {
  display:block!important;
  pointer-events:auto!important
}
.gallery-modal .modal-dialog,.gallery-modal .modal-content,.gallery-modal .modal-header {
  pointer-events:auto!important
}
.gallery-modal-close {
  position:relative;
  z-index:20;
  cursor:pointer!important
}
.modal-backdrop {
  display:none!important;
  pointer-events:none!important
}
