/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
  /* Colors */
  /*--color-primary: #019147;*/
  --color-primary: #019147;
  --color-primary-dark: #075d39;
  --color-primary-light: #069454;
  --color-success-700: #067647;
  --color-success-50: #ecfdf3;
  --color-success-200: #abefc6;
  --color-success-600: #079455;
  --color-success-800: #085d3a;
  --color-success-950: #053321;
  --color-button-primary: var(--color-primary);
  /*
  --color-hero-bg: #019147;
  */
  --color-hero-bg: #019147;
  --color-text-primary: #414651;
  --color-text-primary-900: #181d27;
  --color-text-secondary: #717680;
  --color-text-tertiary: #637381;
  --color-text-tertiary-600: #535862;
  --color-text-placeholder: #717680;
  --color-text-dark: #161c24;
  --color-bg-white: #ffffff;
  --color-bg-light: #f5f5f5;
  --color-bg-gray: #e9e9eb;
  --color-border: #e9e9eb;
  --color-border-primary: #d5d7da;
  --color-border-secondary: #e9eaeb;
  --color-border-subtle: #f6f6f6;
  --color-icon-border: #e9eaeb;
  
  /* Border Styles */
  --border-default: 1px solid var(--color-border-secondary);
  --color-accent: #7e56d8;

  /* Typography */
  --font-primary: 'Questrial', sans-serif;
  --font-secondary: 'Questrial', sans-serif;
  --font-size-xs: 14px;
  --font-size-sm: 16px;
  --font-size-base: 16px;
  --font-size-lg: 24px;
  --font-size-xl: 20px;
  --font-size-2xl: 32px;
  --font-size-3xl: 64px;
  --font-size-section-title: 42px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 40px;
  --spacing-3xl: 64px;
  --spacing-4xl: 72px;
  --spacing-7xl: 64px;
  --spacing-header-y: 20px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-2xl: 16px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0px 1px 2px rgba(0.039, 0.05, 0.071, 0.05);
  --shadow-xs: 0px 1px 2px rgba(10, 13, 18, 0.05);
  --shadow-md: 0px 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0px 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-skeumorphic-inner: inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18), inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05);

  /* Layout */
  --container-max-width: 1200px;
  --container-max-width-wide: 1440px;
  --container-padding: 70px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  line-height: 1.5;
  direction: rtl;
  overflow-x: hidden !important;
}

/* ============================================
   Responsive Variables
   ============================================ */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--spacing-lg);
    --font-size-3xl: 40px;
  }
}

a{
  text-decoration: none;
  color: var(--color-primary-dark);
}

.container-x{
  margin: 0 auto;
}

.form-notification-msg{
  background-color: #eee;
  padding: 25px;
  margin: 20px 0;
  border-radius: 10px;
}

.password-container {
  position: relative;
}

.password-container .form-input {
  padding-right: 45px; /* space for icon */
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
  font-size: 16px;
}

.password-toggle:hover {
  color: #333;
}

.read-more{
  width: 200px !important;
}

.fatwa-top-tools{
    margin-bottom: 20px;
    color: #000;
    display: flex;
  }

  .fatwa-top-tools a.fatawa-tool{
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: #eee;
    height: 32px;
    width: 32px;
    border-radius: 4px;
    margin: 0 2px;
  }

  .fatwa-top-tools a.fatawa-tool:hover{
    color: #CCC;
  }

  .print-fatwa-wrapper div{
    margin-bottom: 20px;
  }

  .print-logo{
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 50px;
  }

  .page-simple-content h1{
    margin-bottom: 10px;
  }

  .views{
    margin: 10px 0 20px 0;
  }

  .text-start{
    text-align: right !important;
  }

  .post-date{
    font-size: 11px;
    display: block;
    margin-bottom: 10px;
  }

  .question-box{
    margin: 20px 0;
    padding: 25px;
    background-color: #f5f5f5;
  }

  .answer-box{
    background-color: var(--color-bg-gray);
  }

  .load-more {
  width: auto;
  padding: 10px 16px;
  background: var(--color-button-primary);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: white;
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 24px;
  font-weight: normal;
  cursor: pointer;
  margin-top: 32px;
  margin-left: auto;
  margin-right: 0;
  transition: background-color 0.2s;
  box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05), inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18),
    inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05);
  
  
  display: inline-block; margin-top: 20px;
}

.load-more:hover {
  background: var(--color-success-800);
}

img.dim {
    filter: grayscale(100%) opacity(0.6);
}

.my-account{
  display: grid;
  grid-template-columns: 300px 1fr;
  justify-content: center;
  align-items: start;
  gap:25px;
}

.tabs {
  display: block;
  border:1px solid #f5f5f5;
  border-radius: 25px;
}

.tabs-head{
  background-color: #dbfae6;
  padding: 10px;
  text-align: center;
}

.tabs-head h3{
  color: #000;
  font-size: 16px;
}

.tabs-head span{
  color: #535862;
  font-size: 13px;
}

.tab-button{
    padding: 10px 20px;
    cursor: pointer;
    background: #fff;
    margin: 10px;
    color: #636770;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    display: grid;
    grid-template-columns: 35px 1fr;
    align-items: center;
}

.tab-button a {
    color: #636770;
    background-image: url(../icons/chev.png);
    background-position: center left;
    background-repeat: no-repeat;
}

.tab-button:hover,
.tab-button.active {
    background: #f5f5f5;
}

.tab-content {
    display: none;
    padding-top: 20px;
}
.tab-content.active {
    display: block;
}

@media(max-width:800px){
  .my-account {
      display: block;
      margin-bottom: 10px;
      text-align: center;
  }
}

hr {
  border: none;
  height: 2px;
  background-color: #ccc;
}

.label-icon{
  width:40px;
}

.double-field-wrapper{
  width: 100% !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  align-items: center;
  grid-gap:25px;
  gap:25px;
}

.profile-img img{
  max-width: 100% !important;
}

@media(max-width:680px){
  .double-field-wrapper{
    display: block !important;
  }
}

@media(max-width:770px){
  .profile-img img{
    width: 80px !important;
  }
}

.divider-x {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.divider-x::before,
.divider-x::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #ccc;
  border-radius: 0; /* sharp edges */
}


.divider-x h2 {
  margin: 0 12px;
  font-size: 18px; /* adjust if needed */
}

.fancy-msg, .alert{
  background-color: #fffaeb;
  border: 2px solid #fedf89;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px !important;
}

.alert a, a.important{
  font-weight: bold !important;
  text-decoration: underline !important;
}

.alert-danger{
  color: red;
}

.alert-success{
  color: green;
}

.field-note{
  font-size: 12px;
}

.copy-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

/* Tabs2 */

.tabs2 {
    display: flex;
    border-bottom: 2px solid #ddd;
    width: 100%;
    margin-bottom: 30px;
}

.tab2 {
    padding: 10px 20px;
    cursor: pointer;
    user-select: none;
}

.tab2.active {
    border-bottom: 2px solid #075d39;
    color: #075d39;
    font-weight: bold;
}

.tab2-content {
    display: none;
    padding: 20px 0;
    width: 100%;
}

.tab2-content.active {
    display: block;
}

.nav-link {
  color: #333333; /* Dark gray/black for navigation */
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
}

.one-line {
    white-space: nowrap;
    display: inline-block;
}

.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px; /* Reduced space between boxes */
    margin: 15px 0;
    direction: ltr !important;
}

.otp-box {
    width: 38px !important;
    height: 42px !important; /* Reduced from 55px */
    text-align: center !important;
    font-size: 18px !important; /* Reduced font size to fit smaller box */
    font-weight: bold !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important; /* Slightly smaller border radius */
    outline: none !important;
    transition: all 0.2s ease !important;
}

.otp-box:focus {
    border-color: var(--color-primary) !important; /* Adjust to match your theme */
    box-shadow: 0 0 4px rgba(0, 255, 0, 0.3) !important;
}


/* Search Button Styling */
.search-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: inherit;
  transition: opacity 0.2s ease;
}

.search-toggle-btn:hover {
  opacity: 0.75;
}

/* Lightbox Base Styles */
.search-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* Semi-transparent Backdrop */
.search-lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

/* Lightbox Box Content */
.search-lightbox-content {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 600px;
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.search-lightbox-close {
  position: absolute;
  top: 10px;
  left: 15px; /* Set to left for RTL layout; change to right for LTR */
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}

.search-input:focus {
  border-color:var(--color-primary);
}

.search-submit-btn {
  padding: 12px 24px;
  font-size: 16px;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsive adjustment for small screens */
@media (max-width: 480px) {
  .search-form {
    flex-direction: column;
  }
  
  .search-submit-btn {
    width: 100%;
  }
}

.gen-search-container{
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  justify-content: center;
  gap: 25px;
}

.gen-search-column-h{
  margin-bottom: 30px;
  color: var(--color-primary);
}

@media(max-width:1050px){
  .gen-search-container{
    grid-template-columns: 1fr;
  }
}

.search-sidebar {
    flex-shrink: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.6s ease;
    transform: translateX(0);
    opacity: 1;
    will-change: transform, opacity;
}

.search-sidebar-section {
  background: var(--color-bg-white);
  border: var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-sidebar-inner{
  padding: 20px;
}

.search-sidebar-section-header {
  background: #dcfae6;
  padding: 24px 24px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.search-sidebar-title {
  font-family: var(--font-secondary);
  font-size: 24px;
  line-height: 28px;
  font-weight: normal;
  color: #181d27;
  margin: 0;
  width: 100%;
  text-align: right;
}