/* ============================================================
   METAPHOR DEFINITION - CSS STYLING
   Modern, Professional, SEO-Optimized Design
   ============================================================ */

:root {
    --primary-color: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --secondary-color: #EC4899;
    --accent-color: #F59E0B;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --spacing-unit: 1rem;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

strong {
    color: var(--text-dark);
    font-weight: 700;
}

em {
    font-style: italic;
    color: var(--primary-dark);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ============================================================
   LINKS & BUTTONS
   ============================================================ */

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Hero-specific button styling */
.hero .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.hero .btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.nav-brand {
    flex: 1;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    margin-top: 0;
    padding-top: 0.5rem;
    z-index: 1001;
    overflow: visible;
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--bg-light);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

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

.hero .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */

.toc-section {
    background-color: var(--bg-light);
    padding: 3rem 0;
    margin: 2rem 0;
}

.toc {
    background-color: white;
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toc ol {
    margin-left: 1.5rem;
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    color: var(--primary-color);
    font-weight: 500;
}

.toc a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.content-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.8;
}

.highlight {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--accent-color);
}

/* ============================================================
   DEFINITION BOX
   ============================================================ */

.definition-box {
    background-color: #F0F9FF;
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-size: 1.05rem;
}

.definition-box h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.definition-box p {
    color: var(--text-dark);
    font-weight: 500;
}

/* ============================================================
   COMPONENTS GRID
   ============================================================ */

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

.component-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.component-item:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.component-item h4 {
    color: var(--primary-color);
    margin-top: 0;
}

.component-item p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.example {
    background-color: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
}

/* ============================================================
   METAPHOR TYPES CARDS
   ============================================================ */

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

.type-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}

.type-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.25rem;
}

.type-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* ============================================================
   EXAMPLES CONTAINER
   ============================================================ */

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

.example-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.example-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.1rem;
}

.example-item strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.5rem;
}

.example-item p {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    overflow: hidden;
}

.comparison-table thead {
    background-color: var(--primary-color);
    color: white;
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.comparison-table tbody tr:hover {
    background-color: var(--bg-light);
}

.comparison-note {
    background-color: #FEF3C7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.comparison-note p {
    color: var(--text-dark);
    margin-bottom: 0;
}

/* ============================================================
   LITERATURE GRID
   ============================================================ */

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

.literature-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.literature-item h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.literature-item p {
    color: var(--text-light);
}

/* ============================================================
   TOOLS SECTION
   ============================================================ */

.tools-section {
    background-color: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: 0.75rem;
}

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

.tool-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.tool-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.1rem;
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.tool-card .btn {
    display: inline-block;
}

.embedding-info {
    background-color: white;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.embedding-info h3 {
    color: var(--success-color);
    margin-top: 0;
}

.embedding-info p {
    color: var(--text-light);
}

/* ============================================================
   FAQ SECTION
   ============================================================ */

.faq-section {
    background-color: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: 0.75rem;
}

.faq-container {
    max-width: 800px;
    margin: 2rem auto;
}

.faq-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: visible;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-item summary {
    padding: 1.25rem;
    cursor: pointer;
    user-select: none;
    background-color: white;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: block;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    background-color: var(--bg-light);
    border-bottom-color: var(--primary-color);
}

.faq-item summary h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary h3::after {
    content: "▼";
    font-size: 0.8rem;
    margin-left: 1rem;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.faq-item[open] summary h3::after {
    transform: rotate(180deg);
}

.faq-item[open] summary {
    background-color: #EEF2FF;
    border-bottom-color: var(--primary-color);
}

.faq-item[open] summary h3 {
    color: var(--primary-color);
}

.faq-item p {
    padding: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.8;
    overflow: hidden;
}

/* ============================================================
   KEY TAKEAWAYS
   ============================================================ */

.key-takeaways {
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 3rem 0;
}

.takeaway-box ul {
    list-style: none;
    margin: 0;
}

.takeaway-box li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
}

.takeaway-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.25rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

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

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

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .metaphor-types,
    .examples-container,
    .tools-grid,
    .components,
    .literature-grid {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }

    .faq-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 1.5rem 0;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero .lead {
        font-size: 0.95rem;
    }

    .content-section {
        margin: 2rem 0;
        padding: 1rem 0;
    }

    .definition-box,
    .highlight {
        padding: 1rem;
    }

    .tool-card,
    .type-card,
    .component-item {
        padding: 1rem;
    }

    .faq-item summary {
        padding: 1rem;
    }

    .key-takeaways {
        padding: 1rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .navbar,
    .cta-buttons,
    .tools-section,
    .footer {
        display: none;
    }

    body {
        background-color: white;
    }

    .container {
        max-width: 100%;
    }

    h2 {
        page-break-after: avoid;
    }

    .content-section {
        page-break-inside: avoid;
    }
}
