/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a4480;
    text-decoration: underline;
}

/* Header */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.logo-svg {
    width: 40px;
    height: 40px;
}

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

/* Navigation */
.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    color: #2c5aa0;
    text-decoration: none;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2c5aa0;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #4a5568;
    border-radius: 4px;
    margin: 0 0.5rem;
}

.dropdown-menu a:hover {
    background: #f7fafc;
    color: #2c5aa0;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #4a5568;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
}

.main-article {
    margin: 3rem 0;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro {
    font-size: 1.125rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #2c5aa0;
    border-radius: 0 8px 8px 0;
}

/* Highlight Box */
.highlight-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.highlight-box p,
.highlight-box li {
    color: #1976d2;
}

/* Tables */
.names-table,
.privacy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.names-table th,
.names-table td,
.privacy-table th,
.privacy-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.names-table th,
.privacy-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.names-table tr:hover,
.privacy-table tr:hover {
    background: #f8f9fa;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #2c5aa0;
    padding: 1rem 2rem;
    margin: 2rem 0;
    background: #f8f9fa;
    font-style: italic;
    position: relative;
}

blockquote p {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

blockquote cite {
    font-size: 0.9rem;
    color: #718096;
    font-style: normal;
}

/* Names Grid */
.names-section {
    margin: 4rem 0;
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.name-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.name-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.name-card h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.name-meaning {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.name-origin {
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Related Articles */
.related-articles {
    margin: 4rem 0;
    padding: 3rem 0;
    background: #f8f9fa;
    border-radius: 12px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.article-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #2c5aa0;
}

.article-card p {
    color: #718096;
    font-size: 0.95rem;
}

/* Sources */
.sources {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.sources h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.sources ol {
    padding-left: 1.5rem;
}

.sources li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Stats Grid (About Page) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.stat-card h3 {
    font-size: 3rem;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-card p {
    color: #718096;
    font-weight: 500;
}

/* Contact Page */
.contact-content {
    margin: 3rem 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-method {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.contact-method h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

.contact-method svg {
    opacity: 0.8;
}

.method-description {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    flex-shrink: 0;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2c5aa0;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #1a4480;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Form Messages */
.form-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* FAQ Section */
.faq-section {
    margin: 2rem 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.faq-item h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

/* Contact DPO */
.contact-dpo {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    margin: 2rem 0;
}

.contact-dpo h3 {
    color: #1565c0;
    margin-bottom: 1rem;
}

.contact-dpo p {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2c5aa0;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1a4480;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* GDPR Notice */
.gdpr-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gdpr-notice.show {
    transform: translateY(0);
}

.gdpr-notice p {
    margin: 0;
    color: white;
}

.gdpr-notice a {
    color: #81c784;
    text-decoration: underline;
}

.gdpr-notice button {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.gdpr-notice button:hover {
    background: #388e3c;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.footer-section p {
    color: #cbd5e0;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        display: none;
    }

    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav li {
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }

    .nav a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        margin-left: 1rem;
        border-radius: 4px;
        margin-top: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

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

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

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

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .gdpr-notice {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .names-table,
    .privacy-table {
        font-size: 0.9rem;
    }

    .names-table th,
    .names-table td,
    .privacy-table th,
    .privacy-table td {
        padding: 0.5rem;
    }
}

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

    .stat-card h3 {
        font-size: 2rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-svg {
        width: 32px;
        height: 32px;
    }
}

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .gdpr-notice,
    .footer {
        display: none;
    }

    .main {
        margin: 0;
    }

    .hero {
        background: none;
        color: #333;
        padding: 1rem 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    a {
        color: #333;
        text-decoration: underline;
    }

    .highlight-box {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .highlight-box {
        border: 2px solid #000;
    }

    .article-card,
    .name-card,
    .contact-method {
        border: 2px solid #000;
    }

    .back-to-top {
        border: 2px solid #fff;
    }
}

/* Focus Styles for Better Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2c5aa0;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1003;
}

.skip-link:focus {
    top: 6px;
}
