/* Custom styles for index page */

/* Body padding to account for fixed header */
body {
    padding-top: 100px; /* Account for header height */
}

/* Adjust when header becomes fixed */
body.header-fixed {
    padding-top: 80px; /* Account for smaller fixed header */
}

/* Preloader styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jumper {
    display: flex;
    gap: 10px;
}

.jumper > div {
    width: 10px;
    height: 10px;
    background-color: #f48840;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.jumper > div:nth-child(1) {
    animation-delay: -0.32s;
}

.jumper > div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* Hide preloader after page loads */
body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out;
}

/* Additional custom styles */
.main-banner {
    position: relative;
    margin-top: 0; /* Remove any top margin since body has padding */
}

/* Override banner padding from templatemo-stand-blog.css */
.owl-banner {
    padding-top: 0 !important; /* Remove the 110px padding since body has padding */
}

/* Ensure proper spacing for content sections */
.blog-posts {
    margin-top: 50px; /* Reduce from default 100px since we have body padding */
}

/* Fix header positioning */
header {
    position: fixed !important; /* Make header always fixed */
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
}

/* Ensure content has proper spacing from fixed header */
.container {
    position: relative;
}

.banner-h4 {
    color: #fff;
    text-decoration: none;
}

.banner-h4:hover {
    color: #f48840;
    text-decoration: none;
}

/* Blog post styles */
.blog-post {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.blog-thumb img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.blog-thumb:hover img {
    transform: scale(1.05);
}

/* Sidebar styles */
.sidebar-item {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.searchText {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.searchText:focus {
    outline: none;
    border-color: #f48840;
}

/* Navigation active state */
.navbar-nav .nav-item.active .nav-link {
    color: #f48840 !important;
}

/* New carousel card-style layout */
.owl-banner .item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.owl-banner .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.owl-banner .item .carousel-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.owl-banner .item .carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.owl-banner .item:hover .carousel-image img {
    transform: scale(1.05);
}

.owl-banner .item .carousel-content {
    padding: 20px;
    background: #fff;
}

.owl-banner .item .carousel-content .meta-category {
    margin-bottom: 10px;
}

.owl-banner .item .carousel-content .meta-category span {
    background: #f48840;
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.owl-banner .item .carousel-content .carousel-title {
    text-decoration: none;
    color: #2a2a2a;
}

.owl-banner .item .carousel-content .carousel-title h4 {
    color: #2a2a2a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 10px 0 15px 0;
    transition: color 0.3s ease;
}

.owl-banner .item .carousel-content .carousel-title:hover h4 {
    color: #f48840;
}

.owl-banner .item .carousel-content ul.post-info {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.owl-banner .item .carousel-content ul.post-info li {
    margin: 0;
}

.owl-banner .item .carousel-content ul.post-info li a {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.owl-banner .item .carousel-content ul.post-info li a:hover {
    color: #f48840;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-banner .item-content {
        padding: 20px;
    }
    
    .sidebar {
        margin-top: 30px;
    }
}

/* Products carousel nav positioning like banner */
.owl-products .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: 10;
}

.owl-products .owl-nav .owl-prev {
    position: absolute;
    left: 40px;
}

.owl-products .owl-nav .owl-next {
    position: absolute;
    right: 40px;
}

.owl-products .owl-nav button {
    outline: none;
}

/* Hide products nav on mobile, same as banner */
@media (max-width: 768px) {
    .owl-products .owl-nav {
        display: none;
    }
}