/*
Theme Name: Laxmi Theme
Theme URI: https://laxmimedia.in
Author: Laxmi Media
Author URI: https://laxmimedia.in
Description: A custom WordPress theme for Laxmi Media.
Version: 1.0
Text Domain: laxmi-theme
*/

/* Custom Header Scroll Logic */
#main-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#main-header.scrolled {
    background-color: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#main-header.scrolled #top-menu>li>a {
    color: #fff !important;
}

#main-header.scrolled .logo_container img {
    max-height: 40px;
    transition: max-height 0.4s ease;
}

/* Ensure original styles are preserved */
body {
    font-family: 'Open Sans', Arial, sans-serif;
}

/* Instagram Header Styling */
.custom-instagram-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    padding: 20px 0;
    margin-bottom: 20px;
    width: 100%;
}

.custom-instagram-header .sbi_header_link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    width: auto;
    /* ensure it doesn't take full width */
}

/* Ensure the text container inside link is flex too */
.custom-instagram-header .sbi_header_text {
    display: flex;
    align-items: center;
}

.custom-instagram-header .sbi_header_img {
    margin-right: 15px;
    position: relative;
    width: 60px;
    /* Slightly larger as per design */
    height: 60px;
    display: block;
}

.custom-instagram-header .sbi_header_img img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text Container */
.custom-instagram-header .sbi_feedtheme_header_text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-instagram-header .sbi_header_text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
    /* Assumption based on other parts */
}

.custom-instagram-header .sbi_bio {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
}

/* Follow Button Styling */
.custom-instagram-header .sbi_follow_btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    /* Pill shape */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.custom-instagram-header .sbi_follow_btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.custom-instagram-header .sbi_follow_btn svg {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* Hide original header elements if they still persist via CSS just in case */
.sb_instagram_header {
    display: none !important;
}

/* Ensure the SVG icon in the image is hidden or styled correctly */
.sbi_header_img_hover {
    display: none;
    /* Hide the hover overlay icon if not needed */
}

/* References Grid */
.references-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* Fixed 5 columns for desktop */
    gap: 0;
    margin: 40px 0;
    border-top: 1px solid #e1e1e1;
    border-left: 1px solid #e1e1e1;
}

.ref-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 180px;
    border-right: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #E8E4D9;
}

.ref-cell img {
    max-width: 95%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.ref-cell img:hover {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
    transform: scale(1.05);
}

.ref-cell.large-logo img {
    max-width: 100%;
    max-height: 100%;
    transform: scale(1.2);
}

.ref-cell.large-logo img:hover {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
    transform: scale(1.25);
}

@media (max-width: 1024px) {
    .references-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .references-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-cell.large-logo img {
        transform: scale(1.02);
    }

    /* Disable aggressive scaling on tap/hover for mobile to prevent overflow */
    .ref-cell img:hover,
    .ref-cell.large-logo img:hover {
        transform: none !important;
    }
}