/* Page-specific styles */

/* ========================================
     FADE-IN ANIMATIONS
     ======================================== */
    .fade-in {
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

    .fade-in.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ========================================
     LAYOUT FIXES
     ======================================== */

    /* Remove excessive padding */
    .rl-padding-section-large-2 {
      padding-top: 0 !important;
      padding-bottom: 1rem !important;
    }

    .rl_blog8_component {
      gap: 0;
    }

    /* Spacing adjustments */
    .rl_blog8_spacing-block-7,
    .rl_blog8_spacing-block-8 {
      padding-bottom: 1.5rem !important;
    }

    /* ========================================
     HEADER SECTION RESPONSIVE
     ======================================== */
    .section.header {
      min-height: 280px;
    }

    .section.header .container.header {
      padding: 0 1rem;
    }

    @media (max-width: 991px) {
      .section.header {
        min-height: 240px;
      }

      .section.header .container.header {
        margin-top: 120px;
      }

      .section.header .h1 {
        font-size: 2.5rem;
        line-height: 1.2;
      }

      .section.header .large {
        font-size: 1rem;
        line-height: 1.5;
      }
    }

    @media (max-width: 767px) {
      .section.header {
        min-height: 200px;
        padding: 40px 5%;
      }

      .section.header .container.header {
        margin-top: 100px;
      }

      .section.header .h1 {
        font-size: 2rem;
        line-height: 1.2;
      }

      .section.header .large {
        font-size: 0.95rem;
        line-height: 1.4;
        padding: 0 10px;
      }
    }

    @media (max-width: 479px) {
      .section.header .h1 {
        font-size: 1.75rem;
      }

      .section.header .large {
        font-size: 0.875rem;
      }
    }

    /* ========================================
     RESPONSIVE CATEGORY MENU - DESKTOP
     ======================================== */
    .rl_blog8_category-menu {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 1.5rem;
      padding: 0;
      justify-content: center;
    }

    .rl_blog8_menu-link {
      transition: all 0.2s ease;
      border-radius: 4px;
      padding: 0.5rem 1rem;
      white-space: nowrap;
      border: 1px solid transparent;
      font-weight: 500;
    }

    .rl_blog8_menu-link:hover {
      color: #1F78C1;
      background-color: rgba(31, 120, 193, 0.05);
    }

    .rl_blog8_menu-link.current {
      border: 1px solid #1F78C1 !important;
      color: #1F78C1 !important;
      font-weight: 600;
      background-color: rgba(31, 120, 193, 0.08);
    }

    /* ========================================
     MOBILE/TABLET CATEGORY DROPDOWN
     ======================================== */
    .category-dropdown {
      display: none;
      position: relative;
      margin-bottom: 1.5rem;
      width: 100%;
    }

    .category-dropdown-toggle {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      padding: 0.875rem 1rem;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 500;
      font-family: inherit;
      color: #333;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .category-dropdown-toggle:hover,
    .category-dropdown-toggle:focus {
      border-color: #1F78C1;
      outline: none;
    }

    .category-dropdown-toggle.open {
      border-color: #1F78C1;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    .category-dropdown-icon {
      width: 20px;
      height: 20px;
      transition: transform 0.2s ease;
    }

    .category-dropdown-toggle.open .category-dropdown-icon {
      transform: rotate(180deg);
    }

    .category-dropdown-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #fff;
      border: 1px solid #1F78C1;
      border-top: none;
      border-radius: 0 0 8px 8px;
      z-index: 100;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      overflow: hidden;
    }

    .category-dropdown-menu.open {
      display: block;
    }

    .category-dropdown-option {
      display: block;
      width: 100%;
      padding: 0.875rem 1rem;
      background: #fff;
      border: none;
      font-size: 1rem;
      font-family: inherit;
      color: #333;
      text-align: left;
      cursor: pointer;
      transition: background-color 0.15s ease;
    }

    .category-dropdown-option:hover,
    .category-dropdown-option:focus {
      background-color: rgba(31, 120, 193, 0.05);
      outline: none;
    }

    .category-dropdown-option.active {
      background-color: #1F78C1;
      color: white;
      font-weight: 600;
    }

    .category-dropdown-option:not(:last-child) {
      border-bottom: 1px solid #eee;
    }

    /* Mobile/Tablet: Hide horizontal menu, show dropdown */
    @media (max-width: 991px) {
      .rl_blog8_category-menu {
        display: none !important;
      }

      .category-dropdown {
        display: block;
      }
    }

    /* ========================================
     FEATURED POST RESPONSIVE
     Clean style - no frames, just subtle zoom
     ======================================== */
    .rl_blog8_featured-list-wrapper {
      margin-bottom: 1.5rem;
      padding: 0.5rem;
    }

    /* Image zoom on hover */
    .rl_blog8_featured-image-wrapper {
      overflow: hidden;
    }

    .rl_blog8_featured-image {
      transition: transform 0.4s ease;
    }

    .rl_blog8_featured-item:hover .rl_blog8_featured-image {
      transform: scale(1.05);
    }

    .rl_blog8_featured-item-wrapper {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
    }

    .rl_blog8_featured-item-content {
      padding: 2rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    @media (max-width: 991px) {
      .rl_blog8_featured-item-wrapper {
        grid-template-columns: 1fr;
      }

      .rl_blog8_featured-image-wrapper {
        aspect-ratio: 16/9;
        max-height: 300px;
      }

      .rl_blog8_featured-item-content {
        padding: 1.5rem;
      }

      .rl-heading-style-h4 {
        font-size: 1.5rem;
        line-height: 1.3;
      }
    }

    @media (max-width: 767px) {
      .rl_blog8_featured-image-wrapper {
        aspect-ratio: 16/9;
        max-height: 220px;
      }

      .rl_blog8_featured-item-content {
        padding: 1.25rem;
      }

      .rl-heading-style-h4 {
        font-size: 1.25rem;
        line-height: 1.3;
      }

      .rl_blog8_featured-item-content .rl-text-style-regular-2 {
        font-size: 0.9rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }
    }

    @media (max-width: 479px) {
      .rl_blog8_featured-item-content {
        padding: 1rem;
      }

      .rl-heading-style-h4 {
        font-size: 1.125rem;
      }
    }

    /* ========================================
     BLOG GRID RESPONSIVE
     Clean style - no frames, just subtle zoom
     ======================================== */
    .rl_blog8_list-wrapper {
      padding: 0.5rem;
    }

    .rl_blog8_list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2rem;
    }

    .rl_blog8_item {
      transition: opacity 0.3s ease;
    }

    /* Image zoom on hover */
    .rl_blog8_image-wrapper {
      overflow: hidden;
      aspect-ratio: 3/2;
    }

    .rl_blog8_image {
      transition: transform 0.4s ease;
    }

    .rl_blog8_item:hover .rl_blog8_image {
      transform: scale(1.05);
    }

    .rl_blog8_item-content {
      padding: 1rem 0.25rem 0.25rem 0.25rem;
    }

    /* Line clamp for excerpts */
    .rl_blog8_item .rl-text-style-regular-2 {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    @media (max-width: 991px) {
      .rl_blog8_list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
      }

      .rl_blog8_item {
        padding: 0.875rem;
      }

      .rl-heading-style-h5-2 {
        font-size: 1.125rem;
        line-height: 1.4;
      }
    }

    @media (max-width: 767px) {
      .rl_blog8_list-wrapper {
        padding: 0.25rem;
      }

      .rl_blog8_list {
        grid-template-columns: 1fr;
        gap: 1rem;
      }

      .rl_blog8_item {
        padding: 0.75rem;
      }

      .rl_blog8_item-link {
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 0.875rem;
        align-items: center;
      }

      .rl_blog8_image-wrapper {
        aspect-ratio: 1;
        width: 110px;
        height: 110px;
        flex-shrink: 0;
      }

      .rl_blog8_item-content {
        padding: 0;
      }

      .rl-heading-style-h5-2 {
        font-size: 1rem;
        line-height: 1.3;
      }

      .rl_blog8_item .rl-text-style-regular-2 {
        -webkit-line-clamp: 2;
        font-size: 0.875rem;
        line-height: 1.4;
      }

      .rl_blog8_spacing-block-9,
      .rl_blog8_spacing-block-10,
      .rl_blog8_spacing-block-11 {
        padding-bottom: 0.25rem !important;
      }

      .rl_blog8_meta-wrapper {
        flex-wrap: wrap;
        gap: 0.5rem;
      }

      .rl_blog8_category {
        font-size: 0.7rem;
        padding: 2px 6px;
      }

      .rl_blog8_read-time-text {
        font-size: 0.75rem;
      }

      /* Hide read more on mobile cards for cleaner look */
      .rl_blog8_item .rl-button-link-2 {
        display: none;
      }
    }

    @media (max-width: 479px) {
      .rl_blog8_item {
        padding: 0.625rem;
      }

      .rl_blog8_item-link {
        grid-template-columns: 90px 1fr;
        gap: 0.625rem;
      }

      .rl_blog8_image-wrapper {
        width: 100px;
        height: 100px;
      }

      .rl-heading-style-h5-2 {
        font-size: 0.95rem;
      }

      .rl_blog8_item .rl-text-style-regular-2 {
        font-size: 0.8rem;
      }
    }

    /* ========================================
     PAGINATION
     ======================================== */
    .pagination {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-top: 2.5rem;
      padding: 1rem 0;
    }

    .pagination-numbers {
      display: flex;
      gap: 6px;
    }

    .pagination-btn {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 6px;
      min-width: 40px;
      height: 40px;
      padding: 0.5rem 1rem;
      border: 1px solid #ddd;
      border-radius: 4px;
      background: #fff;
      color: #333;
      font-size: 0.95rem;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .pagination-btn:hover:not(.disabled):not(.active) {
      border-color: #1F78C1;
      color: #1F78C1;
      background-color: rgba(31, 120, 193, 0.05);
    }

    .pagination-btn.active {
      background-color: #1F78C1;
      border-color: #1F78C1;
      color: white;
    }

    .pagination-btn.disabled {
      opacity: 0.4;
      cursor: not-allowed;
      pointer-events: none;
    }

    @media (max-width: 767px) {
      .pagination {
        gap: 4px;
        margin-top: 2rem;
      }

      .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
      }

      .pagination-btn.prev,
      .pagination-btn.next {
        padding: 0.4rem 0.75rem;
      }

      .pagination-numbers {
        gap: 4px;
      }
    }

    @media (max-width: 479px) {
      .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
      }

      .pagination-btn.prev span,
      .pagination-btn.next span {
        display: none;
      }
    }

    /* ========================================
     CATEGORY BADGE COLORS
     ======================================== */
    .rl_blog8_category {
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    /* ========================================
     NO RESULTS MESSAGE
     ======================================== */
    .no-results {
      text-align: center;
      padding: 3rem 1rem;
      color: #666;
    }

    .no-results h3 {
      margin-bottom: 0.5rem;
      color: #333;
    }

    /* ========================================
     MAIN SECTION RESPONSIVE
     ======================================== */
    .section {
      padding: 60px 5%;
    }

    @media (max-width: 991px) {
      .section {
        padding: 40px 2.5%;
      }
    }

    @media (max-width: 767px) {
      .section {
        padding: 30px 5%;
      }
    }
