/* === BUTTON SYSTEM === */

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === PRIMARY: CROWN BUTTON === */
/* Premium treatment with outline + glow + corner accent */
.btn-crown,
.btn-primary {
    background: var(--color-white);
    color: var(--color-text-primary);
    border: 2px solid var(--color-text-primary);
    box-shadow:
        0 4px 12px rgba(31, 41, 55, 0.1),
        0 0 0 2px var(--color-gold-pale);
    padding: 0.875rem 2rem;
}

/* Corner accent element */
.btn-crown::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg,
                var(--color-gold) 0%,
                var(--color-gold-light) 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    transition: all 0.3s ease;
}

.btn-crown:hover,
.btn-crown:focus,
.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-text-primary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(31, 41, 55, 0.2),
        0 0 0 2px var(--color-gold-pale),
        0 0 20px rgba(255, 215, 0, 0.3);
}

.btn-crown:hover::before,
.btn-primary:hover::before {
    width: 32px;
    height: 32px;
}

.btn-crown:active,
.btn-primary:active {
    transform: translateY(-1px);
}

/* === SECONDARY: GLASS BUTTON === */
/* Glassmorphism effect */
.btn-glass,
.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 12px rgba(31, 41, 55, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.btn-glass::after,
.btn-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.4) 0%,
                transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glass:hover,
.btn-glass:focus,
.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.12);
}

.btn-glass:hover::after,
.btn-secondary:hover::after {
    opacity: 1;
}

/* === TERTIARY: TOOL BUTTON === */
/* Solid with magnetic hover (will be enhanced with JS) */
.btn-tool {
    background: var(--color-teal);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-tool::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
                var(--color-teal-light) 0%,
                var(--color-teal) 100%);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}

.btn-tool:hover,
.btn-tool:focus {
    background: var(--color-teal);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(20, 184, 166, 0.3),
        0 0 0 3px var(--color-teal-pale);
}

.btn-tool:hover::before {
    opacity: 1;
}

/* Magnetic effect class (enhanced by JavaScript) */
.btn-tool.magnetic {
    transition: transform 0.15s ease-out;
}

/* === SUBSCRIBE BUTTON === */
.btn-subscribe {
    background: linear-gradient(135deg,
                var(--color-gold) 0%,
                var(--color-gold-light) 100%);
    color: var(--color-text-primary);
    font-weight: 700;
    border: none;
}

.btn-subscribe:hover,
.btn-subscribe:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 16px 40px rgba(255, 215, 0, 0.6);
}

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

.btn-large {
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

/* === LOADING STATE === */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-spinner 0.6s linear infinite;
    color: var(--color-text-inverse, white);
}

@keyframes button-spinner {
    to { transform: rotate(360deg); }
}

/* === DARK MODE TOGGLE BUTTON === */
.dark-mode-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow:
        0 6px 16px rgba(102, 126, 234, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Toggle slider */
.dark-mode-toggle::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Sun icon (light mode) */
.dark-mode-toggle::after {
    content: '\f185';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #fbbf24;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

/* Dark mode active state */
body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow:
        0 4px 12px rgba(96, 165, 250, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Move slider to right in dark mode */
body.dark-mode .dark-mode-toggle::before {
    left: 31px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow:
        0 2px 8px rgba(96, 165, 250, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Moon icon (dark mode) */
body.dark-mode .dark-mode-toggle::after {
    content: '\f186';
    left: 8px;
    right: auto;
    color: #60a5fa;
}

/* Removed floating animation - it was too distracting */

/* === MOBILE-FIRST BUTTON STYLES === */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }

    .btn-crown,
    .btn-primary {
        padding: 1rem 1.75rem;
    }

    /* Prevent double-tap zoom on buttons */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-tool {
        touch-action: manipulation;
    }

    /* Simpler hover effects on mobile for performance */
    .btn-tool::before {
        display: none;
    }
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 71, 171, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1;
}

.card-title {
    margin: 0.5rem 0 1rem;
}

.card-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
    margin-top: 1rem;
}

/* Article Cards */
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.article-card:hover {
    border-left-color: var(--primary);
}

.article-card .article-image {
    position: relative;
    margin: 1rem 1rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-light-gray);
    isolation: isolate;
}

.article-card .article-image-link {
    display: block;
    height: 100%;
}

.article-card .article-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.4), transparent 50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-image::before {
    opacity: 1;
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 15px;
    transform: scale(1);
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.03);
}

.article-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.article-content h3 {
    margin: 0.5rem 0;
    font-size: 1.3rem;
}

.article-content h3 a {
    transition: color 0.3s ease;
    text-decoration: none;
    color: var(--dark);
}

.article-card:hover .article-content h3 a {
    color: var(--primary);
}

.article-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    flex: 1 0 auto;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    color: var(--gray);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Category Tags - Enhanced with more categories */
.category {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.category-singles {
    background: linear-gradient(135deg, #E8F4FD, #D4EDFF);
    color: #0077CC;
}

.category-couples {
    background: linear-gradient(135deg, #F0E6FF, #E4D4FF);
    color: #6B46C1;
}

.category-families {
    background: linear-gradient(135deg, #E6FFE9, #D4FFD9);
    color: #38A169;
}

.category-retirement {
    background: linear-gradient(135deg, #FFEED6, #FFE6CC);
    color: #DD6B20;
}

.category-tzedakah {
    background: linear-gradient(135deg, #FFE6E6, #FFD4D4);
    color: #E53E3E;
}

.category-investment {
    background: linear-gradient(135deg, #FFFBE6, #FFF6D4);
    color: #D69E2E;
}

.category-career {
    background: linear-gradient(135deg, #EDF2F7, #E2E8F0);
    color: #4A5568;
}

.category-business {
    background: linear-gradient(135deg, #EBF4FF, #D6E8FF);
    color: #3182CE;
}

/* Tool Cards */
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, rgba(0, 71, 171, 0.02) 0%, rgba(255, 255, 255, 1) 50%);
}

.tool-card:hover {
    background: linear-gradient(135deg, rgba(0, 71, 171, 0.04) 0%, rgba(255, 255, 255, 1) 50%);
}

.tool-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary-pale) 0%, var(--color-teal-pale) 100%);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 1.85rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.08);
}

.tool-card:hover .tool-icon {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 71, 171, 0.15);
    background: linear-gradient(135deg, var(--primary) 0%, var(--color-teal) 100%);
    color: var(--white);
}

.tool-card h3 {
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.tool-card:hover h3 {
    color: var(--primary);
}

.tool-card p {
    margin-bottom: 1.5rem;
    flex: 1 0 auto;
    line-height: 1.6;
}

.tool-card .btn {
    margin-top: auto;
}

/* Testimonial Cards - Enhanced for slider functionality */
.testimonial {
    background-color: transparent;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border: none;
}

.testimonial .quote {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 1.5rem;
    font-style: italic;
}

.testimonial .author {
    font-weight: 600;
    color: var(--white);
}

/* Form Elements - Enhanced */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
    color: var(--dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-success {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Enhanced Filter Buttons */
.filter-btn {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    color: var(--gray);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Article Filter Container */
.article-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Subscribe form specific styles - Enhanced */
.subscribe-form-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    align-items: center;
}

.subscribe-form:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.form-input-group {
    flex: 1;
    min-width: 0;
}

.subscribe-form input[type="email"] {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
    color: var(--dark);
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.2);
}

.subscribe-form input[type="email"]::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.subscribe-form input[type="email"].error {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

/* Loading spinner styles */
.button-loading-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5em;
}

/* Message styles */
.form-error-message, 
.form-success-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    display: none;
}

.form-error-message {
    color: #fff;
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.form-success-message {
    color: #fff;
    background: rgba(40, 167, 69, 0.9);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Resource Cards */
.resource-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 3px solid var(--primary);
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.06);
    border-top-color: var(--color-teal);
}

.resource-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.resource-card h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--primary);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease, background 0.3s ease;
}

.resource-card:hover h3::after {
    width: 60px;
    background: var(--color-teal);
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
    transition: transform 0.3s ease;
}

.resource-list li::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.resource-list li:hover {
    transform: translateX(5px);
}

.resource-list li:hover::before {
    color: var(--secondary);
    transform: translateY(-50%) translateX(3px);
}

.resource-list a {
    color: var(--dark);
    transition: color 0.3s ease;
    text-decoration: none;
}

.resource-list a:hover {
    color: var(--primary);
}

/* Responsive Components */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .article-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .article-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .card {
        margin-bottom: 1rem;
    }

    .tool-card,
    .article-card,
    .resource-card {
        padding: 1.25rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .testimonial {
        padding: 1.5rem;
    }
    
    .testimonial .quote {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .testimonial .quote::before,
    .testimonial .quote::after {
        font-size: 2rem;
    }
    
    .subscribe-form {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
    }
    
    .subscribe-form input[type="email"] {
        border-radius: var(--radius-md);
    }
    
    .btn-subscribe {
        width: 100%;
        border-radius: var(--radius-md);
    }
}

/* --- START: NEW DESKTOP DROPDOWN STYLES --- */
/* (Moved from index.html) */

/* The main container for the dropdown item */
.nav-links .dropdown {
    position: relative;
    display: inline-block;
    /* Add padding to the bottom to create a hoverable area that bridges the gap */
    padding-bottom: 15px;
    /* Add a negative margin to counteract the padding and keep the nav items aligned */
    margin-bottom: -15px;
}

/* The dropdown box itself */
.nav-links .dropdown .dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    /* Start the dropdown slightly lower for the animation */
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    /* Position the dropdown below the parent */
    top: 100%;
    left: 50%;
    /* Center the dropdown perfectly under the parent link */
    transform: translateX(-50%) translateY(10px);
}

/* On hover, make the dropdown visible and animate it into place */
.nav-links .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-links .dropdown .dropdown-content a {
    color: #333; /* Text color for dropdown items */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 500;
}

.nav-links .dropdown .dropdown-content a:hover {
    background-color: #f0f0f0; /* Hover background color */
    color: #0047AB; /* Hover text color */
}

/* Ensure the main dropdown link is clickable */
.nav-links .dropdown > a {
    cursor: pointer;
}
/* --- END: NEW DESKTOP DROPDOWN STYLES --- */

/* === DARK MODE COMPONENT STYLES === */

/* Article Cards */
body.dark-mode .article-card {
    background-color: var(--dark-bg-secondary);
    border: 1px solid rgba(96, 165, 250, 0.1);
}

body.dark-mode .article-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode .article-card h3 a {
    color: var(--dark-text-primary);
}

body.dark-mode .article-card h3 a:hover {
    color: var(--dark-primary);
}

body.dark-mode .article-card p {
    color: var(--dark-text-secondary);
}

body.dark-mode .article-meta {
    color: var(--dark-text-tertiary);
}

/* Tool Cards */
body.dark-mode .tool-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(21, 27, 46, 0.98) 55%);
    border: 1px solid rgba(96, 165, 250, 0.14);
}

body.dark-mode .tool-card:hover {
    background: linear-gradient(135deg, rgba(91, 159, 255, 0.12) 0%, rgba(21, 27, 46, 1) 60%);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode .tool-card h3 {
    color: var(--dark-text-primary);
}

body.dark-mode .tool-card p {
    color: var(--dark-text-secondary);
}

body.dark-mode .tool-icon {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(20, 184, 166, 0.2));
}

/* Category badges */
body.dark-mode .category-badge,
body.dark-mode .node-category {
    opacity: 0.9;
}

/* Buttons in dark mode - Modern & Vibrant */
body.dark-mode .btn-primary,
body.dark-mode .btn-crown {
    background: linear-gradient(135deg, var(--dark-bg-elevated) 0%, var(--dark-bg-secondary) 100%);
    color: var(--dark-text-primary);
    border-color: rgba(91, 159, 255, 0.3);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(91, 159, 255, 0.15);
}

body.dark-mode .btn-primary::before,
body.dark-mode .btn-crown::before {
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--dark-primary-light) 100%);
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-crown:hover {
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--dark-primary-light) 100%);
    color: #ffffff;
    border-color: var(--dark-primary);
    box-shadow:
        0 8px 24px rgba(91, 159, 255, 0.4),
        0 0 0 2px rgba(91, 159, 255, 0.3),
        0 0 32px rgba(91, 159, 255, 0.25);
}

body.dark-mode .btn-glass,
body.dark-mode .btn-secondary {
    background: rgba(21, 27, 46, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(91, 159, 255, 0.2);
    color: var(--dark-text-primary);
}

body.dark-mode .btn-glass:hover,
body.dark-mode .btn-secondary:hover {
    background: rgba(21, 27, 46, 0.9);
    border-color: rgba(91, 159, 255, 0.4);
}

body.dark-mode .btn-tool {
    background: linear-gradient(135deg, var(--color-teal), #16a085);
    border-color: var(--color-teal);
}

body.dark-mode .btn-tool:hover {
    box-shadow:
        0 8px 24px rgba(20, 184, 166, 0.5),
        0 0 0 3px rgba(20, 184, 166, 0.25);
}

/* Navigation Cards - "Continue Your Journey" section */
.nav-card .nav-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Dark mode specific styles for navigation cards */
body.dark-mode .nav-card .nav-card-header {
    color: var(--dark-primary);  /* Lighter blue for arrows and labels */
}

body.dark-mode .nav-card .article-content h3 {
    color: #ffffff;  /* White for article titles */
}

body.dark-mode .nav-card:hover .article-content h3 {
    color: #ffffff;  /* Keep white even on hover */
}

body.dark-mode .nav-card .nav-card-header i {
    color: var(--dark-primary);  /* Lighter blue for arrow icons */
}

/* ========================================
   DARK MODE - FORM ELEMENTS
   ======================================== */

/* Form Labels */
body.dark-mode .form-label {
    color: var(--dark-text-primary);
}

/* Form Inputs, Selects, and Textareas */
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background-color: var(--dark-bg-elevated);
    color: var(--dark-text-primary);
    border: 1px solid rgba(91, 159, 255, 0.2);
}

/* Placeholder Text */
body.dark-mode .form-input::placeholder,
body.dark-mode .form-textarea::placeholder {
    color: var(--dark-text-secondary);
    opacity: 0.6;
}

/* Focus States */
body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus {
    border-color: var(--dark-primary);
    box-shadow: 0 0 0 3px rgba(91, 159, 255, 0.25);
    background-color: rgba(21, 27, 46, 0.9);
}

/* Error States */
body.dark-mode .form-input.error,
body.dark-mode .form-select.error,
body.dark-mode .form-textarea.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.25);
}

/* Form Error Text */
body.dark-mode .form-error {
    color: #ff6b6b;
}

/* Form Success Text */
body.dark-mode .form-success {
    color: #51cf66;
}

/* Radio Button Group */
body.dark-mode .inquiry-type-group {
    background-color: rgba(21, 27, 46, 0.5);
    border: 1px solid rgba(91, 159, 255, 0.2);
}

/* Radio Button Labels */
body.dark-mode .inquiry-option input[type="radio"]:checked + label {
    background-color: rgba(91, 159, 255, 0.2);
    border-color: var(--dark-primary);
    color: var(--dark-text-primary);
}

body.dark-mode .inquiry-option label {
    color: var(--dark-text-secondary);
    border: 1px solid rgba(91, 159, 255, 0.15);
}

body.dark-mode .inquiry-option label:hover {
    background-color: rgba(91, 159, 255, 0.1);
    border-color: rgba(91, 159, 255, 0.3);
    color: var(--dark-text-primary);
}

/* Filter Buttons */
body.dark-mode .filter-btn {
    background-color: var(--dark-bg-elevated);
    border: 1px solid rgba(91, 159, 255, 0.2);
    color: var(--dark-text-secondary);
}

body.dark-mode .filter-btn:hover {
    background-color: rgba(91, 159, 255, 0.15);
    border-color: var(--dark-primary);
    color: var(--dark-primary);
}

body.dark-mode .filter-btn.active {
    background-color: var(--dark-primary);
    border-color: var(--dark-primary);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(91, 159, 255, 0.4);
}

/* Subscribe Form */
body.dark-mode .subscribe-form {
    background-color: rgba(21, 27, 46, 0.5);
    border: 1px solid rgba(91, 159, 255, 0.2);
}

body.dark-mode .subscribe-input {
    background-color: var(--dark-bg-elevated);
    color: var(--dark-text-primary);
    border-color: rgba(91, 159, 255, 0.2);
}

body.dark-mode .subscribe-input::placeholder {
    color: var(--dark-text-secondary);
    opacity: 0.6;
}

body.dark-mode .subscribe-input:focus {
    border-color: var(--dark-primary);
    box-shadow: 0 0 0 3px rgba(91, 159, 255, 0.25);
}

/* === TOOL CALLOUTS === */
/* Contextual call-to-action blocks for promoting tools within articles */

.tool-callout {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 16px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tool-callout:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.tool-callout:hover::before {
    opacity: 1;
}

/* Icon */
.tool-callout-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 28px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tool-callout:hover .tool-callout-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Content */
.tool-callout-content {
    min-width: 0;
}

.tool-callout-headline {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    color: var(--color-text-primary);
}

.tool-callout-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
    color: var(--color-text-secondary);
}

/* Button */
.tool-callout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-callout-btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.tool-callout-btn:hover i {
    transform: translateX(4px);
}

/* Style Variants */

/* Primary (Blue/Action) */
.tool-callout-primary {
    border-color: rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(239, 246, 255, 0.85));
}

.tool-callout-primary .tool-callout-icon {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.tool-callout-primary .tool-callout-btn {
    background: #2563eb;
    color: white;
}

.tool-callout-primary .tool-callout-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Success (Green/Achievement) */
.tool-callout-success {
    border-color: rgba(34, 197, 94, 0.2);
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(240, 253, 244, 0.85));
}

.tool-callout-success .tool-callout-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.tool-callout-success .tool-callout-btn {
    background: #22c55e;
    color: white;
}

.tool-callout-success .tool-callout-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Info (Purple/Education) */
.tool-callout-info {
    border-color: rgba(168, 85, 247, 0.2);
    background: linear-gradient(135deg, rgba(243, 232, 255, 0.95), rgba(250, 245, 255, 0.85));
}

.tool-callout-info .tool-callout-icon {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
}

.tool-callout-info .tool-callout-btn {
    background: #a855f7;
    color: white;
}

.tool-callout-info .tool-callout-btn:hover {
    background: #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .tool-callout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem;
        text-align: center;
    }

    .tool-callout-icon {
        margin: 0 auto;
    }

    .tool-callout-btn {
        width: 100%;
        justify-content: center;
    }

    .tool-callout-headline {
        font-size: 1.25rem;
    }

    .tool-callout-description {
        font-size: 0.875rem;
    }
}

/* Dark mode support */
body.dark-mode .tool-callout {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.85));
    border-color: rgba(75, 85, 99, 0.3);
}

body.dark-mode .tool-callout-headline {
    color: var(--dark-text-primary);
}

body.dark-mode .tool-callout-description {
    color: var(--dark-text-secondary);
}
