/* --- Mobile Slider Typography & Positioning Fixes (2025-10-17) --- */
@media screen and (max-width: 767px) {
    /* Ensure enough height for vertical centering over background image */
    .home-slider-area .single-slide-item,
    .home-slider-area .single-slide-item .single-slide-item-table {
        min-height: 60vh !important;
    }

    /* Vertically center and horizontally center the content */
    .home-slider-area .single-slide-item .single-slide-item-table-cell {
        vertical-align: middle !important;
        text-align: center !important;
        padding: 0 16px !important;
    }

    /* Increase heading sizes in slider on mobile and keep centered */
    .home-slider-area h1,
    .home-slider-area h2,
    .home-slider-area .font-weight-h {
        font-size: 28px !important;
        line-height: 1.35 !important;
        margin-bottom: 12px !important;
        text-align: center !important;
        word-break: break-word;
    }

    /* Slightly larger on bigger phones */
    @media screen and (min-width: 420px) and (max-width: 767px) {
        .home-slider-area h1,
        .home-slider-area h2,
        .home-slider-area .font-weight-h {
            font-size: 30px !important;
        }
    }

    /* Paragraph/body text under headings: justified for RTL readability */
    .home-slider-area p {
        font-size: 15px !important;
        line-height: 1.9 !important;
        text-align: justify !important;
        text-align-last: center; /* visually balances last line */
        margin: 0 auto !important;
        max-width: 640px; /* prevent overly wide measure on tablets */
    }

    /* Keep indicators within safe tap area without overlapping text too much */
    .home-slider-area .carousel-indicators {
        bottom: 12px !important;
    }

    /* Hide site logo/name in header on mobile and let navbar take full width */
    .header-top-area .logo {
        display: none !important;
    }
    .header-top-area .col-md-3 {
        display: none !important;
    }
    .header-top-area .col-md-9 {
        width: 100% !important;
        float: none;
    }

    /* Ensure hamburger button is visible and aligned within header */
    .header-top-area .navbar-header {
        float: none !important;
    }
    .header-top-area .navbar-toggle {
        display: block !important;
        float: right; /* RTL header: keep toggle on right */
        margin: 10px 10px 10px 0 !important; /* reset negative margins from theme */
        border: none;
        z-index: 10000; /* stay above overlaps */
    }
    .header-top-area.menu-bg .navbar-toggle {
        margin-top: 10px !important;
    }

    /* Contact page: professional mobile header layout */
    .contact-page .header-top-area {
        background: #fff !important;
        padding: 10px 0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
    }
    .contact-page .header-top-area .navbar {
        margin: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    .contact-page .header-top-area .navbar-header {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }
    .contact-page .header-top-area .navbar-toggle {
        padding: 9px 10px !important;
        margin: 0 8px 0 0 !important;
        border: none !important;
    }
    .contact-page .header-top-area .navbar-toggle .icon-bar {
        background: #2d61e9 !important;
    }
    .contact-page .header-top-area .navbar-collapse {
        width: 100% !important;
        padding: 8px 0 !important;
        border-top: 1px solid #eee !important;
        background: #fff !important;
    }
    .contact-page .header-top-area .navbar-nav {
        float: none !important;
        width: 100% !important;
        margin: 0 !important; /* override inline margin-top */
    }
    .contact-page .header-top-area .navbar-nav > li {
        float: none !important;
    }
    .contact-page .header-top-area .navbar-nav > li > a {
        display: block !important;
        padding: 12px 16px !important;
        color: #333 !important;
        border-bottom: 1px solid #f2f2f2 !important;
        text-align: right !important; /* RTL-friendly */
    }
    .contact-page .header-top-area .navbar-nav > li:last-child > a {
        border-bottom: 0 !important;
    }
    /* Dropdowns inside collapsed menu */
    .contact-page .header-top-area .navbar-nav .dropdown-toggle .caret {
        border-top-color: #2d61e9 !important;
    }
    .contact-page .header-top-area .navbar-nav .open > .dropdown-menu,
    .contact-page .header-top-area .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        display: none; /* default hidden */
        border: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
    .contact-page .header-top-area .navbar-nav .open > .dropdown-menu {
        display: block !important; /* show when .open */
    }
    .contact-page .header-top-area .navbar-nav .dropdown-menu > li > a {
        padding: 11px 22px !important;
        color: #333 !important;
        border-bottom: 1px solid #f2f2f2 !important;
    }
}

/* Custom Styles for Cyprus Investment Company Website */

/* Service Cards */
.clickable-service {
    cursor: pointer;
}

/* Global overflow guard for small screens */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

.clickable-service:focus {
    outline: 2px solid #007bff;
    outline-offset: 4px;
}

/* Navigation Scroll Effects */
.header-top-area.menu-bg .navbar-default .navbar-nav > li > a {
    color: #111 !important;
}

.header-top-area.menu-bg .logo a {
    color: #111 !important;
}

.header-top-area.menu-bg {
    background: #fff !important;
}

/* Horizontal Feature Scroll */
.feature-scroll-wrapper {
    position: relative;
}

.feature-scroll-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 52px 10px 52px;
    scroll-snap-type: x mandatory;
}

.feature-scroll-track::-webkit-scrollbar {
    height: 8px;
}

.feature-scroll-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.feature-scroll-track::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.feature-scroll-track::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.feature-item {
    flex: 0 0 240px;
    scroll-snap-align: start;
}

@media (min-width: 600px) {
    .feature-item {
        flex: 0 0 260px;
    }
}

@media (min-width: 992px) {
    .feature-item {
        flex: 0 0 280px;
    }
}

.feature-item .sec {
    height: 100%;
}

.fs-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    cursor: pointer;
    transition: .25s;
    z-index: 5;
}

.fs-btn:hover {
    background: #222;
    color: #fff;
}

.fs-btn.prev {
    right: 0;
}

.fs-btn.next {
    left: 0;
}

.fs-btn:disabled {
    opacity: .35;
    cursor: default;
}

.feature-scroll-wrapper:focus-within .fs-btn {
    opacity: 1;
}

.feature-scroll-track.dragging {
    scroll-behavior: auto;
    cursor: grabbing;
}

/* Blog Horizontal Carousel */
.blog-carousel-section {
    position: relative;
}

.blog-scroll-wrapper {
    position: relative;
    padding: 10px 60px 10px 60px;
}

.blog-scroll-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 4px 12px 4px;
}

.blog-scroll-track::-webkit-scrollbar {
    height: 8px;
}

.blog-scroll-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.blog-scroll-track::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.blog-scroll-track::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.blog-item {
    flex: 0 0 250px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: .3s;
    display: flex;
}

@media (min-width: 600px) {
    .blog-item {
        flex: 0 0 280px;
    }
}

@media (min-width: 992px) {
    .blog-item {
        flex: 0 0 300px;
    }
}

.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.blog-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: #222;
}

.blog-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: block;
}

.blog-body {
    padding: 14px 16px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-title {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    font-weight: 600;
}

.blog-excerpt {
    font-size: 12.8px;
    line-height: 1.8;
    margin: 0;
    color: #555;
}

.blog-more {
    margin-top: 4px;
    font-size: 12px;
    color: #007bff;
    display: inline-block;
}

.blog-stat {
    font-size: 11.5px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    cursor: pointer;
    transition: .25s;
    z-index: 6;
}

.blog-nav-btn:hover {
    background: #222;
    color: #fff;
}

.blog-prev {
    right: 8px;
}

.blog-next {
    left: 8px;
}

.blog-nav-btn:disabled {
    opacity: .35;
    cursor: default;
}

.blog-scroll-track.dragging {
    scroll-behavior: auto;
    cursor: grabbing;
}

/* Portfolio Card Redesign */
.portfolio .portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.portfolio .portfolio-container .work {
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
    flex: 0 0 calc(25% - 21px); /* 4 per row on lg */
}

@media (max-width: 1199px) {
    .portfolio .portfolio-container .work {
        flex: 0 0 calc(33.333% - 19px);
    }
}

@media (max-width: 991px) {
    .portfolio .portfolio-container .work {
        flex: 0 0 calc(50% - 18px);
    }
}

@media (max-width: 575px) {
    .portfolio .portfolio-container .work {
        flex: 0 0 100%;
    }
}

.portfolio .portfolio-container .work > a {
    display: block;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .25);
    height: 100%;
    transition: box-shadow .4s, transform .4s;
}

.portfolio .portfolio-container .work > a:focus {
    outline: 2px solid #2d61e9;
    outline-offset: 2px;
}

.portfolio .portfolio-container .work img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform .75s cubic-bezier(.22, .61, .36, 1);
}

/* Portfolio Overlay */
.portfolio .portfolio-container .work .work-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 22px 20px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.55) 100%);
    opacity: 0;
    transition: opacity .45s ease;
}

.portfolio .portfolio-container .work .work-info {
    color: #fff;
    direction: rtl;
    text-align: right;
}

.portfolio .portfolio-container .work .work-info h2 {
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 4px;
    font-weight: 600;
    color: #fff;
}

.portfolio .portfolio-container .work .work-info p {
    font-size: 12.5px;
    margin: 0 0 6px;
    color: #e2e6ea;
}

.portfolio .portfolio-container .work .work-info i {
    color: #2d8bff;
    font-size: 20px;
}

/* Portfolio Hover/Focus Effects */
.portfolio .portfolio-container .work > a:hover img,
.portfolio .portfolio-container .work > a:focus img {
    transform: scale(1.08);
}

.portfolio .portfolio-container .work > a:hover,
.portfolio .portfolio-container .work > a:focus {
    box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .35);
}

.portfolio .portfolio-container .work > a:hover .work-inner,
.portfolio .portfolio-container .work > a:focus .work-inner {
    opacity: 1;
}

/* Portfolio Filter Bar */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 30px;
    padding: 0;
}

.portfolio-filter .filter {
    list-style: none;
    cursor: pointer;
    padding: 10px 18px;
    background: #f2f6fb;
    color: #2d3e55;
    font-size: 13px;
    border-radius: 30px;
    font-weight: 500;
    transition: .3s;
    border: 1px solid #d8e2ee;
}

.portfolio-filter .filter.active,
.portfolio-filter .filter:hover {
    background: #2d61e9;
    color: #fff;
    border-color: #2d61e9;
}

/* Portfolio Animation */
.portfolio .portfolio-container .work {
    animation: fadeInUp .7s ease both;
}

.portfolio .portfolio-container .work:nth-child(2) {
    animation-delay: .05s;
}

.portfolio .portfolio-container .work:nth-child(3) {
    animation-delay: .1s;
}

.portfolio .portfolio-container .work:nth-child(4) {
    animation-delay: .15s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Layout Fixes */
.portfolio .row.portfolio-container {
    margin: 0; /* neutralize bootstrap row negative margins */
}

.portfolio .portfolio-container:before,
.portfolio .portfolio-container:after {
    display: none !important;
}

/* Portfolio Section Spacing */
section.portfolio {
    padding-bottom: 60px;
}

/* Portfolio Filter Hidden State */
.portfolio .portfolio-container .work.is-hidden {
    pointer-events: none;
    opacity: 0;
    transform: scale(.92);
    transition: opacity .35s ease, transform .35s ease;
}