/* ============================================================================
   1. General / Base
============================================================================ */

body {
    background: linear-gradient(to bottom, #f8f9fa, #e0e7ff);
    min-height: 100vh;
}

/* ============================================================================
   2. Animations
============================================================================ */

@keyframes fadeInDark {
    from {
        background-color: #f8f9fa;
        opacity: .9;
    }
    to {
        background-color: #000;
        opacity: 1;
    }
}

@keyframes pulseSuccess {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulseStrong {
    0%   { box-shadow: 0 0 0 0 #dc3545cc; }
    70%  { box-shadow: 0 0 0 20px #dc354500; }
    100% { box-shadow: 0 0 0 0 #dc354500; }
}

/* ============================================================================
   3. Header & Navigation
============================================================================ */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-link {
    position: relative;
    transition: transform .4s ease;
    overflow: hidden;
    display: inline-block;
}

.title-link:hover {
    transform: translateY(-4px);
}

.rca-text {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: .15em;
    margin-left: .15em;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    opacity: 1;
}

.title-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    margin: 12px 0;
    border-radius: 3px;
}

.subtitle-text {
    font-size: 1rem;
    color: #555;
    letter-spacing: 6px;
    margin-left: 6px;
    font-weight: 500;
    opacity: 1;
}

.user-info {
    font-size: 1.1rem;
    font-weight: 500;
}

.user-info .badge {
    font-size: .75rem;
}

.user-avatar-square {
    width: 56px;
    height: 56px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border: 3px solid #ccc;
    border-radius: 5px;
    transition: all .3s ease;
}

.user-avatar-square:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px #00000026;
}

.dropdown-toggle-custom::after {
    display: none !important;
}

.dropdown-menu {
    min-width: 280px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* pentru Safari */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   4. Components - Buttons, Icons, Tooltips
============================================================================ */

.btn-icon {
    padding: .375rem .75rem;
}

.bi-question-circle:hover {
    opacity: 1 !important;
    color: #6c757d !important;
}

/* ============================================================================
   5. Timeline
============================================================================ */

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: #dee2e6;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-left {
    margin-right: 55%;
    text-align: right;
}

.timeline-right {
    margin-left: 55%;
}

.timeline-badge {
    position: absolute;
    left: 50%;
    margin-left: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    z-index: 1;
}

.timeline-content {
    position: relative;
}

/* ============================================================================
   6. Cards & Product/Article components
============================================================================ */

.product-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 25px #00000014;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all .3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px #0d6efd26;
}

.product-card.disabled {
    background: #f8f9fa;
    opacity: .65;
    cursor: not-allowed;
    border: 1px dashed #dee2e6;
}

.product-card.disabled:hover {
    transform: none;
    box-shadow: 0 8px 25px #00000014;
}

.product-card.disabled .product-icon { color: #adb5bd; }
.product-card.disabled h3 { color: #6c757d; }

.product-icon {
    font-size: 3.5rem;
    color: #0d6efd;
    margin-bottom: 1.5rem;
}

.product-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #212529;
}

.coming-soon {
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50px;
    padding: .5rem 1.2rem;
    font-size: .9rem;
    font-weight: 600;
    display: inline-block;
}

.article-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 25px #00000014;
    transition: all .3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px #0000001f;
}

.article-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.article-body {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: .75rem;
    line-height: 1.4;
}

.article-excerpt {
    color: #6c757d;
    font-size: .95rem;
    line-height: 1.6;
}

.article-date {
    color: #999;
    font-size: .85rem;
    margin-top: 1rem;
}

.glass-card {
    background: #ffffffd9;
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid #00000014;
    box-shadow: 0 10px 30px #0000001a;
}

/* ============================================================================
   7. Notification / Pulse elements
============================================================================ */

.pulse-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: pulseStrong 2s infinite;
    pointer-events: none;
}

#pulseCircle {
    cursor: pointer;
    overflow: visible;
}

.transition-icon {
    transition: top .4s ease, transform .4s ease, font-size .4s ease;
}

.transition-count {
    transition: opacity .4s ease;
}

/* ============================================================================
   8. Scroll to top button
============================================================================ */

#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
    width: 48px;
    height: 48px;
    background-color: #0d6efdd9;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px #00000026;
    transition: all .3s ease;
    cursor: pointer;
}

#scrollToTopBtn:hover {
    background-color: #0d6efd;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px #0003;
}

#scrollToTopBtn.show {
    display: flex;
}

/* ============================================================================
   9. Footer & Links
============================================================================ */

.footer-link {
    color: #fff !important;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-link:hover {
    color: var(--bs-secondary) !important;
}

.footer-link:focus {
    outline: 2px solid var(--bs-secondary);
    outline-offset: 2px;
}

/* ============================================================================
   10. Modals & Backdrop
============================================================================ */

.modal-backdrop {
    background: #ffffff05 !important;
    backdrop-filter: blur(4px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(4px) saturate(180%) !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

.modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ============================================================================
   11. Tabs
============================================================================ */

.nav-tabs {
    border-bottom-color: #ccc;
    background-color: transparent;
}

.nav-tabs .nav-link {
    color: #aaa;
    background-color: #fff;
    border-bottom-color: #ccc;
    transition: all .5s ease;
}

.nav-tabs .nav-link:hover {
    color: #111;
    background-color: #fff;
    border-color: #c1c1c1;
    isolation: isolate;
}

.nav-tabs .nav-link.active {
    color: #111 !important;
    background-color: #fcfcfc;
    border-color: #aaa;
    border-bottom-color: #fff;
    transition: all .5s ease;
}

.nav-tabs .nav-link:focus {
    box-shadow: 0 0 0 .1rem #afceff2b;
    color: #111;
}

.nav-tabs .nav-link.active::after {
    background-color: #fff;
}

/* ============================================================================
   12. Logo Marquee
============================================================================ */

.logo-marquee-wrapper {
    position: relative;
    margin: 100px 0 60px;
    overflow: hidden;
}

.logo-marquee-wrapper::before,
.logo-marquee-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.logo-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #e4eafd73 0%, #e4eafd52 30%, #e4eafd00 100%);
}

.logo-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #e4eafd73 0%, #e4eafd52 30%, #e4eafd00 100%);
}

.logo-marquee {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee-scroll 50s linear infinite;
    will-change: transform;
}

.logo-marquee:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    margin: 0 30px;
}

.logo-item img {
    height: 30px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%) opacity(.8);
    transition: filter .3s ease;
}

.logo-item img:hover {
    filter: grayscale(0%) opacity(1);
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================================
   13. Typography / Titles
============================================================================ */

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin: 3rem 0 2.5rem;
    color: #212529;
}

/* ============================================================================
   14. Custom Tooltip
============================================================================ */

.custom-tooltip .tooltip-inner {
    background-color: #343a40 !important;
    color: #e9ecef !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: .875rem !important;
    max-width: 280px !important;
    text-align: left !important;
    box-shadow: 0 4px 12px #00000026 !important;
}

.custom-tooltip .tooltip-arrow::before {
    border-bottom-color: #343a40 !important;
}

/* ============================================================================
   15. Media Queries (grupate la final)
============================================================================ */

@media (max-width: 992px) {
    .rca-text { font-size: 2.1rem; }
    .subtitle-text { font-size: .95rem; letter-spacing: 5px; }
}

@media (max-width: 768px) {
    .timeline::before { left: 20px; }
    .timeline-left, .timeline-right {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }
    .timeline-badge { left: 0; margin-left: 0; }
    .timeline-content { margin-left: 60px; }

    #scrollToTopBtn {
        width: 44px;
        height: 44px;
        bottom: 100px;
        right: 33px;
        font-size: 1.2rem;
    }

    .header-main {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .user-info { text-align: center; }
    .header-right { justify-content: center; }

    .hero-header h1 { font-size: 2.3rem; }
    .section-title { font-size: 1.9rem; }
    .product-icon { font-size: 3rem; }

    .logo-marquee { gap: 20px; }
    .logo-item img { height: 38px; }
    .logo-marquee-wrapper::before,
    .logo-marquee-wrapper::after { width: 60px; }
}

@media (max-width: 576px) {
    .rca-text { font-size: 1.8rem; }
    .subtitle-text { font-size: .9rem; letter-spacing: 3px; }
    .user-avatar-square {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .row.g-4 > div { margin-bottom: 1.5rem; }
    hr.my-4 { margin: 1.5rem 0; }
}