/**
 * BCCBR Website Fixes
 * Fixes for menu alignment, Bulgarian menu overflow, responsive issues
 */

/* ===========================================
   1. MENU ALIGNMENT FIX
   Projects&Initiatives was higher than others
   Problem: Dropdown items have asymmetric padding
=========================================== */

/* Main navbar - horizontal flex, centered */
.navbar-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* All nav-items - same height, flex row, STRETCH to fill */
.navbar-nav > .nav-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* CRITICAL: All nav links must have IDENTICAL padding */
.navbar-nav > .nav-item > .nav-link {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Remove ALL underlines, borders, and decorative elements from nav links */
.navbar-nav > .nav-item > .nav-link::before,
.navbar-nav > .nav-item > .nav-link::after {
    display: none !important;
    content: none !important;
}

/* CRITICAL: Dropdown arrow icon - align to center of parent */
.navbar-nav > .nav-item > i.fa-angle-down,
.navbar-nav > .nav-item > .dropdown-toggle.fa-angle-down,
.navbar-nav > .nav-item > i.dropdown-toggle,
.navbar-nav > .nav-item > i.fa-solid {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    padding: 0 4px !important;
    margin: 0 !important;
    font-size: 8px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    height: auto !important;
}

/* Remove decorative lines from dropdown toggle */
.navbar-nav > .nav-item > i.dropdown-toggle::before,
.navbar-nav > .nav-item > i.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* Dropdown with icon - SAME alignment as regular items */
.nav-item.dropdown-with-icon {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
}

/* Dropdown items - SAME as regular */
.nav-item.dropdown {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
}

/* Force dropdown link to have same padding as regular links */
.nav-item.dropdown > .nav-link,
.nav-item.dropdown-with-icon > .nav-link {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ===========================================
   2. BULGARIAN MENU / LANGUAGE OVERFLOW FIX
   Long Bulgarian text was hiding language selector
=========================================== */
@media (min-width: 992px) and (max-width: 1399px) {
    /* Reduce font size for menu items on medium screens */
    .navbar-nav > .nav-item > .nav-link {
        font-size: 13px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Ensure language switcher is always visible */
    .navbar-nav > .nav-item:last-child {
        flex-shrink: 0;
        margin-left: auto;
    }
}

@media (min-width: 1400px) and (max-width: 1600px) {
    .navbar-nav > .nav-item > .nav-link {
        font-size: 14px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* Make menu responsive - truncate long text if needed */
.navbar-nav > .nav-item > .nav-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Language switcher should always be visible */
.navbar-nav > .nav-item:last-child > .nav-link {
    max-width: none;
    overflow: visible;
}

/* ===========================================
   3. GUEST ARTICLES BUTTON FIX
   "See all" button was covered by article
=========================================== */
.blog-post-style-02 {
    position: relative;
    z-index: 1;
}

.blog-post-style-02 .btn {
    position: relative;
    z-index: 2;
}

/* Ensure buttons in card are clickable */
.card .btn,
.blog-content .btn,
.feature-box .btn {
    position: relative;
    z-index: 10;
}

/* ===========================================
   4. MEMBERS/PARTNERS LOGO NORMALIZATION
   CSS-based approach while upload resize is implemented
=========================================== */
.members-logo-container img,
.partners-logo-container img,
.client-logo img,
.member-logo img,
.partner-logo img {
    max-width: 150px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Uniform container for logos */
.logo-uniform-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 80px;
    padding: 10px;
}

.logo-uniform-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===========================================
   5. PROJECTS & INITIATIVES BUTTON FIX
   Make "Invest" button styled like "Become partner"
=========================================== */
.projects-initiatives-buttons a {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.projects-initiatives-buttons a:not(.btn) {
    background-color: var(--base-color, #2946f3);
    color: white !important;
    border: 2px solid var(--base-color, #2946f3);
}

.projects-initiatives-buttons a:not(.btn):hover {
    background-color: transparent;
    color: var(--base-color, #2946f3) !important;
}

/* ===========================================
   6. FOOTER VISIBILITY FIX
   Ensure footer is visible on all pages
=========================================== */
footer.footer-dark {
    display: block !important;
    visibility: visible !important;
}

/* ===========================================
   7. RESPONSIVE FULL-WIDTH SUPPORT
   Site should adjust to browser width
=========================================== */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Navbar should be full width */
.navbar {
    width: 100%;
}

.navbar .container-fluid {
    flex-wrap: nowrap;
}

/* ===========================================
   8. COUNTER/STATISTICS SECTION FIX
   For admin-editable counters
=========================================== */
.counter-editable {
    cursor: text;
}

.counter-editable:focus {
    outline: 2px solid var(--base-color, #2946f3);
    outline-offset: 2px;
}

/* ===========================================
   9. HERO SECTION FIXES
   - Reduce hero text size (too large)
   - Make CTA buttons equal size
=========================================== */

/* Hero headline - reduce size */
.swiper-slide .fs-80,
section .fs-80 {
    font-size: 52px !important;
    line-height: 1.2 !important;
}

@media (max-width: 991px) {
    .swiper-slide .fs-80,
    section .fs-80 {
        font-size: 38px !important;
    }
}

@media (max-width: 575px) {
    .swiper-slide .fs-80,
    section .fs-80,
    .swiper-slide .xs-fs-60 {
        font-size: 28px !important;
    }
}

/* Hero CTA buttons - equal size and consistent styling */
.swiper-slide .btn-large,
section.p-0 .btn-large {
    min-width: 220px !important;
    padding: 16px 32px !important;
    font-size: 14px !important;
    text-align: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Make both buttons same height */
.swiper-slide .btn-transparent-white-light,
section.p-0 .btn-transparent-white-light {
    min-width: 220px !important;
    padding: 16px 32px !important;
    background-color: transparent !important;
    border: 2px solid rgba(255,255,255,0.5) !important;
}

.swiper-slide .btn-transparent-white-light:hover {
    background-color: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.8) !important;
}

/* ===========================================
   9b. HERO PAGE-TITLE — fixed-height banner
   Crop 885:420 centres the composition;
   cover + center shows the focal area.
=========================================== */
.page-title-big-typography {
    height: 480px !important;
    width: 100%;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Override theme .extra-small-screen height on the inner row */
.page-title-big-typography .extra-small-screen {
    height: auto !important;
}

/* Container above overlay, force anime-start elements visible */
.page-title-big-typography > .container {
    position: relative !important;
    z-index: 2 !important;
}

/* Force hero content visible — anime lib starts at opacity:0 */
.page-title-big-typography h1,
.page-title-big-typography .down-section {
    opacity: 1 !important;
    transform: none !important;
}

/* Better text contrast on hero */
.page-title-big-typography h1 {
    text-shadow: 0 2px 30px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4) !important;
}

/* Strengthen overlay for readability */
.page-title-big-typography > .opacity-extra-medium {
    opacity: 0.5 !important;
}

@media (max-width: 1199px) {
    .page-title-big-typography {
        height: 400px !important;
    }
}

@media (max-width: 767px) {
    .page-title-big-typography {
        height: 320px !important;
    }
}

/* ===========================================
   9c. MEMBER/PARTNER CAROUSEL NAME HEIGHT FIX
   Long names on 2 lines make cards uneven.
   Fixed height + line-clamp ensures uniform cards.
=========================================== */
/* Name text under logos in carousels */
.clients-style-08 .swiper-slide span.fw-600.fs-12 {
    height: 32px;
    max-width: 160px;
    margin-top: 10px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Ensure all carousel slide links have same height for alignment */
.clients-style-08 .swiper-slide > a {
    min-height: 130px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* ===========================================
   10. STATISTICS/COUNTERS LAYOUT FIX
   Numbers were overlapping badly (3+, M+, 1000, 50)
=========================================== */

/* Fix counter layout - horizontal arrangement */
.counter-style-04 .col,
.counter-style-04 > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 15px !important;
}

/* Counter number styling */
.counter-style-04 h3,
.counter-style-04 .counter-number {
    font-size: 48px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: baseline !important;
    white-space: nowrap !important;
}

/* Sup element (the + sign) */
.counter-style-04 h3 sup,
.counter-style-04 sup {
    font-size: 24px !important;
    position: relative !important;
    top: -0.3em !important;
    margin-right: 2px !important;
}

/* Label text next to number */
.counter-style-04 span.fs-14,
.counter-style-04 .counter-label {
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin-left: 10px !important;
    text-transform: uppercase !important;
}

/* Homepage specific counter fix */
section .row.counter-style-04 {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

section .row.counter-style-04 .col {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
}

/* Alternative counter display - stacked layout */
.d-inline-flex.text-dark-gray {
    display: inline-flex !important;
    align-items: baseline !important;
}

/* ===========================================
   11. MENU FONT SIZE REDUCTION
   Long menu items like "Proiecte si Initiative"
=========================================== */

/* Reduce menu font size globally */
.navbar-nav > .nav-item > .nav-link {
    font-size: 14px !important;
    letter-spacing: 0 !important;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav > .nav-item > .nav-link {
        font-size: 12px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .navbar-nav > .nav-item > .nav-link {
        font-size: 13px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ===========================================
   12. CARD & FEATURE BOX CONSISTENCY
   Equal height cards, consistent spacing
=========================================== */

/* Equal height cards in rows */
.row-cols-1 > .col,
.row-cols-2 > .col,
.row-cols-3 > .col,
.row-cols-lg-3 > .col {
    display: flex !important;
}

.row-cols-1 > .col > .card,
.row-cols-2 > .col > .card,
.row-cols-3 > .col > .card,
.row-cols-lg-3 > .col > .card,
.row-cols-1 > .col > .feature-box,
.row-cols-2 > .col > .feature-box,
.row-cols-3 > .col > .feature-box {
    width: 100% !important;
    height: 100% !important;
}

/* Feature box icon consistency */
.feature-box .feature-box-icon i {
    font-size: 42px !important;
    line-height: 1 !important;
}

/* ===========================================
   13. SECTION SPACING CONSISTENCY
   Uniform padding across sections
=========================================== */
section {
    padding-top: 80px;
    padding-bottom: 80px;
}

section.pt-0 {
    padding-top: 0 !important;
}

section.pb-0 {
    padding-bottom: 0 !important;
}

@media (max-width: 991px) {
    section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* ===========================================
   14. BUTTON CONSISTENCY
   All buttons same style and size
=========================================== */
.btn-large {
    padding: 14px 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.btn-medium {
    padding: 12px 24px !important;
    font-size: 13px !important;
}

/* Button hover animation fix */
.btn-hover-animation-switch span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ===========================================
   15. TYPOGRAPHY IMPROVEMENTS
   Better readability
=========================================== */

/* Section titles */
h2, h3 {
    letter-spacing: -0.5px;
}

/* Body text */
p {
    line-height: 1.7;
}

/* Subtitle/label text */
.text-uppercase.fw-600 {
    letter-spacing: 1px;
}

/* ===========================================
   16. IMAGE ASPECT RATIO FIXES
   Prevent stretched images
=========================================== */
.blog-image img,
.card-img-top,
.feature-box img {
    object-fit: cover;
    width: 100%;
}

/* ===========================================
   18. NEWSLETTER BUTTON HOVER FIX
   btn-white on hover becomes transparent + white text
   but button sits over white input = invisible text
=========================================== */
.newsletter-form-unique .btn.btn-white:hover,
.newsletter-form-unique .btn.btn-white:active {
    background-color: var(--dark-gray) !important;
    color: var(--white) !important;
    border-color: var(--dark-gray) !important;
}

/* ===========================================
   17. FOOTER NEWSLETTER BUTTON STYLE
=========================================== */
/* Newsletter subscribe button: dark default, blue on hover */
.newsletter-style-02 .newsletter-submit-btn {
    background-color: #252840 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 4px 4px 0 !important;
    transition: background-color 0.3s ease;
}
.newsletter-style-02 .btn.newsletter-submit-btn:hover {
    background-color: #09afea !important;
    color: #fff !important;
}
/* Page body newsletter has pill-shaped input (50px) - match it */
section .newsletter-style-02 .newsletter-submit-btn {
    border-radius: 0 50px 50px 0 !important;
}

/* ===========================================
   18. MOBILE RESPONSIVE IMPROVEMENTS
=========================================== */
@media (max-width: 991px) {
    /* Fix letter-spacing eating spaces on mobile/tablet */
    .ls-minus-2px {
        letter-spacing: -0.5px !important;
    }
    .ls-minus-3px {
        letter-spacing: -0.5px !important;
    }
    .ls-minus-1px {
        letter-spacing: 0px !important;
    }

    /* Reset word-spacing for all text to ensure visible spaces */
    h1, h2, h3, h4, h5, h6,
    .fw-700, .fw-600 {
        word-spacing: 2px;
    }

    /* ---- HAMBURGER TOGGLER - proper touch target ---- */
    .navbar-toggler {
        padding: 10px 12px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        z-index: 1001 !important;
    }
    .navbar-toggler .navbar-toggler-line {
        width: 22px;
        height: 2px;
        margin: 2px 0;
    }

    /* ---- MOBILE MENU FULL RESET ---- */
    /* Undo ALL desktop flex overrides from section 1 */
    .navbar-nav {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    .navbar-nav > .nav-item {
        flex-direction: row !important;
        white-space: normal !important;
        width: 100% !important;
    }
    .navbar-nav > .nav-item > .nav-link {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        max-width: none !important;
        flex-grow: 1 !important;
        padding: 12px 15px !important;
    }
    /* Dropdown toggle arrow - tappable area */
    .navbar-nav > .nav-item > i.dropdown-toggle,
    .navbar-nav > .nav-item > .dropdown-toggle {
        width: 44px !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    /* Container-fluid allow wrap on mobile */
    .navbar .container-fluid {
        flex-wrap: wrap !important;
    }
    /* Dropdown submenus full width */
    .navbar-nav .dropdown-menu {
        position: static !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 15px !important;
    }
    /* Navbar collapse - full width, visible bg, proper stacking */
    .navbar-collapse {
        flex-basis: 100% !important;
        order: 99 !important;
    }
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background-color: var(--white, #fff) !important;
        border-top: 1px solid rgba(0,0,0,0.1);
        padding: 10px 0 !important;
    }
    /* Nav links visible on white bg */
    .navbar-collapse.show .nav-link,
    .navbar-collapse.collapsing .nav-link {
        color: var(--dark-gray, #232323) !important;
    }
}

@media (max-width: 767px) {
    /* Stack buttons on mobile */
    .swiper-slide .btn-large {
        min-width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Reduce heading sizes */
    h1, .fs-80 {
        font-size: 28px !important;
    }

    h2 {
        font-size: 24px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    /* Even less aggressive letter-spacing on small screens */
    .ls-minus-2px,
    .ls-minus-3px {
        letter-spacing: 0px !important;
    }

    /* Counter numbers - reduce font for small screens */
    .counter-style-04 h3 {
        font-size: 36px !important;
    }
}

/* ===========================================
   18b. ARTICLE CONTENT LIST STYLES
   Theme sets `ul li { list-style: none }` globally.
   Restore bullets/numbers inside article body.
=========================================== */
.fs-18 ul,
.fs-18 ol {
    padding-left: 2em !important;
    margin-bottom: 1em !important;
}

.fs-18 ul li {
    list-style-type: disc !important;
    margin-bottom: 0.4em;
}

.fs-18 ol li {
    list-style-type: decimal !important;
    margin-bottom: 0.4em;
}

.fs-18 ul ul li {
    list-style-type: circle !important;
}

.fs-18 ol ol li {
    list-style-type: lower-alpha !important;
}

/* ===========================================
   19. GALLERY LIGHTBOX THUMBNAILS
   =========================================== */
.gallery-section {
    border-top: 1px solid #e8e8e8;
    padding-top: 35px;
}

.gallery-section-title {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #828282;
    margin-bottom: 20px;
}

.gallery-thumb {
    cursor: pointer;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
}

.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

.gallery-thumb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%) scale(0.7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-thumb:hover::after {
    opacity: 1;
}

.gallery-thumb:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-thumb img {
    transition: transform 0.4s ease;
    display: block;
    width: 100%;
    border-radius: 6px;
}

.gallery-thumb:hover img {
    transform: scale(1.06);
}
