/* Logo */

#logo {
    background-color: rgb(255 255 255 / 25%);
    border-radius: 15px;
    padding: 0 5px;
}

.navigation-branding .site-logo img {
    height: 55px;
}

/* Table of Contents */

.toc-container {
  width: fit-content;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  background-color: #f9f9f9;
  margin-bottom: 15px;
}

.toc-header {
  display: flex;
  align-items: center;
  background-color: #e6e6fa;
  padding: 5px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  cursor: pointer;
}

.toc-title {
  font-weight: bold;
  flex-grow: 1;
}

.toc-toggle {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 0 5px;
}

.toc-list {
  list-style: none;
  padding: 0;
  display: none;
}

.toc-list.collapsed {
  display: block;
}

.toc-list li {
  margin: 5px 0;
}

.toc-list a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
}

.toc-list a:hover {
  text-decoration: underline;
}

.toc-header:hover .toc-title,
.toc-header:hover .toc-toggle {
  color: #0066cc;
}

/* Download Box */

.download-container {
    background: #f9f9f9;
    border-radius: 16px;
    box-shadow: 5px 3px 5px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.download-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #6366f1, #a855f7);
}

.download-header {
    background: linear-gradient(to right, #4a6fa5, #6366f1);
    color: white;
    padding: 20px;
    text-align: center;
}

.download-header h3 {
	color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-header h3 i {
    color: #e0e7ff;
}

.download-content {
    padding: 24px;
}

.alb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    text-align: center;
}

.alb-icon {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alb-name {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.alb-download-table-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.alb-download-table {
    border-collapse: separate;
    border-spacing: 0;
}

.download-content table {
    margin: auto;
}

.alb-download-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.alb-download-cell {
    padding: 12px 15px;
    text-align: center;
    color: #4b5563;
    font-size: 14px;
    flex: 0 0 calc(33.333% - 12px); /* Three items per row with margin */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    gap: 8px;
    background: linear-gradient(to bottom, #f3e8ff, #e0e7ff);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: box-shadow 0.2s;
    margin: 6px;
}

.alb-download-cell.game-category {
    flex: 0 0 calc(50% - 12px);
}

.alb-download-cell:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.alb-info-label {
    background-color: #bdd1ff;
    padding: 5px;
    border-radius: 8px;
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
    text-align: center;
    width: 100%;
}

.alb-info-value {
    text-align: center;
	max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
}

.alb-download-row .download-button {
    align-items: center;
    color: white;
    padding: 15px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.alb-download-row .download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.alb-download-row .download-button i {
    font-size: 16px;
}

.download-button-dl1 {
	background: linear-gradient(to right, #34d399, #059669);
}

.download-button-dl2 {
	background: linear-gradient(to right, #6366f1, #a855f7);
}

.download-button-dl3 {
    background: linear-gradient(to right, #afafaf, #666666);
}

.download-button-dl4 {
    background: linear-gradient(to right, #ffc547, #ff4500);
}

.download-button-apk {
    background: linear-gradient(to right, #afafaf, #666666););
}

.download-button-gplay {
    background: linear-gradient(to right, #34d399, #059669);
}

.download-button-ios {
    background: linear-gradient(to right, #6366f1, #a855f7);
}

.download-container .fas, 
.download-container .fab {
    padding-left: 8px;
}

.button-container {
	display: grid;
	gap: 10px;
	justify-items: center;
	width: 100%;
}

.btn-count-1 {
    max-width: 300px;
    align-self: center;
}

.btn-count-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
  align-self: center;
}

.btn-count-3 {
  grid-template-columns: repeat(3, 1fr);
}

.btn-count-4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
  align-self: center;
}

.download-container .box-inner-block {
    justify-self: center;
}

.download-note {
    background-color: #e5ffe7;
    border-right: 4px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .05);
}

.download-note p {
    padding: 15px 15px 15px 0;
    margin-bottom: auto;
    font-size: 16px;
    text-align: center;
}

.download-note i {
    display: block;
    text-align: center;
    font-size: 20px;
    color: #007bff;
    margin-bottom: 5px;
}

@media (max-width: 500px) {
    .download-container {
        margin: 10px;
        border-radius: 8px;
    }

    .download-header h3 {
        font-size: 16px;
    }

    .download-content {
        padding: 16px;
    }

    .alb-icon {
        width: 64px;
        height: 64px;
    }

    .alb-name {
        font-size: 20px;
    }

    .alb-download-cell {
        padding: 10px 12px;
        font-size: 13px;
        gap: 6px;
        margin: 6px;
        flex: 0 0 calc(50% - 12px); /* Two items per row with margin */
    }

    .alb-download-row .download-button {
        padding: 8px 16px;
        font-size: 13px;
        max-width: 250px;
    }

    .button-container {
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .alb-download-cell {
        flex: 0 0 calc(50% - 12px); /* Maintain two items per row */
        margin: 6px;
    }

    .alb-download-row .download-button {
        max-width: 200px;
    }
}

/* Social share buttons on Sidebar */

/* layout */
.ga-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ga-buttons .ga-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  padding: 12px 10px;
  border-radius: 16px;
  text-decoration: none;

  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-align: center;

  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.18);

  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.ga-buttons .ga-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

/* icon badge */
.ga-buttons .ga-iconwrap {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

/* icon itself (loaded via CSS below) */
.ga-buttons .ga-icon {
  width: 22px;
  height: 22px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ✅ icon mapping based on data-share */
.ga-btn[data-share="facebook"]  .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/facebook-icon.svg"); }
.ga-btn[data-share="x"]         .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/x-icon.svg"); }
.ga-btn[data-share="linkedin"]  .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/linkedin-icon.svg"); }
.ga-btn[data-share="messenger"] .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/messenger-icon.svg"); }
.ga-btn[data-share="whatsapp"]  .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/whatsapp-icon.svg"); }
.ga-btn[data-share="telegram"]  .ga-icon { background-image: url("/wp-content/themes/al-baramij/custom/images/icons/telegram-icon.svg"); }

/* brand colors */
.ga-btn--facebook  { background: #1877f2; }
.ga-btn--x         { background: #111111; }
.ga-btn--linkedin  { background: #0a66c2; }
.ga-btn--messenger { background: #0084ff; }
.ga-btn--whatsapp  { background: #25d366; }
.ga-btn--telegram  { background: #229ed9; }

/* Auto-switch to 2 columns on small sidebars */
@media (max-width: 420px) {
  .ga-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Hide text on mobile; icons only */
@media (max-width: 520px) {
  .ga-buttons .ga-text {
    display: none;
  }

  .ga-buttons .ga-btn {
    padding: 13px 10px;
  }

  .ga-buttons .ga-iconwrap {
    width: 34px;
    height: 34px;
  }

  .ga-buttons .ga-icon {
    width: 20px;
    height: 20px;
  }
}
