/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* McKinsey-inspired premium color palette */
    --primary-color: #001f2b;
    --secondary-color: #003d4f;
    --accent-color: #00a3a1;
    --danger-color: #d32f2f;
    --success-color: #00796b;
    --opportunity-color: #0277bd;
    --bg-color: #f5f5f5;
    --bg-light: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #212121;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --overlay-gradient: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* Animation keyframes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--accent-color);
}

.header-content {
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header h1 i {
    font-size: 2.2rem;
}

.subtitle {
    font-family: 'Oswald', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.3rem;
    opacity: 1;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle strong {
    font-weight: 700;
    letter-spacing: 2.5px;
}

.week-selector-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 2rem;
}

.week-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex: 1;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.language-selector i {
    color: white;
    opacity: 0.8;
    font-size: 1rem;
}

.language-select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
}

.language-select option {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
}

.week-badge {
    display: inline-block;
    background: var(--accent-color);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.week-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.week-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.week-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Country Navigation */
.country-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.country-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 0.85rem;
}

.filter-label i {
    margin-right: 0.4rem;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.country-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.country-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.country-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.country-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.country-btn .flag {
    font-size: 1.2rem;
}

.country-count {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.85rem;
}

.country-btn.active .country-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
    max-width: 750px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.08);
}

.stat-card i {
    font-size: 1.4rem;
    opacity: 0.9;
}

/* Default icon color */
.stat-card:nth-child(1) i {
    color: var(--accent-color);
}

/* Critical - Red */
.stat-card:nth-child(2) i {
    color: #ef4444;
}

/* Delay - Yellow/Amber */
.stat-card:nth-child(3) i {
    color: #fbbf24;
}

/* Opportunity - Blue */
.stat-card:nth-child(4) i {
    color: #3b82f6;
}

.stat-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.stat-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
}

/* News Grid */
.news-grid {
    display: grid;
    gap: 2rem;
}

/* Overview Layout (McKinsey-style) */
.overview-layout {
    display: block;
}

.hero-section {
    margin-bottom: 3rem;
}

/* McKinsey-style 5-item layout: 1 large + 4 vertical stacked */
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hero-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Main featured card (first item) */
.hero-card.featured {
    grid-row: span 2;
    height: 600px;
}

/* Side cards (4 items stacked) */
.hero-card.side {
    height: 285px;
}

.hero-card:hover {
    box-shadow: inset 0 0 0 2px var(--accent-color);
    z-index: 10;
}

.hero-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--primary-color);
    transition: transform 0.5s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hero-card:hover .hero-card-image {
    transform: scale(1.08);
}

.hero-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.85) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-card.side .hero-card-overlay {
    padding: 1.2rem;
}

.hero-card-category {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    background: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.8rem;
    border-radius: 0;
    width: fit-content;
}

.hero-card.side .hero-card-category {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.5rem;
}

.hero-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-card.side .hero-card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hero-card-country {
    font-size: 0.85rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.hero-card.side .hero-card-country {
    font-size: 0.75rem;
}

/* Secondary News Section - Two Column Layout */
.secondary-section {
    margin-top: 4rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--accent-color);
}

.secondary-content {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 3rem;
}

/* Left: Compact News Cards */
.secondary-list {
    display: grid;
    gap: 1.5rem;
}

.secondary-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.secondary-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.secondary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.secondary-item-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
    flex: 1;
    margin-right: 1rem;
}

.secondary-item-badges {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.mini-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-badge.delay {
    background: #fff3cd;
    color: #856404;
}

.mini-badge.critical {
    background: #f8d7da;
    color: #721c24;
}

.mini-badge.opportunity {
    background: #d1ecf1;
    color: #0c5460;
}

.secondary-item-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
}

.secondary-item-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.secondary-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Right: Country Insights Chart */
.country-insights {
    position: sticky;
    top: 100px;
}

.insights-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

.insights-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.chart-container {
    position: relative;
    margin: 2rem auto;
    width: 280px;
    height: 280px;
}

.css-donut {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #003d4f 0% 16.67%,
        #005670 16.67% 33.33%,
        #00a3a1 33.33% 50%,
        #0277bd 50% 66.67%,
        #00796b 66.67% 83.33%,
        #455a64 83.33% 100%
    );
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transform: perspective(800px) rotateX(15deg);
}

.css-donut::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.css-donut::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, #002030 0%, #001820 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chart-label {
    position: absolute;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10;
    letter-spacing: 0.5px;
}

.country-legend {
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.legend-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.legend-country {
    font-weight: 600;
    color: white;
}

.legend-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

.news-card {
    background: var(--card-bg);
    border-radius: 2px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-light);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 2px solid var(--bg-color);
}

.news-image-wrapper {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-color);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-title-section {
    flex: 1;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.news-title i {
    margin-left: 0.5rem;
    font-size: 1rem;
    opacity: 0.6;
}

.news-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.country-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.priority-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.priority-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-delay {
    background: #fff3cd;
    color: #856404;
}

.badge-critical {
    background: #f8d7da;
    color: #721c24;
}

.badge-opportunity {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-warehouse {
    background: #e7f3ff;
    color: var(--primary-color);
}

.badge-port {
    background: #e0f2f1;
    color: #004d40;
}

.badge-air {
    background: #f3e5f5;
    color: #4a148c;
}

.news-body {
    padding: 1.5rem;
}

.news-summary {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.news-impact {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.news-impact h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-impact p {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .hero-card.featured {
        height: 450px;
        grid-row: span 1;
    }

    .hero-card.side {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .header h1 i {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }
    
    .week-selector-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .week-selector {
        gap: 0.8rem;
    }
    
    .language-selector {
        width: 100%;
        justify-content: center;
    }
    
    .language-select {
        flex: 1;
        max-width: 200px;
    }

    .country-filter-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .country-buttons {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-card i {
        font-size: 1.5rem;
    }

    .stat-content h3 {
        font-size: 1.3rem;
    }
    
    .stat-content p {
        font-size: 0.75rem;
    }

    .news-header {
        flex-direction: column;
    }

    .news-image-wrapper {
        width: 100%;
        height: 250px;
    }

    .news-title {
        font-size: 1.2rem;
    }

    .hero-card.featured {
        height: 350px;
    }

    .hero-card.side {
        height: 180px;
    }

    .hero-card-title {
        font-size: 1rem;
    }
    
    .hero-card.featured .hero-card-title {
        font-size: 1.4rem;
    }

    .secondary-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
    
    .country-insights {
        position: relative;
        top: 0;
    }
    
    .chart-container {
        width: 240px;
        height: 240px;
    }
}

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

    .country-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}
