/* Navbar Styles */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

/* Logo */
.navbar-brand {
    flex-shrink: 0;
}

.navbar-logo-link {
    display: block;
    text-decoration: none;
}

.navbar-logo {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

/* Mobile toggle button */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar-toggle-line {
    width: 1.25rem;
    height: 2px;
    background-color: #374151;
    transition: all 0.3s ease;
    margin: 1px 0;
}

/* Navigation */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 3rem;
}

.navbar-nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav-item {
    position: relative;
}

.navbar-nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.navbar-dropdown {
    position: relative;
}

.navbar-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.navbar-dropdown-icon {
    transition: transform 0.2s ease;
}

.navbar-dropdown-toggle[aria-expanded="true"] .navbar-dropdown-icon {
    transform: rotate(180deg);
}

.navbar-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-0.5rem);
    transition: all 0.2s ease;
    z-index: 50;
    width: var(--container-max);
    margin-top: 0.5rem;
}

.navbar-dropdown-menu-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(2%);
}

.navbar-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 300px;
    gap: 2rem;
    padding: 2rem;
}

.navbar-dropdown-section {
    min-width: 0;
}

.navbar-dropdown-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.navbar-dropdown-section-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.navbar-dropdown-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.navbar-dropdown-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.navbar-dropdown-link-item {
    margin: 0;
}

.navbar-dropdown-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.navbar-dropdown-link:hover {
    background-color: #f9fafb;
}

.navbar-dropdown-link-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.navbar-dropdown-link-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.navbar-dropdown-link-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.navbar-dropdown-link-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Featured Article */
.navbar-dropdown-article {
    border-left: 1px solid #e5e7eb;
    padding-left: 2rem;
}

.navbar-dropdown-article-card {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.navbar-dropdown-article-image {
    width: 100%;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.navbar-dropdown-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-dropdown-article-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.navbar-dropdown-article-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.navbar-dropdown-article-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #059669;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-dropdown-article-button:hover {
    color: #047857;
}

.navbar-dropdown-article-button svg {
    width: 1rem;
    height: 1rem;
}

/* Action Buttons */
.navbar-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.navbar-button-secondary {
    color: #374151;
    background: transparent;
    border: 1px solid #d1d5db;
}

.navbar-button-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.navbar-button-primary {
    color: white;
    background: #dc2626;
}

.navbar-button-primary:hover {
    background: #b91c1c;
}

/* Mobile Navigation */
.navbar-mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 64px);
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.navbar-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.navbar-mobile-nav-item {
    margin: 0;
}

.navbar-mobile-nav-link {
    display: block;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.navbar-mobile-nav-link:hover {
    background: #f9fafb;
}

.navbar-mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-mobile-dropdown-icon {
    transition: transform 0.2s ease;
}

.navbar-mobile-dropdown-toggle[aria-expanded="true"] .navbar-mobile-dropdown-icon {
    transform: rotate(180deg);
}

.navbar-mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.navbar-mobile-dropdown-content-active {
    max-height: none;
    overflow: visible;
}

.navbar-mobile-dropdown-section {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-mobile-dropdown-section:last-child {
    border-bottom: none;
}

.navbar-mobile-dropdown-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.navbar-mobile-dropdown-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.navbar-mobile-dropdown-link {
    display: block;
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.navbar-mobile-dropdown-link:hover {
    background: white;
    color: #374151;
}

/* Mobile dropdown article styles */
.navbar-mobile-dropdown-article {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.navbar-mobile-dropdown-article-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.75rem;
    border: 1px solid #e5e7eb;
}

.navbar-mobile-dropdown-article-image {
    width: 100%;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.navbar-mobile-dropdown-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-mobile-dropdown-article-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.navbar-mobile-dropdown-article-description {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.navbar-mobile-dropdown-article-button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #059669;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-mobile-dropdown-article-button:hover {
    color: #047857;
}

.navbar-mobile-dropdown-article-button svg {
    width: 0.875rem;
    height: 0.875rem;
}

.navbar-mobile-buttons {
    padding: 1rem 0 0 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.navbar-mobile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.navbar-mobile-button-secondary {
    color: #374151;
    background: #f9fafb;
    border: 1px solid #d1d5db;
}

.navbar-mobile-button-secondary:hover {
    background: #f3f4f6;
}

.navbar-mobile-button-primary {
    color: white;
    background: #dc2626;
}

.navbar-mobile-button-primary:hover {
    background: #b91c1c;
}

/* Mobile Styles */
@media (max-width: 1024px) {
    .navbar-dropdown-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .navbar-dropdown-article {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-left: 0;
        padding-top: 1.5rem;
        margin-top: 1rem;
    }

    .navbar-dropdown-menu {
        min-width: 600px;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-mobile-active .navbar-mobile-nav {
        display: block;
    }

    .navbar-mobile-active .navbar-toggle-line:nth-child(1) {
        transform: rotate(45deg) translate(3px, 3px);
    }

    .navbar-mobile-active .navbar-toggle-line:nth-child(2) {
        opacity: 0;
    }

    .navbar-mobile-active .navbar-toggle-line:nth-child(3) {
        transform: rotate(-45deg) translate(3px, -3px);
    }

    .navbar-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: auto;
        margin-top: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .navbar-dropdown-grid {
        display: block;
        padding: 0;
    }

    .navbar-dropdown-section {
        margin-bottom: 1.5rem;
    }

    .navbar-dropdown-article {
        border: none;
        padding: 0;
        margin-top: 0;
    }
}

/* Focus styles for accessibility - only on keyboard focus */
.navbar-nav-link:focus-visible,
.navbar-button:focus-visible,
.navbar-mobile-nav-link:focus-visible,
.navbar-mobile-button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

.navbar-dropdown-link:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    background-color: #f9fafb;
}

/* Remove default focus outline */
.navbar-nav-link:focus,
.navbar-button:focus,
.navbar-mobile-nav-link:focus,
.navbar-mobile-button:focus,
.navbar-dropdown-link:focus,
.navbar-dropdown-toggle:focus {
    outline: none;
}