/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --nav-height: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: opacity 0.3s ease;
    justify-self: start;
    grid-column: 1;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    justify-self: center;
    grid-column: 2;
    z-index: 1001;
}

.nav-menu > li {
    position: relative;
    z-index: 1001;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu > li > a:hover {
    color: var(--highlight-color);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    list-style: none;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-radius: 4px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    z-index: 1002;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    display: block;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--highlight-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 8rem 2rem 6rem;
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Sections */
.news-section,
.about-section,
.contact-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-align: center;
}

.content-section {
    max-width: 900px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: var(--highlight-color);
}

.news-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.news-title {
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0;
}

.news-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--highlight-color);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.contact-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-item p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    margin-top: auto;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--highlight-color);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Products Section */
.products-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 1rem;
    margin: 3rem 0 2rem;
    border-bottom: 2px solid var(--border-color);
    justify-content: center;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.tab-button.active {
    color: var(--highlight-color);
    border-bottom-color: var(--highlight-color);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
}

.products-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 4rem;
}

.theme-section {
    margin-bottom: 4rem;
}

.theme-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--highlight-color);
    display: inline-block;
}

/* Products Grid - 2 Columns */
.products-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.product-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: var(--highlight-color);
}

.product-card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-title {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0;
}

.product-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--highlight-color);
}

.product-goal {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-light);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.error-message {
    text-align: center;
    font-size: 1.2rem;
    color: var(--highlight-color);
    margin: 2rem 0;
}

.error-details {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-family: monospace;
}

/* Bubble Chart */
.chart-wrapper {
    padding: 2rem 0;
}

.chart-info {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-style: italic;
}

.bubble-chart-container,
.network-graph-container {
    width: 100%;
    min-height: 700px;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.bubble-chart-container svg,
.network-graph-container svg {
    width: 100%;
    height: 100%;
}

.bubble {
    cursor: pointer;
    transition: all 0.3s ease;
}

.bubble:hover {
    opacity: 0.8;
    stroke: var(--primary-color);
    stroke-width: 3px;
}

.bubble-label {
    font-size: 12px;
    font-weight: 600;
    fill: white;
    text-anchor: middle;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.bubble-tooltip {
    position: absolute;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bubble-tooltip.visible {
    opacity: 1;
}

.tooltip-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tooltip-content {
    font-size: 0.85rem;
    line-height: 1.4;
}

.tooltip-tech {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tooltip-tech-tag {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        grid-template-columns: auto 1fr;
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .theme-title {
        font-size: 1.5rem;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .bubble-chart-container {
        min-height: 400px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 4rem 1rem 3rem;
    }
    
    .news-section,
    .about-section,
    .contact-section {
        padding: 3rem 1rem;
    }
}
