/*==============================================================
  End Poverty — Publications showcase (newsletters + annual reports)
  Shared styles. Loaded on newsletter.php and annualreport.php.
==============================================================*/
    /* Modern Newsletter Section Styles */
    :root {
      --ep-primary: #1893c7;
      --ep-primary-dark: #0f6e96;
      --ep-accent: #f28500;
      --ep-accent-dark: #d97706;
      --ep-dark: #1b263b;
      --ep-light-bg: #f8fafc;
      --ep-card-bg: #ffffff;
      --ep-border: #e2e8f0;
      --ep-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
      --ep-shadow-md: 0 10px 25px -5px rgba(24, 147, 199, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
      --ep-shadow-hover: 0 20px 35px -8px rgba(24, 147, 199, 0.22), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
      --ep-radius: 16px;
      --ep-transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .newsletter-section {
      background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
      padding: 70px 0 90px;
    }

    /* Section Header */
    .ep-badge-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(24, 147, 199, 0.1);
      color: var(--ep-primary);
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 6px 16px;
      border-radius: 30px;
      margin-bottom: 14px;
      border: 1px solid rgba(24, 147, 199, 0.2);
    }

    .newsletter-section .section-title {
      font-size: 2.5rem;
      font-weight: 800;
      color: var(--ep-dark);
      letter-spacing: -0.5px;
      margin-bottom: 12px;
    }

    .newsletter-section .section-title span {
      color: var(--ep-primary);
      position: relative;
    }

    .newsletter-section .section-subtitle {
      font-size: 1.1rem;
      color: #64748b;
      max-width: 680px;
      margin: 0 auto;
      line-height: 1.6;
    }

    /* Filters Bar */
    .ep-filters-wrapper {
      background: #ffffff;
      border: 1px solid var(--ep-border);
      border-radius: 14px;
      padding: 12px 18px;
      box-shadow: var(--ep-shadow-sm);
      margin-bottom: 40px;
    }

    .ep-search-box {
      position: relative;
    }

    .ep-search-box i {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: #94a3b8;
      font-size: 0.95rem;
    }

    .ep-search-box input {
      width: 100%;
      padding: 10px 16px 10px 40px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      font-size: 0.95rem;
      outline: none;
      transition: var(--ep-transition);
      background-color: #f8fafc;
    }

    .ep-search-box input:focus {
      background-color: #ffffff;
      border-color: var(--ep-primary);
      box-shadow: 0 0 0 3px rgba(24, 147, 199, 0.15);
    }

    .ep-year-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .ep-year-btn {
      padding: 7px 16px;
      font-size: 0.88rem;
      font-weight: 600;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      color: #475569;
      cursor: pointer;
      transition: var(--ep-transition);
      outline: none;
    }

    .ep-year-btn:hover {
      background: #e2e8f0;
      color: var(--ep-dark);
    }

    .ep-year-btn.active {
      background: var(--ep-primary);
      color: #ffffff;
      border-color: var(--ep-primary);
      box-shadow: 0 4px 10px rgba(24, 147, 199, 0.3);
    }

    /* Newsletter Card */
    .ep-newsletter-card {
      background: var(--ep-card-bg);
      border-radius: var(--ep-radius);
      border: 1px solid var(--ep-border);
      box-shadow: var(--ep-shadow-sm);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
      transition: var(--ep-transition);
      position: relative;
    }

    .ep-newsletter-card:hover {
      transform: translateY(-8px);
      box-shadow: var(--ep-shadow-hover);
      border-color: rgba(24, 147, 199, 0.35);
    }

    /* Thumbnail Cover Area */
    .ep-card-thumb-wrapper {
      position: relative;
      width: 100%;
      height: 290px;
      overflow: hidden;
      background: #0f2b3e;
    }

    .ep-card-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .ep-newsletter-card:hover .ep-card-thumb {
      transform: scale(1.06);
    }

    /* Fallback Branded Graphic Cover */
    .ep-branded-cover {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 24px 20px;
      position: relative;
      background: linear-gradient(135deg, #0b2f4a 0%, #155d82 50%, #1893c7 100%);
      color: #ffffff;
      overflow: hidden;
    }

    .ep-branded-cover::before {
      content: "";
      position: absolute;
      top: -30%;
      right: -30%;
      width: 240px;
      height: 240px;
      background: radial-gradient(circle, rgba(242, 133, 0, 0.35) 0%, rgba(242, 133, 0, 0) 70%);
      border-radius: 50%;
      pointer-events: none;
    }

    .ep-branded-cover::after {
      content: "";
      position: absolute;
      inset: 0;
      background: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.04" fill-rule="evenodd"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>');
      opacity: 0.8;
      pointer-events: none;
    }

    .ep-cover-header {
      position: relative;
      z-index: 2;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .ep-cover-logo-text {
      font-size: 0.85rem;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .ep-cover-logo-text span {
      color: var(--ep-accent);
    }

    .ep-cover-icon {
      font-size: 1.4rem;
      color: rgba(255, 255, 255, 0.85);
    }

    .ep-cover-center {
      position: relative;
      z-index: 2;
      margin: auto 0;
      text-align: left;
    }

    .ep-cover-badge {
      display: inline-block;
      background: rgba(242, 133, 0, 0.9);
      color: #ffffff;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 3px 10px;
      border-radius: 4px;
      margin-bottom: 10px;
    }

    .ep-cover-title {
      font-size: 1.45rem;
      font-weight: 800;
      line-height: 1.25;
      color: #ffffff;
      text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .ep-cover-footer {
      position: relative;
      z-index: 2;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      border-top: 1px solid rgba(255, 255, 255, 0.15);
      padding-top: 12px;
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.8);
    }

    /* Floating badges & overlays */
    .ep-card-badge-floating {
      position: absolute;
      top: 14px;
      left: 14px;
      background: rgba(15, 23, 42, 0.78);
      backdrop-filter: blur(6px);
      color: #ffffff;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.4px;
      padding: 4px 12px;
      border-radius: 20px;
      z-index: 3;
      border: 1px solid rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .ep-card-badge-floating i {
      color: var(--ep-accent);
    }

    .ep-card-overlay {
      position: absolute;
      inset: 0;
      background: rgba(11, 47, 74, 0.55);
      backdrop-filter: blur(2px);
      opacity: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--ep-transition);
      z-index: 4;
    }

    .ep-newsletter-card:hover .ep-card-overlay {
      opacity: 1;
    }

    .ep-quick-view-btn {
      background: #ffffff;
      color: var(--ep-dark);
      padding: 10px 20px;
      border-radius: 30px;
      font-weight: 700;
      font-size: 0.88rem;
      text-decoration: none;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
      transform: translateY(12px);
      transition: var(--ep-transition);
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .ep-newsletter-card:hover .ep-quick-view-btn {
      transform: translateY(0);
    }

    .ep-quick-view-btn:hover {
      background: var(--ep-accent);
      color: #ffffff;
    }

    /* Card Body */
    .ep-card-body {
      padding: 22px 20px 18px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      justify-content: space-between;
      background: #ffffff;
    }

    .ep-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.82rem;
      color: #64748b;
      margin-bottom: 10px;
    }

    .ep-date-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 500;
    }

    .ep-date-badge i {
      color: var(--ep-primary);
    }

    .ep-format-tag {
      background: #f1f5f9;
      color: #475569;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 0.72rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .ep-card-title {
      font-size: 1.18rem;
      font-weight: 700;
      line-height: 1.4;
      color: var(--ep-dark);
      margin-bottom: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 48px;
    }

    .ep-card-title a {
      color: inherit;
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .ep-card-title a:hover {
      color: var(--ep-primary);
    }

    /* Action Buttons */
    .ep-card-actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      padding-top: 14px;
      border-top: 1px solid #f1f5f9;
    }

    .ep-btn-read {
      background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-primary-dark) 100%);
      color: #ffffff !important;
      padding: 10px 14px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 0.88rem;
      text-align: center;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: var(--ep-transition);
      box-shadow: 0 4px 10px rgba(24, 147, 199, 0.2);
    }

    .ep-btn-read:hover {
      background: linear-gradient(135deg, var(--ep-accent) 0%, var(--ep-accent-dark) 100%);
      box-shadow: 0 6px 14px rgba(242, 133, 0, 0.3);
      color: #ffffff !important;
      transform: translateY(-2px);
    }

    .ep-btn-download {
      background: #f8fafc;
      color: #475569 !important;
      border: 1px solid var(--ep-border);
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 0.95rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      transition: var(--ep-transition);
    }

    .ep-btn-download:hover {
      background: #e2e8f0;
      color: var(--ep-dark) !important;
      border-color: #cbd5e1;
      transform: translateY(-2px);
    }

    /* Empty state */
    .ep-no-results {
      padding: 60px 20px;
      text-align: center;
      background: #ffffff;
      border-radius: var(--ep-radius);
      border: 1px dashed #cbd5e1;
    }

    .ep-no-results i {
      font-size: 3rem;
      color: #94a3b8;
      margin-bottom: 16px;
    }

    /* Newsletter Callout Banner */
    .ep-newsletter-cta {
      background: linear-gradient(135deg, #0b2f4a 0%, #1893c7 100%);
      border-radius: 20px;
      padding: 40px 36px;
      color: #ffffff;
      margin-top: 60px;
      position: relative;
      overflow: hidden;
      box-shadow: var(--ep-shadow-md);
    }

    .ep-newsletter-cta::before {
      content: "";
      position: absolute;
      top: -40%;
      right: -10%;
      width: 300px;
      height: 300px;
      background: radial-gradient(circle, rgba(242, 133, 0, 0.3) 0%, rgba(242, 133, 0, 0) 70%);
      border-radius: 50%;
    }

    .ep-cta-btn {
      background: var(--ep-accent);
      color: #ffffff !important;
      font-weight: 700;
      padding: 12px 28px;
      border-radius: 30px;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: var(--ep-transition);
      box-shadow: 0 4px 15px rgba(242, 133, 0, 0.4);
    }

    .ep-cta-btn:hover {
      background: #ffffff;
      color: var(--ep-dark) !important;
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    @media (max-width: 768px) {
      .newsletter-section .section-title {
        font-size: 1.95rem;
      }
      .ep-card-thumb-wrapper {
        height: 240px;
      }
      .ep-newsletter-cta {
        padding: 30px 20px;
        text-align: center;
      }
      .ep-newsletter-cta .d-flex {
        flex-direction: column;
        gap: 20px;
      }
    }
