/* ==========================================================================
   Home Auth Page Styles - Modern, Elegant, Responsive
   ========================================================================== */

/* Finance Tip Banner Styles */
.finance-tip-banner {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9ff 50%, #fff7ed 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--border-radius-lg, 1rem);
    padding: 0;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
    position: relative;
    overflow: hidden;
}

.finance-tip-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e 0%, #3b82f6 50%, #f59e0b 100%);
}

.finance-tip-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
}

.finance-tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.finance-tip-text {
    flex: 1;
}

.finance-tip-title {
    color: var(--text-primary, #1e293b);
    font-weight: var(--fw-semibold, 600);
    font-size: 1rem;
    margin: 0;
}

.finance-tip-description {
    color: var(--text-secondary, #475569);
    font-size: 0.925rem;
    line-height: 1.5;
    margin: 0;
}

.finance-tip-link {
    color: #059669;
    font-weight: var(--fw-medium, 600);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.finance-tip-link:hover {
    color: #047857;
    border-bottom-color: #047857;
    text-decoration: none;
}

.finance-tip-close {
    background: none;
    border: none;
    color: var(--text-muted, #6c757d);
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.finance-tip-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Dark theme adjustments for finance tip */
[data-theme="dark"] .finance-tip-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1c1917 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .finance-tip-title {
    color: #f1f5f9;
}

[data-theme="dark"] .finance-tip-description {
    color: #cbd5e1;
}

[data-theme="dark"] .finance-tip-link {
    color: #10b981;
}

[data-theme="dark"] .finance-tip-link:hover {
    color: #059669;
}

[data-theme="dark"] .finance-tip-close {
    color: #94a3b8;
}

[data-theme="dark"] .finance-tip-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Responsive adjustments for finance tip */
@media (max-width: 768px) {
    .finance-tip-content {
        padding: 1rem;
        gap: 0.75rem;
    }

    .finance-tip-icon {
        font-size: 1.5rem;
    }

    .finance-tip-title {
        font-size: 0.925rem;
    }

    .finance-tip-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .finance-tip-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .finance-tip-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* News Feed General Styles */
.news-feed {
    --news-item-bg: var(--card-bg, #ffffff);
    --news-item-border: var(--card-border, #e2e8f0);
    --news-item-shadow: var(--card-shadow, 0 4px 6px rgba(0, 0, 0, 0.05));
    --news-item-shadow-hover: var(--card-shadow-hover, 0 8px 16px rgba(0, 0, 0, 0.1));
    --news-title-color: var(--text-primary, #1e293b);
    --news-link-color: var(--primary-color, #007bff);
    --news-link-hover-color: var(--primary-dark, #0056b3);
    --news-meta-color: var(--text-muted, #6c757d);

    font-family: var(--font-primary, 'Inter', sans-serif);
}

/* News Search Form Elegant Styles */
.news-search-form {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-xl, 1rem); /* Larger radius for a softer look */
    box-shadow: var(--shadow-strong, 0 8px 16px rgba(0,0,0,0.08));
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.news-search-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, transparent, rgba(0, 127, 129, 0.05), transparent);
    transform: skewX(45deg);
    transition: left 0.8s ease-in-out;
}

.news-search-form:hover::before {
    left: 150%;
}


[data-theme="dark"] .news-search-form {
    background: var(--dark-card-bg, #1a1a1e);
    border-color: var(--dark-border-color, #333);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .news-search-form::before {
     background: linear-gradient(-45deg, transparent, rgba(255, 255, 255, 0.025), transparent);
}

.news-search-form .form-label {
    color: var(--text-secondary);
    font-weight: 500;
}

[data-theme="dark"] .news-search-form .form-label {
    color: var(--dark-text-secondary);
}

.news-search-form .input-group-text {
    background-color: transparent;
    border: none;
}

.news-search-form .form-control,
[data-theme="dark"] .news-search-form .form-control {
    background-color: var(--body-bg-light, #f8f9fa);
    border: 1px solid var(--border-color-light, #dee2e6);
    color: var(--text-primary);
    border-radius: var(--radius-md);
}

[data-theme="dark"] .news-search-form .form-control {
    background-color: var(--dark-input-bg, #2a2a2e);
    border-color: var(--dark-border-color, #444);
    color: var(--dark-text-primary);
}

.news-search-form .form-control:focus {
    background-color: var(--body-bg, #fff);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 127, 129, 0.15);
}

[data-theme="dark"] .news-search-form .form-control:focus {
    background-color: var(--dark-card-bg);
}

/* Premium Preview Snippet in Digest */
.premium-preview-snippet {
    background-color: var(--body-bg-light, #f8f9fa);
    border: 1px solid var(--border-color-light, #dee2e6);
}

[data-theme="dark"] .premium-preview-snippet {
    background-color: var(--dark-input-bg, #2a2a2e);
    border-color: var(--dark-border-color, #444);
}

[data-theme="dark"] .premium-preview-snippet p {
    color: var(--dark-text-muted, #adb5bd) !important;
}

/* Switches for filters */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
    background-color: #6c757d;
    border-color: #6c757d;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color, #007f81);
    border-color: var(--primary-color, #007f81);
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 127, 129, 0.25);
}

/* Category Checkboxes */
#category-list .form-check {
    background: rgba(0, 127, 129, 0.03);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s;
}

#category-list .form-check:hover {
    background: rgba(0, 127, 129, 0.07);
}

[data-theme="dark"] #category-list .form-check {
     background: rgba(0, 127, 129, 0.1);
}

[data-theme="dark"] #category-list .form-check:hover {
    background: rgba(0, 127, 129, 0.2);
}

#category-list .form-check-input {
    margin-top: 0.25em;
    accent-color: var(--primary-color);
}

#category-list .form-check-label {
    cursor: pointer;
    color: var(--text-primary, #212529);
}

[data-theme="dark"] #category-list .form-check-label {
    color: var(--dark-text-primary, #e9ecef);
}

.news-search-form .form-control,
.news-search-form .form-select {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius-md, 0.5rem);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-search-form .form-control:focus,
.news-search-form .form-select:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.news-search-form .btn {
    border-radius: var(--border-radius-md, 0.5rem);
    font-weight: var(--fw-medium, 600);
    transition: all 0.2s ease;
}

.news-search-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* News Category & Source Badges */
.news-category-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.news-category-badges .badge {
    font-size: 0.75rem;
    font-weight: var(--fw-medium, 600);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm, 0.375rem);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.news-category-badges .badge.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: #ffffff;
}

.news-category-badges .badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
    color: #ffffff;
}

/* Dark theme adjustments for badges */
[data-theme="dark"] .news-category-badges .badge.bg-primary {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%) !important;
}

[data-theme="dark"] .news-category-badges .badge.bg-secondary {
    background: linear-gradient(135deg, #78909c 0%, #546e7a 100%) !important;
}

.news-item-vertical {
    background: var(--news-item-bg);
    border: 1px solid var(--news-item-border);
    border-radius: var(--border-radius-lg, 1rem);
    padding: 1.5rem;
    box-shadow: var(--news-item-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: var(--backdrop-blur, blur(0));
    -webkit-backdrop-filter: var(--backdrop-blur, blur(0));
}

.news-item-vertical:hover {
    transform: translateY(-4px);
    box-shadow: var(--news-item-shadow-hover);
    border-color: var(--primary-color, #4db6ac);
}

.news-title-vertical a.news-link {
    color: var(--news-title-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-title-vertical a.news-link:hover {
    color: var(--news-link-hover-color);
}

.news-date-vertical {
    color: var(--news-meta-color);
    font-size: 0.875rem;
}

.news-content-vertical p {
    color: var(--text-secondary, #475569);
    line-height: 1.6;
}

.read-more-btn {
    color: var(--news-link-color);
    font-weight: var(--fw-medium, 600);
}

.read-more-btn:hover {
    color: var(--news-link-hover-color);
}

.features-carousel,
.features-carousel .carousel-inner,
.features-carousel .carousel-item {
    height: 100%;
}

.features-carousel .carousel-item .content-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, transparent);
    box-shadow: var(--card-shadow, 0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: var(--border-radius-lg, 1rem);
    backdrop-filter: var(--backdrop-blur, blur(0));
    -webkit-backdrop-filter: var(--backdrop-blur, blur(0));
    height: 100%;
    width: 100%;
}

.features-carousel .carousel-item .content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover, 0 10px 20px rgba(0, 0, 0, 0.15));
    border-color: var(--primary-color, #4db6ac);
}

.features-carousel .carousel-control-prev-icon,
.features-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    background-size: 50% 50%;
}

[data-theme="dark"] .features-carousel .carousel-control-prev-icon,
[data-theme="dark"] .features-carousel .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.2);
    filter: invert(1);
}

.features-carousel .carousel-item .content-card .col-md-4 {
    background-color: rgba(var(--primary-rgb), 0.05);
}

/* Адаптивность */
@media (max-width: 992px) {
    .news-item-vertical {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .news-title-vertical {
        font-size: 1.1rem;
    }

    .features-carousel .carousel-item .content-card {
        flex-direction: column;
    }

    .features-carousel .carousel-item .content-card .col-md-4 {
        justify-content: start !important;
        padding-top: 1.5rem !important;
    }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .features-carousel .carousel-item .content-card .card-body {
        padding: 1.5rem;
        text-align: center;
    }

    .features-carousel .carousel-item .content-card .card-title {
        font-size: 1.25rem;
    }

    .features-carousel .carousel-item .content-card .card-text {
        min-height: 72px;
        margin-bottom: 1.5rem;
    }

    .features-carousel .carousel-item .content-card .img-fluid {
        display: block;
        margin: 0 auto 1rem auto;
    }

    .features-carousel .carousel-item .content-card .mt-auto {
        text-align: center !important;
    }
}

/* ==========================================================================
   Horizontal & Compact Currency Rates Block
   ========================================================================== */

.currency-rates-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg, 1rem);
    padding: 1rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.currency-block-title {
    font-size: 0.875rem;
    font-weight: var(--fw-semibold, 600);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.currency-rates-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.currency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.currency-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rate-currency-icon-wrapper {
    flex-shrink: 0;
}

.rate-currency-icon {
    width: 24px;
    height: 24px;
}

.currency-code {
    font-weight: var(--fw-bold, 700);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.currency-item-body {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.rate-column {
    text-align: center;
}

.rate-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.rate-value {
    font-size: 1rem;
    font-weight: var(--fw-medium, 500);
    white-space: nowrap;
}

.rate-change-icon {
    font-size: 0.9em;
    margin-left: 0.25rem;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.currency-separator {
    width: 1px;
    background-color: var(--border-color-light);
    align-self: stretch;
    margin: 0 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .currency-rates-grid {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .currency-separator {
        display: none;
    }

    .currency-item {
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color-light);
    }

    .currency-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .currency-item-body {
        gap: 1.5rem;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .currency-item-body {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }

    .rate-column {
        text-align: right;
        width: 100%;
    }

    .rate-date {
        display: none;
        /* Hide dates on very small screens to avoid clutter */
    }
}

/* ==========================================================================
   Premium Content Preview Styles - Elegant Subscription Motivation
   ========================================================================== */
/* Минималистичный Banner для premium */
.premium-banner {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.75rem;
}

.premium-banner ul {
    padding-left: 1rem;
    margin-bottom: 0;
}

.premium-banner li {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.premium-icon {
    font-size: 2rem;
}

.premium-excerpt {
    line-height: 1.5;
    max-height: 4.5em; /* приблизительно 3 строки */
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .premium-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .premium-banner a.btn {
        width: 100%;
    }
}

.premium-content-preview {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f8f9fa;
    min-height: 300px;
}

.premium-blur-content {
    filter: blur(2px);
    opacity: 0.6;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(1px);
}

.premium-overlay {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.95) 0%,
        rgba(147, 51, 234, 0.95) 50%,
        rgba(79, 70, 229, 0.95) 100%
    );
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    border-radius: 0.75rem;
}

.premium-unlock-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 320px;
    margin: 0 auto;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-lock-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.premium-title {
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.premium-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.premium-features {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 0;
    margin: 0.75rem 0;
}

.premium-feature-item {
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.premium-feature-item:nth-child(1) { --delay: 1; }
.premium-feature-item:nth-child(2) { --delay: 2; }
.premium-feature-item:nth-child(3) { --delay: 3; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.btn-premium {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border: none;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-premium:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
    color: white;
}

.btn-premium:hover::before {
    left: 100%;
}

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

.premium-price {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-price strong {
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.line-height-relaxed {
    line-height: 1.8;
}

.premium-check {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.premium-crown-emoji {
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.5));
    animation: float 3s ease-in-out infinite;
}

/* Dark theme support */
[data-theme="dark"] .premium-content-preview {
    background: #1f2937;
}

[data-theme="dark"] .premium-blur-content {
    background: rgba(31, 41, 55, 0.9);
    color: #e5e7eb;
}

[data-theme="dark"] .premium-overlay {
    background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.95) 0%,
        rgba(139, 92, 246, 0.95) 50%,
        rgba(59, 130, 246, 0.95) 100%
    );
}

/* Hover effect on the entire preview */
.premium-content-preview:hover .premium-blur-content {
    filter: blur(3px);
    opacity: 0.4;
}

.premium-content-preview:hover .premium-unlock-card {
    transform: scale(1.02);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .premium-content-preview {
        min-height: 250px;
    }
    
    .premium-unlock-card {
        padding: 1.5rem !important;
        max-width: 280px;
    }
    
    .premium-title {
        font-size: 1.1rem;
    }
    
    .premium-features {
        padding: 0.5rem 0;
        margin: 0.5rem 0;
    }
    
    .premium-feature-item {
        font-size: 0.85rem;
        margin-bottom: 0.5rem !important;
    }
    
    .btn-premium {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Animation for carousel transitions */
.carousel-item .premium-content-preview {
    transition: all 0.3s ease;
}

.carousel-item.active .premium-feature-item {
    animation-play-state: running;
}

.carousel-item:not(.active) .premium-feature-item {
    animation-play-state: paused;
}

[data-theme="dark"] .content-card .card-text {
    color: #c5c5c5 !important; /* Более светлый цвет для текста в темной теме */
}