@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50E3C2;
    --background-color: #F7F9FB;
    --text-color: #333;
    --card-bg-color: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
    --phrases-color: #7B68EE;
    --phrases-secondary: #9370DB;
}

body {
    font-family: var(--font-family);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background: var(--background-color);
    color: var(--text-color);
}

header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--card-bg-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.header-content h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-content p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--card-bg-color);
    color: var(--card-bg-color);
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--card-bg-color);
    color: var(--primary-color);
}

nav.cluster-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px var(--shadow-color);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

nav.cluster-menu.active {
    right: 0;
}

nav.cluster-menu ul {
    padding: 80px 20px 20px;
    list-style: none;
    margin: 0;
}

nav.cluster-menu ul li {
    display: block;
    margin: 0;
    border-bottom: 1px solid #eee;
}

nav.cluster-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 15px 10px;
    transition: all 0.3s ease;
}

nav.cluster-menu a:hover {
    background: var(--background-color);
    color: var(--primary-color);
    padding-left: 20px;
}

main {
    padding: 20px;
    max-width: 960px;
    margin: 40px auto;
}

section {
    background: var(--card-bg-color);
    margin-bottom: 40px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color);
    border: 1px solid #EAECEF;
}

h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 15px;
    margin-top: 0;
}

footer {
    text-align: center;
    padding: 30px;
    background: #333;
    color: var(--card-bg-color);
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    color: white;
    border: none;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

.hero-cta {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.topic-card {
    background: var(--background-color);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.topic-card h3 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.topic-card p {
    margin: 0;
    line-height: 1.6;
    color: #666;
}

/* Clusters Grid */
.clusters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.cluster-card {
    background: var(--card-bg-color);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cluster-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--shadow-color);
    transform: translateY(-3px);
}

.cluster-card h3 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.cluster-countries {
    font-size: 1.1rem;
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
}

.cluster-traits {
    font-size: 0.95rem;
    color: #777;
    margin: 15px 0;
    line-height: 1.5;
}

.cluster-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cluster-btn:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Phrases Section */
.phrases-section {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    color: var(--text-color);
    border-radius: 12px;
    margin-top: 40px;
    border: 2px solid #E0E0E0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.phrases-section::before {
    content: '🇸🇪 🇳🇴 🇩🇰 🇫🇮 🇮🇸 🇩🇪 🇦🇹 🇨🇭 🇵🇱 🇨🇿 🇪🇸 🇮🇹 🇵🇹 🇬🇷 🇫🇷 🇲🇹 🇨🇾 🇷🇸 🇭🇷 🇧🇦 🇲🇪 🇲🇰 🇦🇱 🇷🇴 🇧🇬 🇬🇪 🇸🇮 🇸🇰 🇪🇪 🇱🇻 🇱🇹 🇱🇺 🇧🇪 🇳🇱 🇬🇧 🇮🇪 🇺🇸 🇦🇺 🇳🇿';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 1.5rem;
    opacity: 0.15;
    line-height: 2;
    pointer-events: none;
    z-index: 0;
    word-spacing: 8px;
}

.phrases-section > * {
    position: relative;
    z-index: 1;
}

.phrases-section h2 {
    font-size: 2.2rem;
    margin: 0 0 20px 0;
    color: var(--primary-color);
}

.phrases-description {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--text-color);
}

.phrases-cta {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.phrases-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: var(--secondary-color);
}

/* Cluster Detail Page */
#cluster-detail {
    min-height: 100vh;
}

.back-btn {
    background: #f0f0f0;
    color: var(--text-color);
    border: 2px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cluster-topics {
    margin-top: 30px;
}

.topic-section {
    background: var(--background-color);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.topic-section h3 {
    color: var(--primary-color);
    margin: 0 0 20px 0;
    font-size: 1.5rem;
}

.topic-content {
    line-height: 1.8;
    color: #555;
}

.topic-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.topic-content li {
    margin-bottom: 10px;
}

.topic-content strong {
    color: var(--text-color);
}

/* Responsive Menu */
@media (max-width: 768px) {
    nav.cluster-menu {
        width: 80%;
        max-width: 300px;
        right: -100%;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .clusters-grid {
        grid-template-columns: 1fr;
    }

    .phrases-section h2 {
        font-size: 1.8rem;
    }

    .phrases-description {
        font-size: 1rem;
    }
}
