/**
 * Resources CPT Styles
 * File: assets/resources.css
 * Supports Arabic & English (RTL/LTR)
 */

/* ================================
   CSS Variables
================================ */
:root {
    --res-primary:     #F05022;
    --res-secondary:   #034773;
    --res-dark:        #1a1a2e;
    --res-text:        #034773;
    --res-muted:       #666;
    --res-light-bg:    #f8f9fa;
    --res-white:       #fff;
    --res-border:      #e8e8e8;
    --res-radius:      16px;
    --res-radius-sm:   10px;
    --res-shadow:      0 4px 24px rgba(0,0,0,0.08);
    --res-shadow-lg:   0 12px 40px rgba(0,0,0,0.14);
    --res-transition:  all 0.3s ease;
}

/* ================================
   Base
================================ */
.resources-archive,
.single-resource {
    line-height: 1.8;
    color: var(--res-text);
}

.resources-archive.rtl,
.single-resource.rtl {
    direction: rtl;
    text-align: right;
}

.resources-archive.ltr,
.single-resource.ltr {
    direction: ltr;
    text-align: left;
}

.resources-container,
.resource-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
	    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* ================================
   Page Hero (Archive)
================================ */
.resources-page-hero {
    position: relative;
    background-image: url('/wp-content/uploads/2026/04/page-title.jpg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
	background-attachment:fixed;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 200px 20px 90px;
    text-align: center;
    overflow: hidden;
}

.resources-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: linear-gradient(135deg, #034773 0%, #F05022BA 100%);
    opacity: 0.88;
}

.resources-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.resources-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 9px 22px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.18);
}

.resources-breadcrumb a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.resources-breadcrumb a:hover { opacity: 0.75; }

.resources-breadcrumb .breadcrumb-sep {
    color: rgba(255,255,255,0.5);
}

.resources-breadcrumb .breadcrumb-current {
    color: rgba(255,255,255,0.75);
}

.resources-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.3;
}

.resources-page-description {
    color: rgba(255,255,255,0.85);
    margin: 0 auto;
    max-width: 640px;
    line-height: 1.8;
}

/* ================================
   Archive Container
================================ */
.resources-archive .resources-container {
    padding-top: 50px;
    padding-bottom: 70px;
}

/* ================================
   Filter
================================ */
.resources-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 44px;
}

.resources-filter .filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--res-white);
    color: var(--res-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--res-border);
    transition: var(--res-transition);
}

.resources-filter .filter-btn:hover,
.resources-filter .filter-btn.active {
    background: var(--res-primary);
    color: var(--res-white);
    border-color: var(--res-primary);
}

/* ================================
   Resources Grid (Archive)
================================ */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 992px) {
    .resources-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .resources-grid { grid-template-columns: 1fr; }
}

/* ================================
   Resource Card (Archive)
================================ */
.resource-card {
    background: var(--res-white);
    border-radius: var(--res-radius);
    overflow: hidden;
    box-shadow: var(--res-shadow);
    transition: var(--res-transition);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--res-shadow-lg);
}

.resource-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.resource-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #034773 0%, #F05022 100%);
}

.resource-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resource-card:hover .resource-card-image img {
    transform: scale(1.06);
}

.resource-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3,71,115,0.55) 0%, transparent 60%);
}

/* No Image */
.resource-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
}

/* Type Badge on Image */
.resource-type-badge {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    padding: 5px 14px;
    background: var(--res-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Card Body */
.resource-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.resource-category-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--res-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.resource-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    color: var(--res-text);
}

.resource-card-excerpt {
    font-size: 0.9rem;
    color: var(--res-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.resource-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--res-primary);
    margin-top: 6px;
    transition: gap 0.3s;
}

.resource-card:hover .resource-read-more {
    gap: 12px;
}

/* ================================
   Pagination
================================ */
.resources-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.resources-pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.resources-pagination a,
.resources-pagination span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--res-white);
    color: var(--res-muted);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--res-border);
    transition: var(--res-transition);
}

.resources-pagination a:hover,
.resources-pagination .current {
    background: var(--res-primary);
    color: var(--res-white);
    border-color: var(--res-primary);
}

/* No Results */
.resources-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--res-muted);
    font-size: 1.1rem;
}

/* ================================
   SINGLE — Hero
================================ */
.resource-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--res-dark);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.resource-hero-image {
    position: absolute;
    inset: 0;
}

.resource-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-hero-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(3,71,115,0.92) 0%, rgba(240,80,34,0.82) 100%);
    z-index: 1;
}

.resource-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 80px 0 60px;
    color: #fff;
}

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

/* Single Breadcrumb */
.resource-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 8px 18px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-wrap: wrap;
}

body .resource-breadcrumb a {
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.3s;
}

.resource-breadcrumb a:hover { opacity: 0.75; }
.resource-breadcrumb .breadcrumb-sep { opacity: 0.45; }
.resource-breadcrumb .breadcrumb-current { opacity: 0.7; }

/* Hero Badges */
.resource-hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.resource-type-pill {
    padding: 5px 16px;
    background: var(--res-primary);
    color: #fff;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.resource-type-pill.small {
    font-size: 0.7rem;
    padding: 4px 12px;
}

.resource-cat-pill {
    padding: 5px 16px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.25);
}

/* Hero Title */
.resource-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 16px;
    color: #fff;
    max-width: 760px;
	text-align:center;
}

.resource-hero-excerpt {
    color: rgba(255,255,255,0.82);
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

/* ================================
   SINGLE — Main Layout
================================ */
.resource-main {
    padding: 60px 0 80px;
    background: var(--res-light-bg);
}

/* Two-column grid: content 2/3 | form 1/3 */
.resource-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .resource-layout-grid {
        grid-template-columns: 1fr 340px;
        gap: 30px;
    }
}

@media (max-width: 860px) {
    .resource-layout-grid {
        grid-template-columns: 1fr;
    }
    /* On mobile: show form first */
    .resource-form-col { order: -1; }
}

/* ================================
   Content Sections
================================ */
.resource-content-col {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.resource-section {
    background: var(--res-white);
    border-radius: var(--res-radius);
    overflow: hidden;
    box-shadow: var(--res-shadow);
}

.resource-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 30px;
    border-bottom: 1px solid var(--res-border);
    background: #fafafa;
}

.resource-section-number {
    width: 40px;
    height: 40px;
    background: var(--res-primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.resource-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--res-text);
}

.resource-section-body {
    padding: 28px 30px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
}

.resource-section-body p { margin-bottom: 1.4em; }
.resource-section-body p:last-child { margin-bottom: 0; }

.resource-section-body h2,
.resource-section-body h3 {
    margin-top: 1.8em;
    margin-bottom: 0.7em;
    font-weight: 700;
    color: var(--res-text);
}

.resource-section-body ul,
.resource-section-body ol {
    padding-inline-start: 1.5em;
    margin-bottom: 1.4em;
}

.resource-section-body li {
    margin-bottom: 0.5em;
}

.resource-section-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.2em 0;
}

/* About section: full WP content */
.resource-about-body { }

/* ================================
   SINGLE — Sticky Form Column
================================ */
.resource-form-sticky {
    position: sticky;
    top: 90px;
}

.resource-form-card {
    background: var(--res-white);
    border-radius: var(--res-radius);
    box-shadow: var(--res-shadow-lg);
    overflow: hidden;
    border: 1px solid var(--res-border);
}

/* Thumbnail inside form card */
.resource-form-thumbnail {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.resource-form-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.resource-form-card-body {
    padding: 28px;
}

/* Stats row inside form card */
.resource-form-stats {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    overflow: hidden;
}

.rfs-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid var(--res-border);
}

.rfs-stat:last-child { border-right: none; }

.single-resource.rtl .rfs-stat {
    border-right: none;
    border-left: 1px solid var(--res-border);
}
.single-resource.rtl .rfs-stat:last-child { border-left: none; }

.rfs-stat strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--res-secondary);
    line-height: 1;
    margin-bottom: 3px;
}

.rfs-stat span {
    font-size: .68rem;
    color: var(--res-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Direct download fallback button */
.resource-direct-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--res-sky), var(--res-sky2));
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--res-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--res-transition);
}

.resource-direct-download:hover {
    background: linear-gradient(135deg, var(--res-secondary), #023d5e);
    transform: translateY(-2px);
}

.resource-form-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--res-secondary);
    margin: 0 0 8px;
    line-height: 1.3;
}

.resource-form-subtitle {
    font-size: 0.9rem;
    color: var(--res-muted);
    margin: 0 0 22px;
    line-height: 1.6;
}

.resource-form-wrapper {
    /* Fluent Form container */
}

/* Override Fluent Form styles to match brand */
.resource-form-wrapper .ff-el-input--label label {
    font-weight: 600 !important;
    font-size: 0.88rem !important;
}

.resource-form-wrapper input[type="text"],
.resource-form-wrapper input[type="email"],
.resource-form-wrapper input[type="tel"],
.resource-form-wrapper textarea,
.resource-form-wrapper select {
    border-radius: var(--res-radius-sm) !important;
    border-color: var(--res-border) !important;
    font-size: 0.95rem !important;
    padding: 10px 14px !important;
    transition: border-color 0.3s !important;
}

.resource-form-wrapper input:focus,
.resource-form-wrapper textarea:focus,
.resource-form-wrapper select:focus {
    border-color: var(--res-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(240,80,34,0.1) !important;
}

.resource-form-wrapper .ff_submit_btn_wrapper button,
.resource-form-wrapper button[type="submit"] {
    width: 100% !important;
    background: var(--res-primary) !important;
    border-color: var(--res-primary) !important;
    border-radius: var(--res-radius-sm) !important;
    padding: 13px 20px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: background 0.3s !important;
}

.resource-form-wrapper .ff_submit_btn_wrapper button:hover,
.resource-form-wrapper button[type="submit"]:hover {
    background: var(--res-secondary) !important;
    border-color: var(--res-secondary) !important;
}

.resource-no-form {
    font-size: 0.9rem;
    color: var(--res-muted);
    text-align: center;

/* Pages / Read time mini stats */
.resource-form-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--res-light-bg);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--res-secondary);
}
.resource-form-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
    padding: 20px 0;
}

/* ================================
   Related Resources
================================ */
.resource-related {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--res-border);
}

.resource-related-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 28px;
    color: var(--res-text);
}

.resource-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .resource-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .resource-related-grid { grid-template-columns: 1fr; }
}

.resource-related-card {
    background: var(--res-white);
    border-radius: var(--res-radius-sm);
    overflow: hidden;
    box-shadow: var(--res-shadow);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--res-transition);
}

.resource-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--res-shadow-lg);
}

.resource-related-image {
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, #034773 0%, #F05022 100%);
}

.resource-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.resource-related-card:hover .resource-related-image img {
    transform: scale(1.05);
}

.resource-related-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-related-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================
   Back Button
================================ */
.resource-back-wrapper {
    margin-top: 40px;
    display: flex;
}

.resource-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    background: var(--res-secondary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--res-radius-sm);
    transition: background 0.3s;
}

.resource-back-btn:hover {
    background: var(--res-primary);
    color: #fff !important;
}

/* ================================
   RTL Adjustments
================================ */
.single-resource.rtl .resource-hero-title,
.single-resource.rtl .resource-hero-excerpt {
    text-align: right;
}

.single-resource.rtl .resource-hero-badges,
.single-resource.rtl .resource-breadcrumb,
.single-resource.rtl .resource-back-wrapper {
    justify-content: flex-start;
}

.single-resource.rtl .resource-section-header {
    flex-direction: row-reverse;
}

.single-resource.rtl .resource-back-btn {
    flex-direction: row-reverse;
}

/* ================================
   Responsive Single
================================ */
@media (max-width: 768px) {
    .resource-hero { min-height: 360px; }
    .resource-hero-title { font-size: 1.7rem; }
    .resource-hero-content { padding: 60px 0 40px; }
    .resource-section-header { padding: 18px 20px; }
    .resource-section-body { padding: 20px; font-size: 1rem; }
    .resource-form-card-body { padding: 20px; }
    .resources-page-title { font-size: 2rem; }
    .resources-page-hero { padding: 50px 20px 60px; }
}

@media (max-width: 480px) {
    .resource-hero-title { font-size: 1.4rem; }
    .resources-page-title { font-size: 1.6rem; }
}