/* ============================================
   Dataset Page Specific Styles
   ============================================ */
:root {
    --dark-green: #1a5e3d;
    --primary-green: #2d8659;
    --light-green: #5fb884;
    --background: #f3fbf7;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --gray: #eaeaea;
    --text-dark: #1a2e22;
    --text-light: #5a7165;
    --shadow: 0 5px 15px rgba(26, 94, 61, 0.08);
    --shadow-hover: 0 10px 25px rgba(26, 94, 61, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --gradient-green: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    --gradient-green-light: linear-gradient(135deg, var(--light-green), var(--primary-green));
}

/* Data Source section */
/* Agent Hero Section */
.agent-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--gradient-green);
    padding: 7rem 5% 3rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.agent-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1677442136019-21780ecad995?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.agent-hero-content {
    position: relative;
    z-index: 1;
    /* max-width: 900px; */
    min-width: 60%;
}

.agent-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.agent-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.agent-hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}











/* Dataset Resources Section */
.dataset-resources {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.resources-container {
    max-width: 1400px;
    margin: 0 auto;
}

.resource-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-green);
}

.resource-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.resource-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.subtitle-en {
    font-size: 1.3rem;
    color: #7f8c8d;
    font-weight: 400;
    margin-top: 5px;
}

/* Arabic Content Styling */
.arabic-content {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

.description-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-right: 5px solid var(--primary-green);
}

.description-box h3 {
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 20px;
    font-weight: 700;
}

.description-box p {
    font-size: 1.1rem;
    line-height: 2;
    color: #34495e;
    margin-bottom: 15px;
}

/* Sections Grid */
.sections-box {
    margin-bottom: 30px;
}

.sections-box h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: left;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.section-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.section-item:hover {
    border-color: var(--primary-green);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.section-item i {
    font-size: 1.8rem;
    color: var(--primary-green);
    min-width: 40px;
}

.section-item h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.section-item p {
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.6;
}

/* Visit Website Button */
.visit-website {
    text-align: center;
    margin-top: 30px;
}

.website-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #45a049 100%);
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.website-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.4);
}

.website-btn i {
    font-size: 1.5rem;
}

/* Yearly Reports Card */
.yearly-reports .resource-content {
    text-align: center;
}

.reports-description {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 30px;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
}

.reports-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    text-align: right;
    direction: rtl;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.1rem;
    color: #2c3e50;
    justify-content: flex-end;
}

.feature-item i {
    color: var(--primary-green);
    font-size: 1.3rem;
}

.reports-action {
    margin-top: 30px;
}

.reports-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.reports-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.4);
}

/* Institution Certification Card */
.certification-description {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 30px;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.cert-item {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4cc 100%);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #ffd699;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.2);
}

.cert-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cert-icon i {
    font-size: 2rem;
    color: white;
}

.cert-item h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.cert-item p {
    font-size: 1rem;
    color: #7f8c8d;
}

/* Certification Images Grid */
.certifications-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.cert-image-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cert-image-item a {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.cert-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.15);
    border-color: var(--primary-green);
    cursor: pointer;
}

.cert-image-item img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
}

.cert-image-item p {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.certification-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #45a049 100%);
    color: white;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.badge i {
    font-size: 1.2rem;
}

/* Dataset Info Section */
.dataset-info {
    padding: 60px 20px;
    background: white;
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.info-container h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 50px;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.info-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-card p {
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resource-card {
        padding: 25px;
    }

    .resource-header {
        flex-direction: column;
        text-align: center;
    }

    .resource-header h2 {
        font-size: 1.5rem;
    }

    .sections-grid {
        grid-template-columns: 1fr;
    }

    .certification-grid {
        grid-template-columns: 1fr;
    }

    .certifications-images-grid {
        grid-template-columns: 1fr;
    }

    .certification-badges {
        flex-direction: column;
    }

    .website-btn,
    .reports-btn {
        font-size: 1.1rem;
        padding: 15px 30px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .resource-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .resource-header h2 {
        font-size: 1.3rem;
    }

    .description-box {
        padding: 20px;
    }

    .description-box p {
        font-size: 1rem;
    }
}

/* ============================================
   Annual Reports Browsing Section
   ============================================ */

.annual-reports-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff3e0 100%);
    border-radius: 15px;
    border: 2px solid #ffcc80;
}

.annual-reports-section h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.reports-intro {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

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

.report-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.report-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-green);
}

.report-cover {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
    cursor: pointer;
}

.report-cover.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.pdf-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.pdf-preview.pdf-loaded {
    opacity: 1;
}

.report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    width: 100%;
    height: 100%;
    transition: all 0.25s ease;
    opacity: 0;
}

.report-card:hover .report-overlay {
    background: rgba(0, 0, 0, 0.65);
    opacity: 1;
}

.report-overlay i {
    font-size: 3.2rem;
    color: white;
    margin-bottom: 12px;
    opacity: 0.95;
}

.report-year {
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
}

.report-card h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.report-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-btn,
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.view-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
}

/* Pagination Controls */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn,
.page-number {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled),
.page-number:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

/* Color Variations for Different Reports */
.report-card:nth-child(3n+1) .report-cover {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.report-card:nth-child(3n+2) .report-cover {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.report-card:nth-child(3n) .report-cover {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

/* Loading State for PDFs */
.pdf-preview.loading {
    background: rgba(255, 255, 255, 0.1);
}

.pdf-preview::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Report Card Hover Effect */
.report-card {
    position: relative;
}

.report-card::after {
    content: 'Click to view full report';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.report-card:hover::after {
    opacity: 1;
}

/* Responsive Design for Reports Grid */
@media (max-width: 1024px) {
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }

    .report-cover {
        height: 280px;
    }

    .report-year {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .annual-reports-section {
        padding: 20px;
    }

    .report-cover {
        height: 250px;
    }

    .report-cover i {
        font-size: 3rem;
    }

    .report-year {
        font-size: 2rem;
    }

    .report-card h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .annual-reports-section h3 {
        font-size: 1.5rem;
    }

    .reports-intro {
        font-size: 1rem;
    }

    .pagination {
        gap: 5px;
    }

    .page-btn,
    .page-number {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .report-actions {
        flex-direction: column;
        gap: 8px;
    }

    .view-btn,
    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .report-card::after {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
}

/* Specific adjustments for the 2014 report cover (different aspect / PNG) */
.report-cover[data-pdf$="2014_report.pdf"] .report-cover-img {
    width: 100%;
    height: 100%;
    max-width: 260px;
    max-height: 320px;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    background: #ffffff;
    padding: 6px;
    border-radius: 14px;
    border: 6px solid rgba(62,130,80,0.12);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .report-cover[data-pdf$="2014_report.pdf"] .report-cover-img {
        max-width: 220px;
        max-height: 280px;
        padding: 4px;
        border-radius: 12px;
    }
}

/* General cover image styling for all reports (SVG/PNG) */
.report-cover .report-cover-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .report-cover .report-cover-img {
        border-radius: 10px;
    }
}

.pagination{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* optional spacing */
}
