:root{
  --white:#ffffff;
  --offwhite:#f7f4ef;
  --black:#101010;
  --dark:#1b1b1b;
  --muted:#686868;
  --line:#e7e1d8;
  --red:#e5392e;
  --red-dark:#c62821;
}

html{scroll-behavior:smooth;}
body{
  font-family:"Karla", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:var(--white);
  color:var(--black);
  overflow-x:hidden;
}

h1,h2,h3,.navbar-brand,.btn{
  font-family:"Baloo Thambi 2", system-ui, sans-serif;
}
h1,h2,h3{letter-spacing:-.03em;}
h1{font-size:clamp(3.3rem,7.2vw,5rem);line-height:.92;font-weight:800;}
h2{font-size:clamp(2.5rem,5.5vw,4.2rem);line-height:.88;font-weight:800;}
h3{font-size:1.3rem;font-weight:800;}
p {
    line-height: 1.6;
    letter-spacing: -0.5px;}

.rdp-navbar{
  background:rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(16,16,16,.08);
}
.nav-logo{width:78px;height:auto;display:block;filter:invert(1);} 
.nav-link{font-weight:800;color:var(--black)!important;text-transform:uppercase;font-size:.82rem;letter-spacing:.04em;}
.nav-link:hover{color:var(--red)!important;}
.navbar-toggler{border:0;box-shadow:none!important;}

.btn{font-weight:800;text-transform:uppercase;letter-spacing:.02em;}
.btn-primary{--bs-btn-bg:var(--red);--bs-btn-border-color:var(--red);--bs-btn-hover-bg:var(--red-dark);--bs-btn-hover-border-color:var(--red-dark);color:#fff;}
.btn-outline-dark{--bs-btn-hover-bg:var(--black);--bs-btn-hover-border-color:var(--black);font-weight:800;}

.hero-section{padding:140px 0 88px;background:var(--white);overflow:hidden;}
.eyebrow{font-size:.78rem;text-transform:uppercase;letter-spacing:.16em;font-weight:900;color:var(--red);margin-bottom:1rem;}
.hero-text{font-size:1.24rem;line-height:1.55;color:var(--muted);max-width:570px;font-weight:500;}

.hero-card{position:relative;border-radius:34px;background:var(--black);padding:12px;box-shadow:0 28px 80px rgba(0,0,0,.16);transform:rotate(3deg);} 
.img-cover{width:100%;height:100%;object-fit:cover;display:block;}
.hero-image {
    height: min(72vh,680px);
    min-height: 520px;
    border-radius: 25px;
    object-position: 0 -220px;
}
.hero-logo-badge{position:absolute;top:24px;left:24px;width:112px;height:112px;background:var(--red);border-radius:50%;display:flex;align-items:center;justify-content:center;padding:16px;box-shadow:0 14px 30px rgba(0,0,0,.22);}
.hero-logo-badge img{width:100%;height:auto;}
.hero-floating{position:absolute;left:-48px;bottom:68px;background:#fff;border:2px solid var(--black);border-radius:26px;padding:18px 22px;box-shadow:10px 10px 0 var(--red);max-width:260px; transform: rotate(-8deg);
}
.hero-floating strong{display:block;font-family:"Baloo Thambi 2";font-size:1.7rem;line-height:1;color:var(--red);
                      text-transform:uppercase; letter-spacing: -1px;
}
.hero-floating span{font-size:.94rem;color:var(--black);font-weight:700;line-height:1.25;display:block;margin-top:4px;}

.section{padding:92px 0;}
.section-white{background:#fff;}
.bg-soft{background:var(--offwhite);}
.intro-strip{padding:44px 0;background:var(--black);color:#fff;}
.intro-strip h3{color:#fff;font-size:1.6rem;}
.intro-strip p{color:rgba(255,255,255,.76);margin-bottom:0;}
.section-title{max-width:790px;margin:0 auto 46px;text-align:center;}
.section-title p:not(.eyebrow),.section-lead{font-size:1.1rem;color:var(--muted);font-weight:500;}

.info-card,.care-card,.help-card,.cta-card,.vet-box{
  border:2px solid var(--black);
  background:#fff;
  border-radius:30px;
  padding:30px;
  height:100%;
  box-shadow:8px 8px 0 rgba(16,16,16,.08);
}
.info-card ul{padding-left:1.1rem;color:var(--muted);line-height:1.8;font-weight:500;}
.card-number{display:inline-flex;font-size:.84rem;font-weight:900;color:var(--red);margin-bottom:18px;letter-spacing:.08em;}
.cta-card{background:var(--red);color:#fff;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;}
.cta-card p{color:rgba(255,255,255,.88);}
.cta-card small{margin-top:14px;opacity:.75;}
.care-card p,.help-card p,.vet-box p{color:var(--muted);line-height:1.65;margin-bottom:0;font-weight:500;}
.care-card-alert{background:var(--black);color:#fff;}
.care-card-alert p{color:rgba(255,255,255,.76);}
.vet-box{background:#fff;}
.vet-box h3{margin-bottom:1.4rem;}

.help-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;}
.help-card span{font-size:2rem;display:block;margin-bottom:1rem;}
.help-card strong{display:block;margin-top:1rem;font-size:1.15rem;background:var(--red);color:#fff;padding:12px 15px;border-radius:16px;}

.bg-dark-custom{background:var(--black);}
.bg-dark-custom p{color:rgba(255,255,255,.76);font-size:1.05rem;line-height:1.7;font-weight:500;}
.image-collage{position:relative;min-height:560px;}
.collage-main {
    height: 520px;
    border-radius: 30px;
    border: 3px solid #fff;
    object-position: 0 -75px;
}
.collage-small{position:absolute;right:-28px;bottom:0;width:46%;height:250px;border-radius:26px;border:3px solid #fff;box-shadow:0 20px 50px rgba(0,0,0,.35);}

.dream-section{background:#fff;}
.tall-image{height:590px;border-radius:34px;border:2px solid var(--black);box-shadow:12px 12px 0 var(--red);}
.gallery-section{background:var(--offwhite);}
.gallery-grid{display:grid;grid-template-columns:1.15fr .85fr 1fr 1fr;gap:14px;height:520px;}
.gallery-grid img{border-radius:26px;border:2px solid var(--black);}
.gallery-grid img:nth-child(1){grid-row:span 2;}
.gallery-grid img:nth-child(2){object-position:center bottom;}

.final-cta{background:var(--red);color:#fff;}
.final-logo{width:140px;margin-bottom:22px;}
.final-cta h2{font-size:clamp(3rem,6vw,6.5rem);}
.final-cta p{font-size:1.2rem;color:rgba(255,255,255,.85);}
.final-cta h3{display:inline-block;background:#fff;color:var(--black);border:2px solid var(--black);border-radius:22px;padding:16px 26px;margin-top:24px;box-shadow:8px 8px 0 var(--black);}
.contact-list{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin-top:20px;}
.contact-list a{color:#fff;font-weight:900;text-decoration:underline;text-underline-offset:4px;}
.footer{padding:28px 0;background:var(--black);color:#fff;}

@media(max-width:991px){
  .hero-section{padding-top:120px;}
  .help-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hero-image{height:560px;min-height:0;}
  .gallery-grid{grid-template-columns:1fr 1fr;height:auto;}
  .gallery-grid img{height:340px;}
  .gallery-grid img:nth-child(1){grid-row:auto;}
}
@media(max-width:575px){
  .nav-logo{width:62px;}
  .section{padding:66px 0;}
  .help-grid{grid-template-columns:1fr;}
  .hero-card{transform:none;}
  .hero-image{height:430px;}
  .hero-logo-badge{width:82px;height:82px;top:16px;left:16px;}
  .hero-floating{position:static;margin-top:16px;max-width:100%;box-shadow:6px 6px 0 var(--red);}
  .section-title{text-align:left;}
  .image-collage{min-height:0;}
  .collage-main{height:380px;}
  .collage-small{position:relative;right:auto;bottom:auto;width:70%;height:190px;margin:-70px 0 0 auto;}
  .tall-image{height:420px;}
  .gallery-grid{grid-template-columns:1fr;}
  .gallery-grid img{height:360px;}
  .contact-list{flex-direction:column;gap:8px;}
}

/* Ajustes pedidos: slider de fotos, favicon, donaciones y overflow mobile */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }
.container { max-width: min(1320px, calc(100vw - 24px)); }
.row { margin-left: 0; margin-right: 0; }

.rdp-photo-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0 54px;
}
.slider-window {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.slider-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 10px;
}
.slider-track::-webkit-scrollbar { display: none; }
.photo-slide {
  flex: 0 0 calc((100% - 54px) / 4);
  height: 520px;
  border: 2px solid var(--black);
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
}
.photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-size: 34px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 5px 5px 0 var(--red);
  transition: transform .2s ease, box-shadow .2s ease;
}
.slider-arrow:hover {
  transform: translateY(-50%) translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--red);
}
.slider-prev { left: 2px; }
.slider-next { right: 2px; }

.donation-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.final-cta .donation-buttons .btn {
  color: var(--black);
  border: 2px solid var(--black);
  box-shadow: 5px 5px 0 var(--black);
  padding-left: 22px;
  padding-right: 22px;
}
.final-cta .donation-buttons .btn:hover {
  background: var(--black);
  color: var(--white);
}

@media(max-width:991px){
  .rdp-photo-slider{padding:0 46px;}
  .photo-slide{flex-basis:calc((100% - 18px) / 2);height:440px;}
}
@media(max-width:575px){
  .container { max-width: calc(100vw - 24px); padding-left: 0; padding-right: 0; }
  .rdp-photo-slider{padding:0 42px;}
  .photo-slide{flex-basis:100%;height:430px;border-radius:22px;}
  .slider-arrow{width:38px;height:38px;font-size:28px;box-shadow:4px 4px 0 var(--red);}
  .donation-buttons{flex-direction:column;align-items:center;}
  .donation-buttons .btn{width:min(100%, 260px);}
}

/* Banner parallax */
.rdp-parallax-banner{
  position:relative;
  min-height:560px;
  width:100%;
  display:flex;
  align-items:center;
  overflow:hidden;
  background-image:url("img/refugio-parallax.jpg");
  background-size:cover;
  background-position:top 42%;
  background-repeat:no-repeat;
  background-attachment:fixed;
}
.rdp-parallax-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.68), rgba(0,0,0,.42));
  z-index:0;
}
.rdp-parallax-banner .container{
  position:relative;
  z-index:1;
}
.rdp-parallax-content{
  max-width:920px;
  color:#fff;
}
    .rdp-parallax-content h2 {
        color: #fff;
        font-size: clamp(3rem, 6.4vw, 5.5rem);
        line-height: .92;
        text-shadow: 0 10px 30px rgba(0,0,0,.35);
        margin: 0;
        text-wrap: balance;
    }

@media(max-width:768px){
  .rdp-parallax-banner{
    min-height:520px;
    background-attachment:scroll;
    background-position:center center;
  }
  .rdp-parallax-overlay{
    background:rgba(0,0,0,.58);
  }
  .rdp-parallax-content h2{
    font-size:clamp(2.7rem, 13vw, 4.2rem);
  }
}

/* Correcciones puntuales v7 */
.footer-instagram{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  font-weight:900;
}
.footer-instagram:hover{color:var(--red);}
.footer-instagram svg{
  width:22px;
  height:22px;
  fill:currentColor;
  display:block;
}

/* Carrusel mobile para pilares */
.intro-carousel-dots{
  display:none;
}

@media(max-width:575px){
  .intro-strip{
    padding:48px 0;
    overflow:hidden;
  }
  .intro-strip .container{
    max-width:100%;
    padding-left:24px;
    padding-right:24px;
  }
  .intro-carousel{
    width:100%;
    overflow:hidden;
  }
  .intro-carousel-track{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
    gap:0!important;
    padding:0;
    margin-left:0!important;
    margin-right:0!important;
    scrollbar-width:none;
    cursor:grab;
  }
  .intro-carousel-track:active{
    cursor:grabbing;
  }
  .intro-carousel-track::-webkit-scrollbar{
    display:none;
  }
  .intro-carousel-slide{
    flex:0 0 100%!important;
    max-width:100%!important;
    min-width:100%!important;
    scroll-snap-align:center;
    padding:18px 24px 12px!important;
  }
  .intro-carousel-slide h3{
    font-size:1.65rem;
    margin-bottom:12px;
  }
  .intro-carousel-slide p{
    max-width:280px;
    margin-left:auto;
    margin-right:auto;
  }
  .intro-carousel-dots{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    margin-top:28px;
  }
  .intro-carousel-dots button{
    width:8px;
    height:8px;
    border:0;
    border-radius:999px;
    padding:0;
    background:rgba(255,255,255,.35);
  }
  .intro-carousel-dots button.active{
    background:var(--red);
    width:9px;
    height:9px;
  }
}

/* FIX v9: hero mobile sin bloque negro vacío */
@media(max-width:575px){
  .hero-section .row{
    --bs-gutter-x:0;
  }
  .hero-card{
    position:relative;
    width:min(330px, calc(100vw - 36px));
    margin:26px auto 0;
    padding:10px;
    border-radius:30px;
    transform:none;
    overflow:visible;
    box-shadow:0 18px 50px rgba(0,0,0,.14);
  }
  .hero-image{
    height:clamp(410px, 116vw, 520px);
    min-height:0;
    border-radius:22px;
    object-fit:cover;
    object-position:center center!important;
  }
  .hero-logo-badge{
    width:82px;
    height:82px;
    top:18px;
    left:18px;
    z-index:3;
  }
  .hero-floating{
    position:absolute!important;
    left:18px!important;
    right:18px!important;
    bottom:-28px!important;
    margin:0!important;
    max-width:none!important;
    padding:15px 18px;
    border-radius:22px;
    box-shadow:7px 7px 0 var(--red);
    transform:rotate(-6deg);
    z-index:4;
  }
  .hero-floating strong{
    font-size:1.35rem;
    line-height:1;
  }
  .hero-floating span{
    font-size:.86rem;
  }
  .hero-section{
    padding-bottom:92px;
  }
}
