/* ==========================================================================
   Main Design System Variables
   ========================================================================== */

:root {
    /* Theme Colors */
    --primary-color: #007F81;
    --primary-dark: #004f51;
    --secondary-color: #e2e8f0;
    --accent-color: #4db6ac;

    /* Background Gradients */
    --bg-light: linear-gradient(180deg, #f8f9fa 0%, #e7f8ed 100%);
    --bg-dark: linear-gradient(180deg, #2d3748 0%, #1a202c 50%, #0d1117 100%);

    /* Card Styles */
    --card-bg: #ffffff;
    --card-border: rgba(0, 127, 129, 0.15);
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #6c757d;
    --text-muted: #888;
}

body {
    background: var(--bg-light);
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: var(--font-primary);
    font-weight: var(--fw-normal);
    letter-spacing: var(--ls-tight);
    color: var(--text-primary);
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 1.5rem 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
}

.content-card .card-title {
    color: var(--primary-color);
    font-weight: var(--fw-semibold);
    font-size: 1.3rem;
    font-family: var(--font-headings);
    letter-spacing: var(--ls-tight);
    margin-bottom: 0.75rem;
}

.content-card .card-text {
    font-size: 0.95rem;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

/* Global Heading Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    letter-spacing: var(--ls-tight);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

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

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

/* Button styles moved to buttons.css */

.news-feed .news-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-feed .news-item:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.news-feed .news-item .news-title a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: var(--fw-semibold);
    font-family: var(--font-headings);
    letter-spacing: var(--ls-tight);
    transition: color 0.2s ease;
}

.news-feed .news-item .news-title a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.news-feed .news-item .news-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.news-feed .news-item .news-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-search-form .form-control,
.news-search-form .btn {
    border-radius: 0.25rem;
}

.news-item-vertical {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color, #fff);
    border-radius: 1rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.news-item-vertical:hover {
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.12);
    background-color: var(--card-hover-bg, #f8f9fa);
    border-color: var(--primary, #0d6efd);
}

.news-title-vertical {
    font-size: 1.35rem;
    font-weight: var(--fw-semibold);
    font-family: var(--font-headings);
    letter-spacing: var(--ls-tight);
    margin-bottom: 0.25rem;
}

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

.news-title-vertical a:hover {
    color: var(--primary, #0d6efd);
    text-decoration: underline;
}

.news-date-vertical {
    font-size: 1rem;
    color: var(--text-muted-color, #888);
}

.news-content-vertical p {
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--text-color, #222);
    margin-bottom: 0.5rem;
}

.read-more-btn {
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    color: var(--primary, #0d6efd);
    transition: color 0.2s;
}

.read-more-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.read-more-btn .when-open {
    display: none;
}

.read-more-btn[aria-expanded="true"] .when-open {
    display: inline;
}

.read-more-btn[aria-expanded="true"] .when-closed {
    display: none;
}

/* Тёмная тема для карточки новости */
body.dark-mode .news-item-vertical {
    background-color: #23272f;
    border-color: #3a3f4b;
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.25);
}

body.dark-mode .news-item-vertical:hover {
    background-color: #2c313a;
    border-color: #0d6efd;
}

body.dark-mode .news-title-vertical a,
body.dark-mode .news-content-vertical p {
    color: #f1f3f7;
}

body.dark-mode .news-date-vertical {
    color: #b0b8c9;
}

body.dark-mode .read-more-btn {
    color: #6ea8fe;
}

body.dark-mode .read-more-btn:hover {
    color: #fff;
}

.news-search-form .form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.7rem;
}

.news-search-form .btn-lg {
    font-size: 1.1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 0.7rem;
    min-width: 120px;
}

/* Search form buttons now use unified button system */
@media (max-width: 576px) {
    .news-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .news-search-form .form-control-lg,
    .news-search-form .btn-lg {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.5rem;
    }

    .news-search-form .d-flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .row.g-4.mb-5 {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1rem !important;
    }

    .row.g-4.mb-5>.col-lg-6 {
        flex: 0 0 85vw;
        max-width: 85vw;
        min-width: 260px;
    }

    .content-card {
        min-height: 320px;
        height: 100%;
    }
}

.pagination .page-link {
    color: #007F81;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover,
.pagination .page-link:focus {
    background-color: #007F81;
    color: #fff;
    border-color: #007F81;
}

/* Button group styles now use unified button system */
@media (max-width: 576px) {
    .btn-group {
        width: auto;
        justify-content: flex-end;
    }

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

    .pagination {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .d-flex.flex-column.flex-sm-row {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pagination,
    .btn-group {
        margin-bottom: 0 !important;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Per-Page Pagination Controls
   ========================================================================== */

.per-page-controls {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg, 1.5rem);
}

.per-page-controls .btn-group {
    background: var(--bg-light-accent);
    border-radius: var(--radius-lg, 12px);
    padding: var(--spacing-xs, 0.25rem);
    box-shadow: var(--shadow-inner);
}

.per-page-controls .btn {
    font-family: var(--font-primary);
    font-weight: var(--fw-semibold);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: none;
    padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
    border-radius: var(--radius-md, 8px) !important;
    /* Override bootstrap */
    transition: all var(--transition-normal) ease;
    margin: 0 2px;
}

.per-page-controls .btn:hover {
    color: var(--text-primary);
    background-color: rgba(var(--text-primary-rgb), 0.05);
}

.per-page-controls .btn.active {
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-strong);
    transform: scale(1.05);
}

/* Dark Theme */
[data-theme="dark"] .per-page-controls .btn-group {
    background: var(--bg-dark-accent);
}

[data-theme="dark"] .per-page-controls .btn {
    color: var(--text-dark-secondary);
}

[data-theme="dark"] .per-page-controls .btn:hover {
    color: var(--text-dark-primary);
    background-color: rgba(var(--text-dark-primary-rgb), 0.1);
}

[data-theme="dark"] .per-page-controls .btn.active {
    color: var(--text-dark-primary);
    background: var(--gradient-primary-dark);
}

/* ==========================================================================
   Features Section Styles
   ========================================================================== */

.features-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid rgba(0, 127, 129, 0.1);
    border-bottom: 1px solid rgba(0, 127, 129, 0.1);
}

.features-section .section-title {
    font-family: var(--font-headings, 'Manrope', sans-serif);
    font-weight: var(--fw-bold, 700);
    color: var(--text-primary, #1e293b);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: var(--ls-tight, -0.025em);
}

.feature {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(0, 127, 129, 0.15);
    box-shadow: 0 8px 32px rgba(0, 127, 129, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 127, 129, 0.15),
        0 0 0 1px rgba(0, 127, 129, 0.2) inset;
    border-color: rgba(0, 127, 129, 0.3);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 127, 129, 0.1));
}

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

.feature-title {
    font-family: var(--font-headings, 'Manrope', sans-serif);
    font-weight: var(--fw-semibold, 600);
    color: var(--text-primary, #1e293b);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    letter-spacing: var(--ls-tight, -0.025em);
}

.feature-text {
    font-family: var(--font-primary, 'Inter', sans-serif);
    color: var(--text-secondary, #6c757d);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
}

/* ==========================================================================
   Dark Theme for Features Section
   ========================================================================== */

[data-theme="dark"] .features-section {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-top: 1px solid rgba(77, 182, 172, 0.2);
    border-bottom: 1px solid rgba(77, 182, 172, 0.2);
}

[data-theme="dark"] .features-section .section-title {
    color: var(--text-primary, #f3f4f6);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .feature {
    background: linear-gradient(145deg, #2a2d3a 0%, #1f2328 100%);
    border: 1px solid rgba(77, 182, 172, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .feature:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(77, 182, 172, 0.3) inset;
    border-color: rgba(77, 182, 172, 0.4);
}

[data-theme="dark"] .feature-icon {
    filter: drop-shadow(0 4px 8px rgba(77, 182, 172, 0.2));
}

[data-theme="dark"] .feature-title {
    color: var(--text-primary, #f3f4f6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .feature-text {
    color: var(--text-secondary, #d1d5db);
    opacity: 0.9;
}

/* ==========================================================================
   Responsive Design for Features Section
   ========================================================================== */

@media (max-width: 768px) {
    .features-section {
        padding: 4rem 0;
    }

    .features-section .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .feature {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }

    .feature-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .feature-title {
        font-size: 1.3rem;
    }

    .feature-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .features-section {
        padding: 3rem 0;
    }

    .features-section .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .feature {
        padding: 1.25rem 0.75rem;
        border-radius: 1rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }

    .feature-text {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Testimonials Section Styles
   ========================================================================== */

.testimonials-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(0, 127, 129, 0.1);
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 127, 129, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(77, 182, 172, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.testimonials-section .container {
    position: relative;
    z-index: 2;
}

.testimonials-section .section-title {
    font-family: var(--font-headings, 'Manrope', sans-serif);
    font-weight: var(--fw-bold, 700);
    color: var(--text-primary, #1e293b);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: var(--ls-tight, -0.025em);
    position: relative;
}

.testimonials-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #007F81) 0%, var(--accent-color, #4db6ac) 100%);
    border-radius: 2px;
}

#testimonialCarousel {
    position: relative;
    overflow: visible;
}

.testimonial {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    margin: 2rem 0;
    box-shadow: 0 20px 60px rgba(0, 127, 129, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    border: 1px solid rgba(0, 127, 129, 0.1);
    text-align: center;
    position: relative;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    left: 2rem;
    font-size: 6rem;
    color: var(--primary-color, #007F81);
    font-family: Georgia, serif;
    line-height: 1;
    opacity: 0.3;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 127, 129, 0.12),
        0 0 0 1px rgba(0, 127, 129, 0.15) inset;
    border-color: rgba(0, 127, 129, 0.2);
}

.testimonial-text {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-primary, #1e293b);
    margin-bottom: 2rem;
    font-style: italic;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    font-family: var(--font-headings, 'Manrope', sans-serif);
    font-size: 1rem;
    font-weight: var(--fw-semibold, 600);
    color: var(--primary-color, #007F81);
    position: relative;
    padding-top: 1rem;
    letter-spacing: var(--ls-tight, -0.025em);
}

.testimonial-author::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color, #007F81) 0%, var(--accent-color, #4db6ac) 100%);
    border-radius: 1px;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(0, 127, 129, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 8px 24px rgba(0, 127, 129, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: linear-gradient(145deg, var(--primary-color, #007F81) 0%, var(--accent-color, #4db6ac) 100%);
    border-color: var(--primary-color, #007F81);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 127, 129, 0.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
    background-size: 20px 20px;
    filter: invert(20%) sepia(100%) saturate(2000%) hue-rotate(180deg);
    transition: filter 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: invert(100%) brightness(100%);
}

/* Carousel Indicators (if needed) */
.carousel-indicators {
    bottom: -3rem;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 127, 129, 0.3);
    border: none;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.carousel-indicators .active {
    background-color: var(--primary-color, #007F81);
    transform: scale(1.2);
}

/* ==========================================================================
   Dark Theme for Testimonials Section
   ========================================================================== */

[data-theme="dark"] .testimonials-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-bottom: 1px solid rgba(77, 182, 172, 0.2);
}

[data-theme="dark"] .testimonials-section::before {
    background: radial-gradient(circle at 20% 80%, rgba(77, 182, 172, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(77, 182, 172, 0.03) 0%, transparent 50%);
}

[data-theme="dark"] .testimonials-section .section-title {
    color: var(--text-primary, #f3f4f6);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .testimonials-section .section-title::after {
    background: linear-gradient(90deg, var(--primary-color, #4db6ac) 0%, var(--accent-color, #26a69a) 100%);
}

[data-theme="dark"] .testimonial {
    background: linear-gradient(145deg, #2a2d3a 0%, #1f2328 100%);
    border: 1px solid rgba(77, 182, 172, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .testimonial::before {
    color: var(--primary-color, #4db6ac);
}

[data-theme="dark"] .testimonial:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(77, 182, 172, 0.3) inset;
    border-color: rgba(77, 182, 172, 0.4);
}

[data-theme="dark"] .testimonial-text {
    color: var(--text-primary, #f3f4f6);
}

[data-theme="dark"] .testimonial-author {
    color: var(--primary-color, #4db6ac);
}

[data-theme="dark"] .testimonial-author::before {
    background: linear-gradient(90deg, var(--primary-color, #4db6ac) 0%, var(--accent-color, #26a69a) 100%);
}

[data-theme="dark"] .carousel-control-prev,
[data-theme="dark"] .carousel-control-next {
    background: linear-gradient(145deg, #2a2d3a 0%, #1f2328 100%);
    border: 1px solid rgba(77, 182, 172, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .carousel-control-prev:hover,
[data-theme="dark"] .carousel-control-next:hover {
    background: linear-gradient(145deg, var(--primary-color, #4db6ac) 0%, var(--accent-color, #26a69a) 100%);
    border-color: var(--primary-color, #4db6ac);
    box-shadow: 0 12px 32px rgba(77, 182, 172, 0.3);
}

[data-theme="dark"] .carousel-control-prev-icon,
[data-theme="dark"] .carousel-control-next-icon {
    filter: invert(80%) sepia(20%) saturate(300%) hue-rotate(180deg);
}

[data-theme="dark"] .carousel-control-prev:hover .carousel-control-prev-icon,
[data-theme="dark"] .carousel-control-next:hover .carousel-control-next-icon {
    filter: invert(100%) brightness(100%);
}

[data-theme="dark"] .carousel-indicators [data-bs-target] {
    background-color: rgba(77, 182, 172, 0.4);
}

[data-theme="dark"] .carousel-indicators .active {
    background-color: var(--primary-color, #4db6ac);
}

/* ==========================================================================
   Responsive Design for Testimonials Section
   ========================================================================== */

@media (max-width: 768px) {
    .testimonials-section {
        padding: 4rem 0;
    }

    .testimonials-section .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .testimonial {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
        border-radius: 1.5rem;
    }

    .testimonial::before {
        font-size: 4rem;
        top: -0.3rem;
        left: 1.5rem;
    }

    .testimonial-text {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .testimonial-author {
        font-size: 0.95rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
    }

    .carousel-control-prev {
        left: -20px;
    }

    .carousel-control-next {
        right: -20px;
    }
}

@media (max-width: 576px) {
    .testimonials-section {
        padding: 3rem 0;
    }

    .testimonials-section .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .testimonial {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
        border-radius: 1rem;
    }

    .testimonial::before {
        font-size: 3rem;
        top: -0.2rem;
        left: 1rem;
    }

    .testimonial-text {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .testimonial-author {
        font-size: 0.9rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        display: none;
        /* Hide on mobile for better UX */
    }

    .carousel-indicators {
        bottom: -2rem;
    }

    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

/* Карусель с аналитическими статьями */
.content-card {
    min-height: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e3e6f0;
}

.content-card .card-body {
    padding: 1.5rem;
}

.content-card .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    max-height: 200px;
    overflow-y: auto;
}

.premium-preview {
    background: rgba(220, 53, 69, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.premium-preview .bg-light {
    background: rgba(248, 249, 250, 0.8) !important;
    border: 1px solid #dee2e6;
    max-height: 120px;
    overflow-y: auto;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .content-card {
        min-height: 280px;
    }

    .content-card .card-text {
        font-size: 0.9rem;
        max-height: 150px;
    }

    .premium-preview .bg-light {
        max-height: 100px;
    }
}

/* ==========================================================================
   New Main Page Styles (Glabix-inspired)
   ========================================================================== */

.hero-section {
    background-color: #f8f9fa;
}

.hero-title {
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
}

.video-placeholder {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: #adb5bd;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.video-placeholder:hover {
    background-color: #dfe4e7;
    color: #495057;
}

.feature-card {
    border: none;
    background-color: #ffffff;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.feature-card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.use-case-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.use-case-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.cta-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.cta-title {
    font-weight: 700;
}

.cta-section .btn-light {
    font-weight: bold;
    color: var(--primary-color);
}

/* ==========================================================================
   Dark Theme for New Main Page Styles
   ========================================================================== */

[data-theme="dark"] .hero-section {
    background-color: #1a202c;
}

[data-theme="dark"] .hero-subtitle {
    color: #a0aec0;
}

[data-theme="dark"] .video-placeholder {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #718096;
}

[data-theme="dark"] .video-placeholder:hover {
    background-color: #4a5568;
    color: #a0aec0;
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .use-case-card {
    background-color: #2d3748;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    border: 1px solid #4a5568;
}

[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .use-case-card:hover {
    background-color: #4a5568;
    border-color: var(--accent-color);
}

[data-theme="dark"] .feature-title,
[data-theme="dark"] .use-case-card h4 {
    color: #f7fafc;
}

[data-theme="dark"] .feature-text,
[data-theme="dark"] .use-case-card p {
    color: #a0aec0 !important;
}

[data-theme="dark"] .cta-section {
    background-color: var(--primary-dark);
}

[data-theme="dark"] .cta-section .btn-light {
    background-color: #f7fafc;
    color: var(--primary-dark);
}

[data-theme="dark"] .cta-section .btn-light:hover {
    background-color: #e2e8f0;
}

/* Стили для хедера в основном разделе */
/* Добавляем отступы по краям для элементов */
.greeting-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
    padding-left: var(--spacing-xl, 1.5rem);
    padding-right: var(--spacing-xl, 1.5rem);
}

#header {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--spacing-xl, 1.5rem);
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.logo-right {
    margin-right: 0;
    margin-left: 1rem;
    visibility: hidden;
}

.finohelp-logo {
    object-fit: contain;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.home-button,
.profile-button,
.finance-button,
.subscription-button,
.ai-button,
.logout-button,
.finance-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--border-color, rgba(0, 127, 129, 0.2));
    text-decoration: none;
    font-size: 1.25rem;
    color: var(--text-primary, #007F81);
    cursor: pointer;
}

.home-button:hover,
.profile-button:hover,
.finance-button:hover,
.subscription-button:hover,
.ai-button:hover,
.logout-button:hover,
.finance-theme-toggle:hover {
    background-color: var(--secondary-bg-hover, #e6f7f7);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ai-button-disabled {
    opacity: 0.7;
}

/* Стили для всплывающей подсказки */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background-color: var(--primary-color, #007F81);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Добавляем стрелочку */
.tooltip-text::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--primary-color, #007F81) transparent;
}

[data-theme="dark"] .home-button,
[data-theme="dark"] .profile-button,
[data-theme="dark"] .finance-button,
[data-theme="dark"] .subscription-button,
[data-theme="dark"] .ai-button,
[data-theme="dark"] .logout-button,
[data-theme="dark"] .finance-theme-toggle {
    background-color: #2a313c;
    color: #c5d2e5;
    border-color: #3e4a5c;
}

[data-theme="dark"] .home-button:hover,
[data-theme="dark"] .profile-button:hover,
[data-theme="dark"] .finance-button:hover,
[data-theme="dark"] .subscription-button:hover,
[data-theme="dark"] .ai-button:hover,
[data-theme="dark"] .logout-button:hover,
[data-theme="dark"] .finance-theme-toggle:hover {
    background-color: #3e4a5c;
    border-color: #566981;
    color: #ffffff;
}

[data-theme="dark"] .tooltip-text {
    background-color: #3e4a5c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tooltip-text::after {
    border-color: transparent transparent #3e4a5c transparent;
}

@media (max-width: 992px) {
    #header {
        padding-top: var(--spacing-xl, 1.5rem);
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    #header {
        padding-top: 1rem;
    }

    .greeting-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .logo-container {
        display: flex;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .logo-right {
        display: none;
    }
    
    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .home-button,
    .profile-button,
    .finance-button,
    .subscription-button,
    .ai-button,
    .logout-button,
    .finance-theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: 0.5rem 0.5rem;
    }
    
    .home-button,
    .profile-button,
    .finance-button,
    .subscription-button,
    .ai-button,
    .logout-button,
    .finance-theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}