/* ============================================================
   Save Darkness NGO — Responsive Stylesheet
   Media query breakpoints for all screen sizes
   ============================================================ */

/* ------------------------------------------------------------
   XL Breakpoint — max-width: 1399px
   ------------------------------------------------------------ */
@media (max-width: 1399px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }

  .sd-hero-content h1 {
    font-size: 3.5rem;
  }

  .sd-stat-counter .sd-stat-number {
    font-size: 2.75rem;
  }

  .sd-gallery-grid {
    column-gap: 16px;
  }
}

/* ------------------------------------------------------------
   LG Breakpoint — max-width: 1199px
   ------------------------------------------------------------ */
@media (max-width: 1199px) {
  :root {
    --sd-section-padding: 80px;
  }

  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .sd-hero-content h1 {
    font-size: 3rem;
  }

  .sd-hero-content p {
    font-size: 1.1rem;
  }

  .sd-page-hero-content h1 {
    font-size: 2.5rem;
  }

  .sd-stat-counter .sd-stat-number {
    font-size: 2.5rem;
  }

  .sd-gallery-grid {
    column-count: 3;
  }

  /* Timeline tighter padding */
  .sd-timeline-item {
    padding: 0 35px 50px;
  }

  /* Footer columns adjust */
  .sd-footer-main {
    padding: 60px 0 30px;
  }
}

/* ------------------------------------------------------------
   MD Breakpoint — max-width: 991px
   ------------------------------------------------------------ */
@media (max-width: 991px) {
  :root {
    --sd-section-padding: 70px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  h3 { font-size: 1.35rem; }

  body {
    font-size: 0.95rem;
  }

  /* ---- Navigation ---- */
  .sd-navbar-inner {
    flex-wrap: wrap;
    min-height: 64px;
  }

  .sd-navbar .navbar-brand.sd-logo {
    order: 1;
  }

  .sd-navbar-actions {
    order: 2;
    margin-left: auto;
  }

  .sd-navbar-collapse {
    order: 3;
    flex-basis: 100%;
  }

  .sd-navbar .navbar-collapse {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(20, 16, 40, 0.08);
    box-shadow: 0 12px 32px rgba(10, 14, 26, 0.1);
  }

  .sd-navbar-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .sd-navbar-links > .nav-item + .nav-item::before {
    display: none;
  }

  .sd-navbar .nav-link {
    padding: 12px 14px !important;
    border-radius: 8px;
    width: 100%;
    justify-content: space-between;
  }

  .sd-navbar .nav-link:hover,
  .sd-navbar .nav-link.active,
  .sd-navbar .sd-mega-trigger:hover,
  .sd-navbar .sd-mega-trigger.active,
  .sd-navbar .sd-mega-trigger.is-open {
    background: rgba(var(--sd-purple-glow-rgb), 0.08);
  }

  .sd-navbar .sd-mega-trigger {
    width: 100%;
    justify-content: flex-start;
  }

  .sd-navbar .sd-mega-trigger::after {
    margin-left: auto;
  }

  .sd-nav-search-btn.w-100 {
    width: 100%;
    height: auto;
    border-radius: 8px;
    padding: 12px 14px;
    justify-content: flex-start;
  }

  .sd-btn-donate-nav {
    margin-top: 4px;
    max-width: none;
    font-size: 0.8rem;
    padding: 10px 16px !important;
  }

  .sd-navbar .sd-logo-text {
    font-size: 0.92rem;
  }

  .sd-navbar .sd-logo-tag {
    font-size: 0.52rem;
  }

  .sd-navbar .sd-logo-img {
    width: 44px;
    height: 44px;
  }

  /* ---- Hero ---- */
  .sd-hero-content h1 {
    font-size: 2.5rem;
  }

  .sd-hero-content p {
    font-size: 1rem;
  }

  .sd-hero::before {
    width: 140px;
    height: 140px;
  }

  .sd-hero {
    height: auto;
    padding-top: 120px;
    padding-bottom: 0;
  }

  .sd-hero-stats {
    position: relative;
    margin-top: 40px;
  }

  .sd-hero-stat-item {
    margin-bottom: 12px;
  }

  .sd-hero-stat-item .stat-number {
    font-size: 1.75rem;
  }

  .sd-scroll-indicator {
    bottom: 30px;
  }

  /* ---- Page Hero ---- */
  .sd-page-hero {
    height: 35vh;
    min-height: 240px;
  }

  .sd-page-hero-content h1 {
    font-size: 2rem;
  }

  /* ---- Section headers ---- */
  .sd-section-header {
    margin-bottom: 45px;
  }

  /* ---- Gallery ---- */
  .sd-gallery-grid {
    column-count: 2;
  }

  /* ---- Timeline — left-aligned ---- */
  .sd-timeline::before {
    left: 20px;
    transform: none;
  }

  .sd-timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding: 0 20px 40px 55px;
  }

  .sd-timeline-item:nth-child(odd) .sd-timeline-dot,
  .sd-timeline-item:nth-child(even) .sd-timeline-dot {
    left: 12px;
    right: auto;
  }

  /* ---- Statistics ---- */
  .sd-stat-counter .sd-stat-number {
    font-size: 2.25rem;
  }

  .sd-stat-counter {
    padding: 20px 15px;
  }

  /* ---- Footer stacked ---- */
  .sd-footer-main .col-lg-3,
  .sd-footer-main .col-lg-4 {
    margin-bottom: 30px;
  }

  .sd-footer h5::after {
    left: 0;
  }

  /* ---- Buttons ---- */
  .sd-btn-primary,
  .sd-btn-secondary,
  .sd-btn-donate {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .sd-btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------
   SM Breakpoint — max-width: 767px
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  :root {
    --sd-section-padding: 60px;
    --sd-gap: 20px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.15rem; }

  /* ---- Hero ---- */
  .sd-hero {
    min-height: 500px;
  }

  .sd-hero-content h1 {
    font-size: 2rem;
    line-height: 1.25;
  }

  .sd-hero-content p {
    font-size: 0.95rem;
  }

  .sd-hero::before {
    width: 100px;
    height: 100px;
    top: 8%;
    right: 10%;
  }

  .sd-hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .sd-hero-buttons .sd-btn-primary,
  .sd-hero-buttons .sd-btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .sd-scroll-indicator {
    display: none;
  }

  .sd-hero-stat-item .stat-number {
    font-size: 1.5rem;
  }

  .sd-hero-stat-item .stat-label {
    font-size: 0.75rem;
  }

  /* ---- Page Hero ---- */
  .sd-page-hero {
    height: 30vh;
    min-height: 200px;
  }

  .sd-page-hero-content h1 {
    font-size: 1.75rem;
  }

  /* ---- Cards full-width ---- */
  .sd-card {
    margin-bottom: 20px;
  }

  .sd-card-body {
    padding: 20px;
  }

  /* ---- Team ---- */
  .sd-card-team {
    padding: 30px 20px 24px;
  }

  .sd-team-photo {
    width: 170px;
    height: 170px;
  }

  /* ---- Testimonials ---- */
  .sd-testimonial-card {
    padding: 24px;
  }

  /* ---- Gallery ---- */
  .sd-gallery-grid {
    column-count: 2;
    column-gap: 12px;
  }

  .sd-gallery-item {
    margin-bottom: 12px;
  }

  /* ---- Stats ---- */
  .sd-stat-counter .sd-stat-number {
    font-size: 2rem;
  }

  .sd-stat-counter .sd-stat-icon {
    font-size: 2rem;
  }

  /* ---- Timeline ---- */
  .sd-timeline::before {
    left: 16px;
  }

  .sd-timeline-item {
    padding-left: 45px;
    padding-bottom: 30px;
  }

  .sd-timeline-item:nth-child(odd) .sd-timeline-dot,
  .sd-timeline-item:nth-child(even) .sd-timeline-dot {
    left: 8px;
    width: 14px;
    height: 14px;
  }

  .sd-timeline-content {
    padding: 18px;
  }

  /* ---- Forms ---- */
  .sd-newsletter-form {
    flex-direction: column;
  }

  .sd-newsletter-form .sd-btn-primary {
    width: 100%;
    justify-content: center;
  }

  /* ---- Footer ---- */
  .sd-footer-main {
    padding: 50px 0 20px;
  }

  .sd-footer-newsletter-form {
    flex-direction: column;
  }

  .sd-footer-newsletter-form .sd-newsletter-btn {
    width: 100%;
    justify-content: center;
  }

  .sd-footer-newsletter-title {
    font-size: 1.25rem;
  }

  .sd-footer-bottom {
    text-align: center;
  }

  .sd-footer-bottom .row > div {
    margin-bottom: 8px;
  }

  /* ---- Sticky donate ---- */
  .sd-sticky-donate {
    bottom: 20px;
    right: 20px;
  }

  .sd-sticky-donate a {
    padding: 12px 22px;
    font-size: 0.85rem;
  }

  /* ---- Back to top ---- */
  .sd-back-to-top {
    bottom: 76px;
    right: 26px;
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  /* ---- Page Hero ---- */
  .sd-page-hero {
    min-height: 260px;
    padding: 120px 0 56px;
  }

  .sd-page-hero-sm {
    min-height: 180px;
    padding: 112px 0 40px;
  }

  .sd-page-hero-title {
    font-size: clamp(1.75rem, 6vw, 2.4rem);
  }

  .sd-page-hero-subtitle {
    font-size: 1rem;
  }

  /* ---- Breadcrumbs ---- */
  .sd-breadcrumbs {
    font-size: 0.8rem;
    padding: 8px 14px;
    max-width: 100%;
  }

  .sd-breadcrumbs-item + .sd-breadcrumbs-item::before {
    margin: 0 8px;
  }

  /* ---- FAQ ---- */
  .sd-faq-item .accordion-button {
    padding: 14px 18px;
    font-size: 0.9rem;
  }

  .sd-faq-item .accordion-body {
    padding: 16px 18px;
  }

  /* ---- Search Modal ---- */
  .sd-search-modal {
    padding-top: 15vh;
  }

  .sd-search-modal input {
    font-size: 1.05rem;
    padding: 16px 20px;
  }

  /* ---- Section headers ---- */
  .sd-section-header {
    margin-bottom: 35px;
  }

  .sd-section-header p {
    font-size: 0.9rem;
  }
}

/* ------------------------------------------------------------
   XS Breakpoint — max-width: 575px
   ------------------------------------------------------------ */
@media (max-width: 575px) {
  :root {
    --sd-section-padding: 50px;
    --sd-card-radius: 12px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.15rem; }
  h4 { font-size: 1.05rem; }

  body {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* ---- Navigation ---- */
  .sd-navbar {
    min-height: 60px;
  }

  .sd-navbar-inner {
    min-height: 60px;
  }

  .sd-navbar .sd-logo-img {
    width: 40px;
    height: 40px;
  }

  .sd-navbar .sd-logo-text {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    gap: 0.28em;
  }

  .sd-navbar .sd-logo-tag {
    font-size: 0.48rem;
    margin-top: 2px;
  }

  /* ---- Hero ---- */
  .sd-hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .sd-hero-content {
    padding: 0 16px;
  }

  .sd-hero-content h1 {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .sd-hero-content p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .sd-hero-buttons .sd-btn-primary,
  .sd-hero-buttons .sd-btn-secondary {
    max-width: 100%;
    padding: 12px 24px;
  }

  .sd-hero-stats {
    padding: 16px 0;
  }

  .sd-hero-stat-item .stat-number {
    font-size: 1.25rem;
  }

  .sd-hero-stat-item .stat-label {
    font-size: 0.7rem;
  }

  /* ---- Page Hero ---- */
  .sd-page-hero {
    height: 28vh;
    min-height: 180px;
  }

  .sd-page-hero-content h1 {
    font-size: 1.5rem;
  }

  /* ---- Cards ---- */
  .sd-card-body {
    padding: 16px;
  }

  .sd-card-badge {
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .sd-card-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
  }

  /* ---- Event date badge ---- */
  .sd-event-date-badge {
    padding: 8px 10px;
    min-width: 48px;
    top: 10px;
    right: 10px;
  }

  .sd-event-date-badge .day {
    font-size: 1.2rem;
  }

  .sd-event-date-badge .month {
    font-size: 0.65rem;
  }

  /* ---- Team ---- */
  .sd-card-team {
    padding: 24px 16px 20px;
  }

  .sd-team-photo {
    width: 150px;
    height: 150px;
  }

  .sd-team-social a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* ---- Testimonials ---- */
  .sd-testimonial-card {
    padding: 20px;
  }

  .sd-testimonial-card .sd-quote-icon {
    font-size: 2rem;
  }

  .sd-testimonial-author img,
  .sd-testimonial-avatar {
    width: 44px;
    height: 44px;
  }

  .sd-testimonial-avatar--icon {
    font-size: 1.05rem;
  }

  /* ---- Gallery — single column ---- */
  .sd-gallery-grid {
    column-count: 1;
  }

  /* ---- Statistics ---- */
  .sd-stat-counter {
    padding: 16px 10px;
  }

  .sd-stat-counter .sd-stat-number {
    font-size: 1.75rem;
  }

  .sd-stat-counter .sd-stat-icon {
    font-size: 1.75rem;
    margin-bottom: 10px;
  }

  .sd-stat-counter .sd-stat-label {
    font-size: 0.8rem;
  }

  /* ---- Timeline ---- */
  .sd-timeline::before {
    left: 12px;
  }

  .sd-timeline-item {
    padding-left: 36px;
    padding-bottom: 24px;
  }

  .sd-timeline-item:nth-child(odd) .sd-timeline-dot,
  .sd-timeline-item:nth-child(even) .sd-timeline-dot {
    left: 5px;
    width: 12px;
    height: 12px;
  }

  .sd-timeline-content {
    padding: 14px;
  }

  .sd-timeline-content .sd-timeline-year {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .sd-timeline-content h5 {
    font-size: 1rem;
  }

  /* ---- Buttons ---- */
  .sd-btn-primary,
  .sd-btn-secondary,
  .sd-btn-donate {
    padding: 10px 24px;
    font-size: 0.85rem;
  }

  .sd-btn-lg {
    padding: 12px 30px;
    font-size: 0.95rem;
  }

  /* ---- Forms ---- */
  .sd-form-control {
    padding: 12px 14px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  /* ---- Footer ---- */
  .sd-footer-main {
    padding: 40px 0 16px;
  }

  .sd-footer h5 {
    margin-bottom: 16px;
    font-size: 1rem;
  }

  .sd-footer p,
  .sd-footer-links a,
  .sd-footer-contact li {
    font-size: 0.85rem;
  }

  .sd-footer-social {
    gap: 10px;
  }

  .sd-footer-social a {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .sd-footer-bottom {
    padding: 16px 0;
  }

  .sd-footer-bottom p {
    font-size: 0.8rem;
  }

  /* ---- Sticky donate ---- */
  .sd-sticky-donate {
    bottom: 16px;
    right: 16px;
  }

  .sd-sticky-donate a {
    padding: 10px 18px;
    font-size: 0.8rem;
    gap: 6px;
  }

  /* ---- Back to top ---- */
  .sd-back-to-top {
    bottom: 68px;
    right: 22px;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* ---- Search modal ---- */
  .sd-search-modal {
    padding-top: 12vh;
  }

  .sd-search-modal-inner {
    width: 95%;
  }

  .sd-search-modal input {
    font-size: 0.95rem;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .sd-search-modal-close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
  }

  /* ---- Breadcrumbs ---- */
  .sd-breadcrumbs {
    font-size: 0.75rem;
    padding: 8px 12px;
    gap: 6px;
  }

  /* ---- FAQ ---- */
  .sd-faq-item .accordion-button {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  .sd-faq-item .accordion-body {
    padding: 14px;
    font-size: 0.85rem;
  }

  /* ---- Section headers ---- */
  .sd-section-header {
    margin-bottom: 30px;
  }

  .sd-section-header .sd-divider {
    width: 60px;
  }

  /* ---- Preloader ---- */
  .sd-preloader-moon {
    width: 45px;
    height: 45px;
  }

  /* ---- Glass ---- */
  .sd-glass {
    border-radius: var(--sd-card-radius);
  }
}

/* ------------------------------------------------------------
   Touch / Hover Capability Queries
   ------------------------------------------------------------ */
@media (hover: none) {
  .sd-cursor-firefly {
    display: none !important;
  }

  html.sd-has-firefly-cursor,
  html.sd-has-firefly-cursor body {
    cursor: auto;
  }

  /* Remove hover transforms on touch devices */
  .sd-card:hover {
    transform: none;
    box-shadow: var(--sd-shadow-card);
  }

  .sd-card:hover .sd-card-img-wrapper img {
    transform: none;
  }

  .sd-gallery-overlay {
    opacity: 1;
    background: rgba(var(--sd-midnight-rgb), 0.3);
  }

  .sd-sticky-donate a {
    animation: none;
  }
}

/* ------------------------------------------------------------
   Reduced Motion Preference
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .sd-card:hover {
    transform: none;
  }

  .sd-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------
   High-resolution / Retina
   ------------------------------------------------------------ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .sd-preloader-moon {
    box-shadow:
      0 0 20px rgba(var(--sd-gold-rgb), 0.5),
      0 0 40px rgba(var(--sd-gold-rgb), 0.25);
  }
}

/* ------------------------------------------------------------
   Landscape phones
   ------------------------------------------------------------ */
@media (max-height: 500px) and (orientation: landscape) {
  .sd-hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .sd-hero-content h1 {
    font-size: 1.5rem;
  }

  .sd-hero-content p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .sd-hero-stats {
    display: none;
  }

  .sd-scroll-indicator {
    display: none;
  }

  .sd-page-hero {
    height: 50vh;
  }
}


/* ------------------------------------------------------------
   Mobile cover / home overflow fixes
   ------------------------------------------------------------ */
@media (max-width: 991px) {
  .sd-cover,
  .sd-sky-hero,
  .sd-section {
    width: 100%;
    max-width: 100%;
  }

  .sd-sky-hero .container,
  .sd-cover .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .sd-sky-grid,
  .sd-sky-grid-wide {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 767px) {
  .sd-cover-video-bg {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .sd-cover-video {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .sd-cover-video-overlay {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .sd-corner-owl-wrap {
    right: 12px;
    bottom: 12px;
  }

  .sd-corner-owl-stage,
  .sd-corner-owl.sd-theme-toggle {
    width: 64px;
    height: 64px;
  }

  .sd-lp-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row {
    --bs-gutter-x: 1rem;
  }

  .sd-sky-year {
    font-size: 2.2rem;
    right: 0;
  }
}

/* ------------------------------------------------------------
   Large / ultrawide — reduce left/right empty space
   ------------------------------------------------------------ */
@media (min-width: 1200px) {
  :root {
    --sd-container-max: 1140px;
  }
}

@media (min-width: 1400px) {
  :root {
    --sd-container-max: 1320px;
  }

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: var(--sd-container-max);
  }

  .sd-cover-content {
    max-width: min(780px, 44vw);
  }

  .sd-cover-title {
    max-width: 20em;
    font-size: clamp(2rem, 3.4vw, 3.5rem);
  }
}

@media (min-width: 1600px) {
  :root {
    --sd-container-max: 1520px;
    --sd-page-gutter: clamp(24px, 3vw, 56px);
  }

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: var(--sd-container-max);
  }

  .sd-navbar-inner.container {
    max-width: var(--sd-container-max);
  }

  .sd-cover > .container,
  .sd-sky-hero > .container,
  .sd-section > .container,
  .sd-footer .container {
    max-width: var(--sd-container-max);
  }

  .sd-cover-content {
    max-width: min(860px, 42vw);
  }
}

@media (min-width: 1920px) {
  :root {
    --sd-container-max: 1720px;
    --sd-page-gutter: clamp(32px, 3.5vw, 72px);
  }

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl,
  .sd-navbar-inner.container,
  .sd-cover > .container,
  .sd-sky-hero > .container,
  .sd-section > .container,
  .sd-footer .container,
  .sd-mega-panel > .container {
    max-width: var(--sd-container-max);
  }

  .sd-cover-content {
    max-width: min(920px, 40vw);
  }

  .sd-cover-title {
    font-size: clamp(2.2rem, 3vw, 3.75rem);
  }
}

@media (min-width: 2560px) {
  :root {
    --sd-container-max: 1960px;
  }
}
