/* index.css - Homepage specific styles - FULLY OPTIMIZED */

/* Hero Section - OPTIMIZED */
.hero {
    background: linear-gradient(135deg, rgba(0, 150, 57, 0.95), rgba(0, 122, 45, 0.95)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23009639" width="1200" height="600"/><circle cx="200" cy="150" r="100" fill="%23FFD700" opacity="0.1"/><circle cx="800" cy="400" r="150" fill="%23FFD700" opacity="0.1"/><circle cx="1000" cy="200" r="80" fill="%23FFD700" opacity="0.1"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

/* TITLE IN 2 LINES - OPTIMIZED */
.hero h1 {
    font-size: 46px; /* Recommended: 46px - matches all page headers */
    margin-bottom: 0.8rem;
    animation: fadeInUp 0.8s;
    font-weight: 700;
    line-height: 1.3;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-line1,
.hero-line2 {
    display: block;
}

/* NEW SUBTITLE - OPTIMIZED */
.hero-subtitle {
    font-size: 19px;
    margin-bottom: 0.8rem;
    animation: fadeInUp 1s;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Box - OPTIMIZED */
.search-box {
    max-width: 600px;
    margin: 0.8rem auto;
    position: relative;
    animation: fadeInUp 1.2s;
}

.search-box input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    transition: box-shadow 0.3s;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box button:hover {
    background: #007a2d;
}

/* STATS - SUPER COMPACT */
.platform-stats-inline {
    max-width: 600px;
    margin: 0.6rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    gap: 0.8rem;
    animation: fadeInUp 1.4s;
}

.stat-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--white);
}

.stat-inline-number {
    font-size: 20px;
    font-weight: 700;
}

.stat-inline-label {
    font-size: 13px;
    opacity: 0.9;
}

.stat-separator {
    width: 2px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   SECTION TITLE OPTIMIZATION
   ======================================== */

.section-title {
    text-align: center;
    font-size: 34px;
    margin-bottom: 0.6rem;
    color: var(--dark);
    font-weight: 700;
}

/* ========================================
   WORLD BANK INDICATORS SECTION - OPTIMIZED
   ======================================== */

.worldbank-section {
    background: var(--white);
    padding: 1.2rem 0;
}

.worldbank-card {
    background: var(--white);
    padding: 1rem 1.8rem 1.8rem 1.8rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.worldbank-indicators {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Individual Indicator Item */
.indicator-item {
    text-align: center;
    transition: transform 0.3s;
}

.indicator-item:hover {
    transform: scale(1.05);
}

/* Circular Progress - OPTIMIZED SIZE */
.indicator-circle {
    position: relative;
    width: 85px;
    height: 85px;
    margin: 0 auto 0.7rem;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 6;
}

.circle-progress {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 264;
    transition: stroke-dashoffset 1s ease-in-out;
}

.circle-purple { stroke: #8b5cf6; }
.circle-green { stroke: #059669; }
.circle-blue { stroke: #3b82f6; }
.circle-orange { stroke: #f59e0b; }
.circle-pink { stroke: #ec4899; }

.indicator-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
}

.indicator-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.indicator-label {
    font-size: 15px;
    color: #666;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.indicator-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 14px;
    font-weight: 600;
}

.indicator-change.positive {
    color: #059669;
}

.indicator-change.negative {
    color: #dc2626;
}

.change-arrow {
    font-size: 1rem;
}

/* SUBTITLE BELOW CARDS - SMALL SIZE */
.worldbank-footer-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 0.8rem;
}

/* ========================================
   CATEGORIES SECTION
   ======================================== */

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px var(--shadow);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--primary);
}

.category-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary);
    stroke-width: 2.5;
    transition: transform 0.3s;
}

.category-card:hover .category-icon svg {
    transform: scale(1.15);
    stroke: #007a2d;
}

.category-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 19px;
    font-weight: 600;
}

.category-count {
    color: #666;
    font-size: 16px;
}

/* ========================================
   DATASETS SECTION
   ======================================== */

.datasets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.dataset-card {
    background: var(--white);
    padding: 1.8rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.dataset-card:hover {
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.dataset-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.dataset-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.dataset-title:hover {
    color: #007a2d;
    text-decoration: underline;
}

.dataset-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.format {
    background: var(--primary);
    color: var(--white);
}

.dataset-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 16px;
    color: #666;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dataset-description {
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 16px;
}

.dataset-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: var(--light);
    border-radius: 15px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.dataset-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn {
    width: 100%;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #007a2d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: #007a2d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .worldbank-indicators {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 1.8rem 0;
    }

    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        padding: 0 1rem;
    }

    .platform-stats-inline {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 0.9rem;
    }

    .stat-separator {
        display: none;
    }

    .stat-inline {
        flex: 1 1 45%;
        justify-content: center;
    }
    
    .worldbank-section {
        padding: 1.8rem 0;
    }

    .worldbank-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .worldbank-card {
        padding: 1.5rem;
    }

    .indicator-circle {
        width: 75px;
        height: 75px;
    }

    .indicator-value {
        font-size: 1.25rem;
    }

    .indicator-label {
        font-size: 14px;
    }
    
    .datasets {
        grid-template-columns: 1fr;
    }
    
    .dataset-header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .worldbank-indicators {
        grid-template-columns: 1fr;
    }

    .categories {
        grid-template-columns: 1fr;
    }
}