
/* Added for smooth scrolling */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Mobile-First Responsive CSS for Zakah Section */
.zakah-section {
  margin: 0 auto;
  padding: 15px;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Hero Section - Mobile First */
.hero-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.hero-content {
  order: 2;
  padding: 0 10px;
}

.main-title {
  color: #0F7B96;
  font-size: clamp(1.5rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  background: linear-gradient(135deg, #0F7B96, #1a8aa3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: clamp(1rem, 4vw, 1.3rem);
  color: #666;
  margin: 0;
  font-weight: 400;
  padding: 0 10px;
}

.hero-image {
  order: 1;
  margin-bottom: 1rem;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 123, 150, 0.15);
  transition: transform 0.3s ease;
}

/* Content Wrapper */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* START: TOC STYLES */
.toc-container {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid rgba(15, 123, 150, 0.1);
  margin-bottom: 1rem; /* Spacing after TOC */
}

.toc-title {
  color: #0F7B96;
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid rgba(15, 123, 150, 0.2);
  padding-bottom: 0.5rem;
}

.toc-list {
  list-style: decimal inside;
  padding-left: 0;
  margin: 0;
  columns: 1; /* Single column on mobile */
}

.toc-list li {
  margin-bottom: 0.8rem;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
}

.toc-list li::marker {
  font-weight: 600;
  color: #0F7B96;
}

.toc-list li a {
  text-decoration: none;
  color: #0F7B96;
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc-list li a:hover,
.toc-list li a:focus {
  color: #1a8aa3;
  text-decoration: underline;
  padding-left: 4px; /* Slight indent on hover */
}
/* END: TOC STYLES */

/* Content Sections */
.content-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid rgba(15, 123, 150, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-title {
  color: #0F7B96;
  font-size: clamp(1.2rem, 4.5vw, 1.8rem);
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(15, 123, 150, 0.2);
  position: relative;
  line-height: 1.3;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #0F7B96, #1a8aa3);
  border-radius: 2px;
}

.content-text {
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  margin-bottom: 1.2rem;
  color: #444;
  text-align: left;
  line-height: 1.7;
}

/* Hadith Card */
.hadith-card {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #0F7B96;
  margin: 1.5rem 0;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.hadith-text {
  font-style: italic;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #333;
}

.hadith-source {
  display: block;
  font-size: clamp(0.8rem, 2.8vw, 0.9rem);
  opacity: 0.8;
  font-weight: 500;
  color: #0F7B96;
}

/* Types Container */
.types-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.type-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-radius: 10px;
  border: 1px solid rgba(15, 123, 150, 0.1);
  transition: all 0.3s ease;
}

.type-number {
  background: #0F7B96;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.type-content {
  flex: 1;
}

.type-content h4 {
  margin: 0;
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  line-height: 1.5;
  color: #333;
}

/* Virtues Container */
.virtues-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.virtue-card {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-radius: 12px;
  border: 1px solid rgba(15, 123, 150, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.virtue-header {
  background: linear-gradient(135deg, #0F7B96, #1a8aa3);
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.virtue-number {
  background: rgba(255, 255, 255, 0.2);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.virtue-title {
  margin: 0;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.3;
  color:white;
}

.virtue-content {
  padding: 1.2rem;
}

.virtue-content p {
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
  line-height: 1.6;
  color: #444;
}

.virtue-content p:last-child {
  margin-bottom: 0;
}

/* Recipients Grid */
.recipients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.recipient-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-radius: 8px;
  border: 1px solid rgba(15, 123, 150, 0.1);
  transition: all 0.3s ease;
}

.recipient-number {
  background: #0F7B96;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.recipient-card h4 {
  margin: 0;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
  line-height: 1.4;
  color: #333;
}

/* Tablet breakpoint */
@media (min-width: 600px) {
  .zakah-section {
    padding: 25px;
  }
  
  .content-wrapper {
    gap: 2rem;
  }

  /* Added for TOC */
  .toc-list {
    columns: 2;
    gap: 1.5rem;
  }
  
  .content-section {
    padding: 2rem;
  }
  
  .types-container {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .type-card {
    flex: 1;
  }
  
  .recipients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hadith-card {
    padding: 2rem;
  }
}

/* Desktop breakpoint */
@media (min-width: 768px) {
  .zakah-section {
    padding: clamp(25px, 5vw, 40px);
  }
  
  .hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: left;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .hero-content {
    order: 1;
    padding: 0;
  }
  
  .hero-image {
    order: 2;
    margin-bottom: 0;
  }
  
  .content-wrapper {
    gap: 2.5rem;
  }
  
  .content-section {
    padding: 2.5rem;
  }
  
  .content-text {
    text-align: justify;
  }
  
  .recipients-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Large desktop breakpoint */
@media (min-width: 1024px) {
  .recipients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Hover effects for non-touch devices */
@media (hover: hover) {
  .content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  }
  
  .type-card:hover {
    border-color: #0F7B96;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15, 123, 150, 0.1);
  }
  
  .virtue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 123, 150, 0.15);
  }
  
  .recipient-card:hover {
    border-color: #0F7B96;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(15, 123, 150, 0.1);
  }
  
  .hero-image img:hover {
    transform: scale(1.02);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  /* Added for smooth scrolling */
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Focus states for accessibility */
.toc-list li a:focus, /* Added for TOC */
.content-section:focus-within,
.type-card:focus-within,
.virtue-card:focus-within,
.recipient-card:focus-within {
  outline: 2px solid #0F7B96;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .toc-container, /* Added for TOC */
  .content-section,
  .type-card,
  .virtue-card,
  .recipient-card {
    border: 2px solid #000;
  }
  
  .toc-title, /* Added for TOC */
  .section-title {
    border-bottom-color: #000;
  }
}

/* Print styles */
@media print {
  .toc-container { /* Hide TOC when printing */
    display: none;
  }

  .zakah-section {
    box-shadow: none;
    background: white;
    padding: 20px;
  }
  
  .content-section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
    margin-bottom: 20px;
  }
  
  .hero-image img {
    max-height: 300px;
    object-fit: contain;
  }
}

/* Very small screens (phones in portrait) */
@media (max-width: 375px) {
  .zakah-section {
    padding: 10px;
    margin: 5px;
    border-radius: 8px;
  }
  
  .toc-container, /* Added for TOC */
  .content-section {
    padding: 1rem;
  }
  
  .hadith-card {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .virtue-header {
    padding: 0.8rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .virtue-content {
    padding: 1rem;
  }
  
  .main-title {
    font-size: clamp(1.3rem, 7vw, 2.5rem);
  }
}
/* Tabbed Interface Styles */
.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.tabs {
    display: flex;
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab {
    flex: 1;
    cursor: pointer;
    padding: 20px 15px;
    background: transparent;
    color: #495057;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab:hover {
    background: #e9ecef;
    color: #0F7B96;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 123, 150, 0.1), transparent);
    transition: left 0.5s;
}

.tab:hover::before {
    left: 100%;
}

.radio {
    display: none;
}

.panels {
    width: 100%;
    min-height: 400px;
    padding: 40px;
}

.panel {
    display: none;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel h2 {
    color: #0F7B96;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 700;
}

.panel p {
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
}

.panel hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #0F7B96, transparent);
    margin: 20px 0;
}

.btn-zakah {
    background: linear-gradient(135deg, #0F7B96, #0d6a80);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(15, 123, 150, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-zakah:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 123, 150, 0.4);
}

.btn-zakah:active {
    transform: translateY(0);
}

.nisaab-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.nisaab-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nisaab-item:hover {
    border-color: #0F7B96;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nisaab-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    display: block;
    opacity: 0;
    animation: fadeInImage 0.8s ease-out 0.3s forwards;
}

.nisaab-item h5 {
    color: #0F7B96;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.nisaab-item p {
    text-align: center;
    margin: 0;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #0F7B96;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.feature-card strong {
    color: #0F7B96;
    font-size: 1.1em;
}

/* Active tab styles */
#one:checked ~ .tabs #one-tab,
#two:checked ~ .tabs #two-tab,
#three:checked ~ .tabs #three-tab {
    background: #0F7B96;
    color: white;
    border-bottom-color: #0F7B96;
}

#one:checked ~ .panels #one-panel,
#two:checked ~ .panels #two-panel,
#three:checked ~ .panels #three-panel {
    display: block;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Accessibility improvements */
.tab:focus {
    outline: 2px solid #0F7B96;
    outline-offset: 2px;
}

.btn-zakah:focus {
    outline: 2px solid #0F7B96;
    outline-offset: 2px;
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .wrapper {
        margin: 20px 10px;
        border-radius: 15px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        padding: 15px;
        font-size: 16px;
    }

    .panels {
        padding: 20px;
    }

    .panel h2 {
        font-size: 1.5em;
    }

    .nisaab-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .panels {
        padding: 15px;
    }

    .btn-zakah {
        width: 100%;
        padding: 12px 20px;
    }

    .nisaab-item {
        padding: 15px;
    }

    .nisaab-item img {
        width: 70px;
        height: 70px;
    }
}