/*
 Theme Name:   Abwab GP Child
 Theme URI:    https://abwab.com
 Description:  Abwab Platform Custom Theme overriding GeneratePress
 Author:       Antigravity
 Template:     generatepress
 Version:      1.0.0
*/

:root {
  --main-color: #0F4C81;
  --secondary-color: #2F6FA3;
  --light-color: #DCEAF6;
  --bg-general: #F7F8FA;
  --text-main: #1E1E1E;
  --text-heading: #0F172A;
  --accent-cta: #14B8A6;
  --white: #FFFFFF;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-general);
  color: var(--text-main);
  direction: rtl;
}

/* Header Utilities */
.abwab-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: var(--accent-cta);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn-header-cta:hover {
  background-color: var(--white);
  color: var(--main-color);
}

.login-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
}
.login-link:hover {
  color: var(--light-color);
}

/* Header Structure */
.site-header {
  background-color: var(--main-color);
  color: var(--white);
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(15, 76, 129, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 55px;
  width: 150px;
  background-color: var(--white);
  padding: 5px 15px;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}
.site-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 160px;
  width: auto;
  max-width: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s ease;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-cta);
  transition: width 0.3s ease;
}
.main-nav a:hover {
  color: var(--light-color);
}
.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Header Cart */
.header-cart {
  position: relative;
  color: var(--white);
  font-size: 22px;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}
.header-cart:hover {
  color: var(--light-color);
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #E11D48;
  color: white;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}
.user-dropdown-toggle {
  background: none;
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  padding: 0;
}
.user-avatar-img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}
.user-name {
  font-weight: 700;
  font-size: 14px;
}
.user-dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.3s ease;
}
.user-dropdown:hover .user-dropdown-toggle i {
  transform: rotate(180deg);
}
.user-dropdown-menu {
  position: absolute;
  top: 150%;
  left: 0;
  background: var(--white);
  min-width: 200px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.user-dropdown-menu li a:hover {
  background: var(--bg-general);
  color: var(--main-color);
}

/* Mobile Menu Elements */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}
.menu-close {
  display: none;
}
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-actions {
  display: none;
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    background-color: var(--main-color);
    padding: 80px 30px 30px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
  }
  .main-nav.active {
    right: 0;
  }
  .menu-close {
    position: absolute;
    top: 25px;
    left: 25px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    display: block;
    transition: transform 0.3s ease;
  }
  .menu-close:hover {
    transform: rotate(90deg);
  }
  .main-nav ul {
    flex-direction: column;
    gap: 20px;
    text-align: right;
  }
  .main-nav a {
    font-size: 18px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
  }
  .main-nav a::after {
    display: none;
  }
  .header-actions {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .mobile-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
}

/* ===================================================
   ABWAB - LearnDash Curriculum Custom Styling
   Targets LearnDash 3.x native class output
=================================================== */

/* 1. Outer wrapper */
.learndash-wrapper .ld-item-list {
    background: #fff !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
    margin-bottom: 0 !important;
}

/* 2. "Course Content" heading row */
.learndash-wrapper .ld-section-heading {
    padding: 20px 25px !important;
    background: #fff !important;
    border-bottom: 2px solid #E2E8F0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.learndash-wrapper .ld-section-heading h2,
.learndash-wrapper .ld-section-heading h3 {
    font-size: 18px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: #0F172A !important;
}

/* 3. Section headings (e.g. "Section 1: ...") */
.learndash-wrapper .ld-item-list-section-heading {
    background: #F1F5F9 !important;
    padding: 14px 25px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    border-top: none !important;
    margin: 0 !important;
}

.learndash-wrapper .ld-lesson-section-heading {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0F4C81 !important;
    margin: 0 !important;
    text-align: right !important;
}

/* 4. Each lesson row */
.learndash-wrapper .ld-item-list-item {
    border: none !important;
    border-bottom: 1px solid #E2E8F0 !important;
    margin: 0 !important;
    background: #fff !important;
    transition: background 0.2s ease !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.learndash-wrapper .ld-item-list-item:last-child {
    border-bottom: none !important;
}

.learndash-wrapper .ld-item-list-item:hover {
    background: #F8FAFC !important;
}

/* 5. Lesson row inner preview */
.learndash-wrapper .ld-item-list-item-preview {
    padding: 16px 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: auto !important;
}

/* 6. Lesson title link */
.learndash-wrapper .ld-item-name {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
    flex: 1 !important;
}

.learndash-wrapper .ld-item-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    transition: color 0.2s ease !important;
    text-align: right !important;
}

.learndash-wrapper .ld-item-name:hover .ld-item-title {
    color: #0F4C81 !important;
}

/* 7. Status circle icon */
.learndash-wrapper .ld-status-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border: 2px solid #CBD5E1 !important;
    border-radius: 50% !important;
    background: transparent !important;
    flex-shrink: 0 !important;
}

.learndash-wrapper .ld-status-complete {
    background: #14B8A6 !important;
    border-color: #14B8A6 !important;
}

/* 8. Expand/Collapse button */
.learndash-wrapper .ld-expand-button.ld-button-alternate {
    background: rgba(15, 76, 129, 0.08) !important;
    color: #0F4C81 !important;
    border: 1px solid rgba(15, 76, 129, 0.15) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.learndash-wrapper .ld-expand-button.ld-button-alternate:hover {
    background: #0F4C81 !important;
    color: #fff !important;
    border-color: #0F4C81 !important;
}

.learndash-wrapper .ld-expand-button.ld-button-alternate .ld-text {
    color: inherit !important;
}

.learndash-wrapper .ld-expand-button .ld-icon {
    font-size: 12px !important;
    background: transparent !important;
    color: inherit !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    transition: transform 0.3s ease !important;
}

/* Main Expand All button */
.learndash-wrapper .ld-expand-button.ld-primary-background {
    background: #0F4C81 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: none !important;
}

/* 9. Topic expand container */
.learndash-wrapper .ld-item-list-item-expanded {
    background: #F8FAFC !important;
    border-top: 1px dashed #E2E8F0 !important;
}

/* 10. Topics table */
.learndash-wrapper .ld-table-list {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.learndash-wrapper .ld-table-list-header {
    display: none !important;
}

.learndash-wrapper .ld-table-list-item {
    border: none !important;
    border-bottom: 1px solid #E2E8F0 !important;
}

.learndash-wrapper .ld-table-list-item:last-child {
    border-bottom: none !important;
}

.learndash-wrapper .ld-table-list-item-preview {
    padding: 13px 25px 13px 50px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
    color: #475569 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

.learndash-wrapper .ld-table-list-item-preview:hover {
    background: rgba(15, 76, 129, 0.03) !important;
    color: #0F4C81 !important;
}

.learndash-wrapper .ld-topic-title {
    font-weight: 600 !important;
    color: inherit !important;
}

/* 11. Item count badge (e.g. "2 Topics") */
.learndash-wrapper .ld-item-components {
    font-size: 12px !important;
    color: #64748B !important;
    background: #F1F5F9 !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    margin-top: 4px !important;
    display: inline-block !important;
}

/* 12. Fix h2 title of curriculum tab */
#curriculum h2 {
    font-size: 26px;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 25px;
}

/* ==========================================================================
   Professional Footer Styles
   ========================================================================== */
.abwab-professional-footer {
    background-color: #0f172a;
    color: #cbd5e1;
    font-family: 'Cairo', sans-serif;
    padding-top: 80px;
    margin-top: 60px;
    border-top: 4px solid #14B8A6;
    direction: rtl;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3, .footer-col h4 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: #14B8A6;
    border-radius: 2px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 15px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 16px;
}

.footer-social a:hover {
    background: #14B8A6;
    transform: translateY(-3px);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links ul li a i {
    font-size: 10px;
    color: #14B8A6;
    transition: transform 0.3s ease;
}

.footer-links ul li a:hover {
    color: #14B8A6;
}

.footer-links ul li a:hover i {
    transform: translateX(-5px);
}

.footer-newsletter p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    margin-bottom: 30px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 0 6px 6px 0;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
}

.newsletter-form input:focus {
    border-color: #14B8A6;
}

.newsletter-form button {
    background: #14B8A6;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #0d9488;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-info span {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.footer-contact-info span i {
    color: #14B8A6;
    font-size: 18px;
}

.footer-bottom {
    background: #0b1120;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #14B8A6;
}

@media (max-width: 768px) {
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}
