/* home.css */

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #fefefe;
    color: #0c1b33;
    overflow-x: hidden;
}
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
  background: url('../images/hero-bg-pattern.svg') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  text-align: left;
}

.hero-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  max-width:1200px;
  gap:2rem;
  /* keep as a row on wide screens */
  flex-direction: row;
}

/* Text left, image right on desktop */
.hero-text{
  flex: 1 1 52%;
  min-width: 280px;
  margin-left: 2%;
  order: 1;               /* text first (left) */
  text-align: left;
}
.hero-cat{
  flex: 1 1 44%;
  min-width: 260px;
  display:flex;
  justify-content:center;
  align-items:center;
  order: 2;               /* image second (right) */
}



.hero-cat img {
  max-width: 110%;
  height: auto;
  object-fit: contain;
}



.headline-hero {
  font-size: 3.5rem;
  font-weight: 800;
  color: #0a1a44;
  margin-bottom: 1rem;
  margin-left: 12%;
}

.desc-hero {
  font-size: 1.75rem;
  margin-bottom: 3rem;
  color: #3c4d6b;
  margin-left: 12%;
}

.btn{
  background-color: #f9a44c;
  color: white;
  padding: 1.25rem 2.5rem;
  border: none;
  margin-right: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
  
}
.hero-text .btn:first-of-type {
  margin-left: 12%;   /* align first button with headline & description */
}

.hero-text .btn {
  margin-right: 1rem; /* spacing between buttons */
  display: inline-block;
}

.btn:hover {
  background-color: #e68a28;
}

.btn.outline {
  background-color: white;
  color: #f9a44c;
  border: 2px solid #f9a44c;
}

.btn.outline:hover {
  background-color: #fff4e6;
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
  background: url('../images/hero-bg-pattern.svg') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  overflow: hidden;
}

.hero-side {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.left-side {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.left-side a {
  color: #0a1a44;
  font-size: 20px;
  transition: color 0.3s;
}

.left-side a:hover {
  color: #f9a44c;
}

.right-side {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
}

.right-side .dot {
  width: 10px;
  height: 10px;
  background-color: #0a1a44;
  border-radius: 50%;
  margin: 6px 0;
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(-50%) translateY(0);
  }
  50% {
    transform: translateY(-50%) translateY(-10px);
  }
}

.btn:hover,
.btn.outline:hover {
  transform: scale(1.05);
}


.featured-section {
  padding: 5rem 2rem;
  background: url('../images/featured-section-bg.svg') no-repeat center center;
  background-size: cover;
  text-align: center;
  position: relative;
}

.featured-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 3rem;
  opacity: 0;
}

.pet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.pet-card {
    opacity: 0;
  transform: translateY(20px);
  background: white;
  border-radius: 25px;
  padding: 1rem;
  width: 220px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pet-card:nth-child(1) { animation-delay: 0.1s; }
.pet-card:nth-child(2) { animation-delay: 0.2s; }
.pet-card:nth-child(3) { animation-delay: 0.3s; }

.pet-card:hover {
  transform: translateY(-10px) scale(1.03) rotateZ(-1deg);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}


.pet-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
}

.pet-info h3 {
  font-size: 1.1rem;
  font-weight: bold;
  color: #111;
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
}

.pet-info p {
  font-size: 0.9rem;
  color: #777;
}

.tags-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: white;
  font-weight: 500;
    animation: floatTag 3s ease-in-out infinite;
}

.tag.red {
  background-color: #ef476f;
}

.tag.blue {
  background-color: #118ab2;
}

.tag.yellow {
  background-color: #f4a261;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatTag {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


.how-it-works {
    background-color: #f5f5f5;
    background: url('../images/Mass\ Circles\ \(1\).svg') no-repeat center center;
    background-size: cover;
    background-size: cover;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
}

.how-it-works h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0a1a44;
    margin-bottom: 3rem;
}

.steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.step {
    max-width: 200px;
    text-align: center;
}

.circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #0a1a44;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2.5rem;
}

.step h3 {
    font-size: 1.2rem;
    color: #0a1a44;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.95rem;
    color: #333;
}

/* CTA Button */
.action-btn {
    background-color: #0a1a44;
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #08366e;
}

/* 🔹 Hover Effect */
.circle:hover {
    background-color: #e68900; /* Accent Orange */
    transform: scale(1.1);
}

.circle:hover i {
    color: #fff;
}

.sponsor-section {
  padding: 6rem 2rem;
  background: url('../images/Blob\ Group.svg') no-repeat center center;
  background-size: cover;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sponsor-section h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #0a1a44;
  margin-bottom: 3rem;
  font-family: 'Poppins', sans-serif;
}

.sponsor-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto 2.5rem;
}

.sponsor-icons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
  color: #fff;
  background-color: #0a1a44;
  padding: 1rem 0.7rem;
  border-radius: 20px;
}

.sponsor-icons i {
  font-size: 1.2rem;
  margin: 0.4rem;
}

.sponsor-image-wrapper {
  flex-shrink: 0;
}

.sponsor-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.sponsor-text {
  text-align: left;
  max-width: 300px;
}

.sponsor-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0a1a44;
  margin-bottom: 0.5rem;
}

.sponsor-text p {
  font-size: 0.95rem;
  color: #1a1a1a;
  line-height: 1.6;
}

.sponsor-btn {
  background-color: #0a1a44;
  color: white;
  padding: 0.9rem 2.2rem;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}

.sponsor-btn:hover {
  background-color: #08366e;
}

/* ==== Success Story Modal ==== */
.story-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}
.story-modal.open { display: block; }

.story-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}

.story-modal__dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  color: #0c1b33;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.story-modal__close {
  position: absolute;
  top: 10px; right: 12px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #0a1a44;
}

.story-modal__media {
  background: #f6f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 90vh;
}

.story-modal__content {
  padding: 24px 22px 28px;
  overflow: auto;
}
.story-modal__content h3 {
  margin: 0 0 8px;
  color: #0a1a44;
  font-size: 1.25rem;
  font-weight: 800;
}
.story-modal__content p {
  margin: 0;
  line-height: 1.6;
  color: #333;
}
.story-modal__meta {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #566;
}

/* Nav arrows */
.story-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: #0a1a44;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}
.story-modal__nav:hover { background: #f9a44c; }

.story-modal__nav--prev { left: 10px; }
.story-modal__nav--next { right: 10px; }

/* Responsive */
@media (max-width: 900px) {
  .story-modal__dialog {
    grid-template-columns: 1fr;
    width: min(640px, 94vw);
  }
  .story-modal__nav--prev { left: 6px; }
  .story-modal__nav--next { right: 6px; }
}


/* 🔹 Success Stories Section */
/* 🔹 Success Stories Section */
.success-stories {
  background-color: #002b62;
  background-image: url('../images/Rect\ Light.svg');
  background-size: cover;
  padding: 5rem 2rem;
  text-align: center;
  color: white;
}

.success-stories h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.success-stories .subtitle {
  font-size: 1rem;
  color: #d0dfff;
  margin-bottom: 3rem;
}

/* Wrapper keeps arrows positioned over the scroll area */
.story-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

/* Scroller */
.story-container {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 1.25rem;
  background-color: white;
  border-radius: 30px;
  scrollbar-width: none;           /* Firefox hide */
  -webkit-overflow-scrolling: touch;
  max-width: 1000px;               /* wider than 70% for better space */
  width: 90%;
  margin: 0 auto;
  position: relative;
}
.story-container::-webkit-scrollbar { display: none; }

/* Individual card */
.story-preview {
  position: relative;
  flex: 0 0 auto;
  width: 240px;
  height: 260px;
  border-radius: 20px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #f6f7fb;
  transition: transform 0.25s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.story-preview:hover { transform: translateY(-4px); }

.story-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Arrows overlayed on the scroller */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background-color: #0a1a44;
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}
.scroll-arrow:hover { background: #f9a44c; transform: translateY(-50%) scale(1.06); }
.scroll-arrow.left { left: 1.5rem; }
.scroll-arrow.right { right: 1.5rem; }

/* Optional: fade edges to hint scroll */
.story-container::before,
.story-container::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 1;
}
.story-container::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
  border-radius: 30px 0 0 30px;
}
.story-container::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
  border-radius: 0 30px 30px 0;
}

/* General quote */
.success-stories .general-quote {
  font-size: 1rem;
  font-style: italic;
  color: #e6ecff;
  max-width: 800px;
  margin: 0.5rem auto 0;
}

/* Responsive */
@media (max-width: 768px) {
  .story-container { width: 100%; padding: 1rem; }
  .story-preview { width: 70vw; height: 54vw; max-width: 320px; max-height: 260px; }
  .scroll-arrow { display: none; } /* rely on swipe on mobile */
}

/* 🔹 Support Section */
.support-section {
  background-image: url('../images/blob-scene-haikei.svg'); /* optional pattern background */
  background-size: cover;
  padding: 6rem 2rem;
  position: relative;
}

.support-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  justify-content: center;
}

.support-image-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
}

.ring-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, white 60%, transparent 61%), 
              conic-gradient(#f59e0b 0% 50%, #0a1a44 50% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
}

.support-text {
  max-width: 500px;
}

.support-text h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0a1a44;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
}

.support-text ul {
  padding-left: 1.2rem;
  margin-bottom: 2rem;
  color: #0a1a44;
  font-size: 1.1rem;
  line-height: 1.6;
}

.support-text ul li {
  list-style-type: disc;
  margin-bottom: 0.5rem;
}

.support-button {
  background-color: #0a1a44;
  color: white;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.support-button:hover {
  background-color: #08366e;
}


/* 🔹 Donation List */
.donation-list {
    list-style: none;
    padding: 0;
}

.donation-list li {
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    text-align: left;
}

.donation-list i {
    margin-right: 10px;
    font-size: 18px;
    color: #e68900;
}

/* 🔹 Responsive Design */
@media (max-width: 768px) {
    .support-container {
        flex-direction: column;
        text-align: center;
    }
    
    .support-image img {
        width: 140px;
        height: 140px;
    }

    .support-btn {
        margin-top: 15px;
    }
}


/* 🔹 DONATION SECTION */
.donation-section {
    background: #003b6f;
    color: white;
    padding: 50px;
}

.donation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.donation-container img {
    width: 120px;
    border-radius: 50%;
}

.donation-text {
    text-align: left;
    max-width: 500px;
}

.donation-text h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.donation-text ul {
    list-style-type: none;
    padding: 0;
}

.donation-text ul li {
    font-size: 16px;
}
.news-events-section {
  background: url('../images/svg.svg') no-repeat center center;
  background-size: cover;
  text-align: center;
  padding: 5rem 2rem;
}

.news-events-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0a1a44;
}

.news-events-section h3 {
  font-size: 1.2rem;
  color: #0a1a44;
  margin-bottom: 3rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.news-card {
  display: flex;
  align-items: center;
  background: #f3f3f3;
  border-radius: 30px;
  padding: 1.5rem;
  gap: 1.5rem;
}

.news-img img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 20px;
}

.news-info {
  text-align: left;
}

.news-info h4 {
  font-size: 1rem;
  color: #0a1a44;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.news-info .desc {
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 0.4rem;
}

.news-info .date {
  font-size: 0.75rem;
  color: #555;
  margin-bottom: 0.4rem;
}

.news-info .read-more {
  font-size: 0.9rem;
  color: #f59e0b;
  font-weight: 600;
  text-decoration: none;
}

.view-more-container {
  margin-top: 2rem;
  font-size: 2rem;
  color: #0a1a44;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Back To Top Button ---------- */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border: none;
  outline: none;
  border-radius: 50%;
  background: rgba(18, 9, 93, 0.75);  /* brand color */
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.3s ease;
  pointer-events: none;
}

/* Show state */
#backToTop.show {
  opacity: 0.9;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hover effect */
#backToTop:hover {
  background: rgba(18, 9, 93, 0.95);
  transform: scale(1.1);
}




@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .hero-text {
    margin-left: 0;
  }

  .sponsor-content {
    flex-direction: column;
    text-align: center;
  }

  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .hero-text .btn {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 0.5rem auto;
  }

  .hero-cat {
    margin-top: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 90%;
    max-width: 300px;
    margin: 0.5rem 0;
  }
}
/* ===== iOS-friendly base ===== */
html { -webkit-text-size-adjust: 100%; }
@supports (padding: max(0px)) {
  body {
    padding-left:  max(env(safe-area-inset-left), 0px);
    padding-right: max(env(safe-area-inset-right), 0px);
    padding-bottom: max(env(safe-area-inset-bottom), 0px);
  }
}

/* ===== HERO: flexible & safe on all phones ===== */
.hero{
  min-height: 100svh;                 /* better on mobile dynamic bars */
  padding: clamp(3rem, 6vw, 6rem) 1.25rem;
  background-size: cover;
  overflow: hidden;
}

.hero-content{
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}

/* Image column */
.hero-cat{
  flex: 1 1 44%;
  min-width: 260px;                   /* don’t collapse too small */
  order: 2;                           /* image below text on phones (overridden below for wide) */
}
.hero-cat img{
  width: 100%;
  max-width: min(520px, 100%);        /* stop >100% overflow */
  height: auto;
  object-fit: contain;
}

/* Text column */
.hero-text{
  flex: 1 1 52%;
  min-width: 280px;
  margin-left: 0;  
  margin-top: 20px;/* kill hard offset */
  text-align: left;
  order: 1;
}
/* Put the image ABOVE the text on phones/tablets */
/* ===== Desktop/Large screens: text LEFT, image RIGHT (force it) ===== */
@media (min-width: 769px){
  .hero-content{
    display: flex;
    flex-direction: row !important;        /* row on desktop */
    align-items: center;
    justify-content: space-between;
  }
  .hero-text{
    order: 1 !important;                    /* left */
    text-align: left !important;
    margin-left: 2%;                         /* keep your existing offset if you want */
    flex: 1 1 52%;
    min-width: 280px;
  }
  .hero-cat{
    order: 2 !important;                    /* right */
    flex: 1 1 44%;
    min-width: 260px;
    margin: 0 !important;
  }
}

@media (max-width: 768px){
  .hero-content{
    flex-direction: column-reverse;   /* image first, then text */
  }
  .hero-cat{
    margin: 0 0 14px;                 /* space under the image */
  }
  .hero-text{
    margin-left: 0;                   /* remove desktop offset */
    text-align: center;
  }
}


/* Typographic scaling with clamp */
.headline-hero{
  margin: 0 0 .5rem 0;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.08;
  color:#0a1a44;
}
.desc-hero{
  margin: 0 0 1.25rem 0;
  font-size: clamp(12px, 2.2vw, 20px);
  color:#3c4d6b;
}

/* Buttons: align naturally with text; stack on tight screens */
.hero-text .btn:first-of-type{ margin-left: 0; }
.hero-buttons{ gap: .75rem; flex-wrap: wrap; }
.hero-text .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .9rem 1.4rem;
}

/* Side rails: hide on phones so they don’t overlap */
@media (max-width: 768px){
  .left-side, .right-side{ display:none; }
}

/* Tablet tweaks */
@media (max-width: 1024px){
  .hero{ min-height: 90svh; }
  .hero-content{ justify-content: center; }
}

/* Phones (iPhone X/11/XR sweet spot) */
@media (max-width: 430px){
  .hero{ padding: 3.5rem 1rem; }
  .hero-content{ text-align: center; }
  .hero-text{ text-align: center; order: 1; }
  .hero-buttons{
    width: 100%;
    justify-content: center;
  }
  .hero-text .btn{
    width: min(320px, 92vw);
    margin: .25rem auto;
  }
  .headline-hero{ font-size: clamp(26px, 8.5vw, 34px); }
  .desc-hero{ font-size: clamp(14px, 4.2vw, 18px); }
  .hero-cat{ order: 2; margin-top: .5rem; }
}

/* Really short heights (landscape phones) */
@media (max-height: 420px){
  .hero{ min-height: auto; padding: 2rem 1rem; }
  .hero-cat img{ max-height: 42vh; }
  .hero-buttons .btn{ padding: .75rem 1.1rem; }
}

/* ===== Featured section small refinements ===== */
.featured-section h2{
  font-size: clamp(22px, 4.5vw, 40px);
}
.pet-card{
  width: clamp(200px, 42vw, 240px);
}

/* ===== How-it-works: tighter on phones ===== */
@media (max-width: 430px){
  .how-it-works{ padding: 3.5rem 1rem; }
  .steps{ gap: 1.75rem; }
  .circle{ width: 96px; height: 96px; font-size: 2rem; }
}

/* ===== Sponsor section: center & wrap cleanly ===== */
@media (max-width: 768px){
  .sponsor-content{ flex-direction: column; text-align:center; }
  .sponsor-text{ max-width: 520px; text-align:center; }
  .sponsor-icons{ flex-direction: row; justify-content: center; }
}

/* ===== News grid: mobile-friendly columns ===== */
@media (max-width: 768px){
  .news-grid{ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .news-card{ border-radius: 20px; }
}

/* ===== Success stories scroller: already mobile, just soften sizes ===== */
@media (max-width: 430px){
  .story-preview{ width: 74vw; height: 56vw; }
}

/* ===== Support section: stack nicely ===== */
@media (max-width: 768px){
  .support-container{ flex-direction: column; text-align: center; }
  .support-text{ max-width: 560px; }
}

/* ===== Back-to-top: keep clear of iPhone home bar ===== */
#backToTop{
  bottom: calc(24px + env(safe-area-inset-bottom));
  right: calc(24px + env(safe-area-inset-right));
}
/* Phones: make Featured Pets 2 columns */
@media (max-width: 480px){
  .pet-list{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;                     /* tighter gap for small screens */
    justify-items: center;         /* center cards in each cell */
  }
  .pet-card{
    width: 100%;                   /* fill the grid cell */
    max-width: 210px;              /* optional safety clamp */
  }
  .pet-card img{
    height: 150px;                 /* keep aspect tidy on small screens */
    object-fit: cover;
  }
}

/* Slightly wider phones (iPhone 11/XR etc.) */
@media (min-width: 481px) and (max-width: 768px){
  .pet-list{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .pet-card{ width: 100%; max-width: 260px; }
}
/* Phones: 2-column "How it Works" grid + smaller circles/text */
@media (max-width: 480px){
  .how-it-works{ padding: 3.75rem 1.25rem; }               /* comfy padding */
  .steps{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));      /* 2 cols */
    gap: 18px 14px;                                        /* row / col gap */
    justify-items: center;
    align-items: start;
    max-width: 520px;
    margin: 0 auto 2.25rem;
  }
  .step{
    max-width: none;
    text-align: center;
  }
  .circle{
    width: 84px;
    height: 84px;
    font-size: 1.6rem;                                     /* icon size */
    margin-bottom: 8px;
  }
  .step h3{
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .step p{
    font-size: .85rem;
    line-height: 1.4;
    margin: 0;
  }
}

/* Small tablets / larger phones: keep 2 columns but scale up a bit */
@media (min-width: 481px) and (max-width: 768px){
  .how-it-works{ padding: 4.5rem 1.5rem; }
  .steps{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
    justify-items: center;
    margin-bottom: 3rem;
  }
  .circle{ width: 96px; height: 96px; font-size: 1.8rem; }
  .step h3{ font-size: 1.1rem; }
  .step p{ font-size: .9rem; }
}

/* Prevent decorative background from crowding content on small screens */
@media (max-width: 480px){
  .how-it-works{
    background-position: center top;        /* keep rings out of the way */
    background-size: 180% auto;             /* zoom out a bit */
  }
}
/* ==== Desktop: IMAGE LEFT, TEXT RIGHT ==== */
@media (min-width: 1024px){
  .hero-content{
    display: flex;
    flex-direction: row !important;   /* row on desktop */
    flex-wrap: nowrap !important;     /* don't wrap */
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
  .hero-cat{
    order: 1 !important;              /* image first (LEFT) */
    flex: 0 1 48%;
    min-width: 320px;
    margin: 0 !important;
  }
  .hero-text{
    order: 2 !important;              /* text second (RIGHT) */
    flex: 0 1 52%;
    min-width: 360px;
    margin-left: 0 !important;        /* remove old offset */
    text-align: left !important;
  }
  /* remove desktop indents if you had them */
  .headline-hero, .desc-hero{ margin-left: 0 !important; }
  .hero-cat img{ width:100%; max-width:100%; height:auto; object-fit:contain; }
}

/* ==== Mobile/Tablet: IMAGE ON TOP, TEXT BELOW ==== */
@media (max-width: 768px){
  .hero-content{ flex-direction: column-reverse !important; }
  .hero-cat{ order: 1 !important; margin: 0 0 14px; }
  .hero-text{
    order: 2 !important;
    text-align: center !important;
    margin-left: 0 !important;
  }
  .headline-hero, .desc-hero{ margin-left: 0 !important; }
}
/* ===== MOBILE/TABLET: IMAGE ON TOP, TEXT BELOW ===== */
@media (max-width: 768px){
  .hero-content{
    display: flex;
    flex-direction: column !important;   /* stack vertically (top → bottom) */
    align-items: center;
  }
  .hero-cat{
    order: 1 !important;                 /* image first (TOP) */
    margin: 0 0 14px;
  }
  .hero-text{
    order: 2 !important;                 /* text second (BOTTOM) */
    text-align: center !important;
    margin-left: 0 !important;
  }
  .headline-hero, .desc-hero{ margin-left: 0 !important; }
}
/* Desktop: add more space between image and text */
@media (min-width: 1024px){
  .hero-content{
    column-gap: clamp(2.5rem, 5vw, 7rem);   /* was 2rem; tweak as you like */
    gap: clamp(2.5rem, 5vw, 7rem);          /* for browsers using gap */
  }
}
@media (min-width: 992px) {
  .hero-text {
    /* pick one of these (padding is usually safest) */
    padding-left: clamp(1rem, 2vw, 2rem);  /* ✅ recommended */
    /* or: margin-left: clamp(0.75rem, 2vw, 2rem); */
  }

  /* keep headings/buttons aligned with that shift if you previously zeroed them */
  .headline-hero,
  .desc-hero {
    margin-left: 0; /* let the .hero-text padding do the offset */
  }
  .hero-text .btn:first-of-type {
    margin-left: 0; /* same reason as above */
  }
}

/* Phones/tablets: no extra offset */
@media (max-width: 991.98px) {
  .hero-text { padding-left: 0; margin-left: 0; }
}

/* View More Button */
.view-more-button {
  background-color: transparent;  /* No background color */
  color: #0a1a44;  /* Blue color for the icon and text */
  padding: 0.5rem 1.5rem;  /* Adjust padding to fit the icon properly */
  border: none;
  border-radius: 50px;  /* Optional: Round button edges */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;  /* Center the icon and text */
  gap: 0.5rem;  /* Space between text and icon */
  transition: transform 0.3s ease;
}

.view-more-button i {
  font-size: 1.5rem;  /* Larger size for the arrow icon */
  color: #0a1a44;  /* Blue color for the arrow */
}

.view-more-button:hover {
  transform: scale(1.1);  /* Hover effect with scaling */
}

/* Disabled Button */
.view-more-button:disabled {
  color: #ccc;  /* Grey color when disabled */
  cursor: not-allowed;
}

/* View More Button Container */
.view-more-container {
  margin-top: 2rem;
  font-size: 2rem;
  color: #0a1a44;
  text-align: center;
}

/* Default state for the hidden items */
.news-item.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

