/* ==================================================================
   RESET & BASE STYLES
   ================================================================== */
:root {
    --primary-color: #00c853;
    --primary-dark: #009624;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==================================================================
   LAYOUT
   ================================================================== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ==================================================================
   HEADER / HERO
   ================================================================== */
.main-header {
    padding: 40px 0 60px;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    background-color: var(--text-dark);
    color: white;
    transform: translateX(-4px);
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* Brand Logo */
.brand-logo-container {
    margin-bottom: 20px;
}

.brand-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 20px 20px 20px 60px;
    font-size: 1.1rem;
    border: 2px solid transparent;
    border-radius: 50px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(0, 200, 83, 0.15);
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1.2rem;
}

/* ==================================================================
   REGION NAVIGATION
   ================================================================== */
.region-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.region-btn {
    padding: 12px 24px;
    background: white;
    border: 1px solid #eee;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.region-btn:hover {
    background: #f0f0f0;
    color: var(--text-dark);
}

.region-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

/* ==================================================================
   GRID & CARDS
   ================================================================== */
.newspapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.country-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease-out backwards;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.country-header {
    padding: 20px;
    background: linear-gradient(to right, #ffffff, #f8f9fa);
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.country-flag {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.country-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.papers-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.paper-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s;
}

.paper-item:hover {
    background-color: #f0fdf4;
    color: var(--primary-dark);
    padding-left: 20px;
}

.paper-item i {
    font-size: 0.8rem;
    opacity: 0.3;
}

.paper-item:hover i {
    opacity: 1;
}

/* ==================================================================
   UTILITIES & ANIMATIONS
   ================================================================== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-footer {
    margin-top: 60px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .region-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        -webkit-overflow-scrolling: touch;
    }

    .region-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

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

    .app-container {
        padding-bottom: 40px;
    }
}