/* Layout */
.main-layout {
    display: flex;
    flex-direction: row-reverse; /* Sidebar on right */
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #f9fdf9;
    border-left: 3px solid #0a3c2f;
    border-radius: 15px 0 0 15px;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    max-height: 90vh;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

/* Sidebar styling */
.sidebar h2 {
    font-size: 20px;
    color: #013828;
    margin-bottom: 10px;
    border-bottom: 2px solid #013828;
    padding-bottom: 4px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.section-header:hover {
    opacity: 0.85;
}

.section-header .thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #0a3c2f;
}

.latest-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 8px;
}

.latest-list li {
    margin-bottom: 5px;
}

.latest-list a {
    text-decoration: none;
    color: #015030;
    font-weight: 500;
}

.latest-list a:hover {
    color: #048b62;
}

/* Main Quran content */
.main-content {
    flex: 1;
    overflow-y: auto;
    max-height: 90vh;
    scrollbar-width: none;
}

.main-content::-webkit-scrollbar {
    display: none;
}

.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.surah-card {
    background: white;
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    border: 1px solid #c6e4c9;
    cursor: pointer;
    transition: 0.3s;
}

.surah-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 50, 0, 0.1);
}

/* Scroll button groups */
.scroll-group {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scroll-group.visible {
  opacity: 1;
}

#main-scroll-buttons {
  left: 30px;
  bottom: 60px;
}

#sidebar-scroll-buttons {
  right: 30px;
  bottom: 60px;
}

/* Scroll buttons style */
.scroll-btn {
    background: #013828;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.9;
    transition: 0.3s;
}

.scroll-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Home button */
.home-btn {
    position: fixed;
    right: 50%;
    bottom: 20px;
    transform: translateX(50%);
    background: #046b4a;
    font-size: 22px;
    width: 55px;
    height: 55px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.home-btn.visible {
    opacity: 1;
}

/* Fonts */
body {
    font-family: 'JameelNooriNastaleeq', serif;
    background-color: #ffffff;
    color: #013828;
}

.surah-name-ar {
    font-family: 'Me_Quran', serif;
    font-size: 22px;
    color: #014d31;
}
