/* //internal-bookmark-card/internal-bookmark-card.css version 2.9 - Fixed Hover Cursor Logic for Service Hub */

/* --- Default Card (Image on Left) --- */
.internal-bookmark-card {
    display: flex; 
    border: 1px solid #e0e0e0;
    border-radius: 8px; 
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    /* FIX: REMOVED cursor: pointer; from the main card container */
    transition: box-shadow 0.2s ease-in-out;
    height: auto; /* Ensure the main card container is flexible */
        text-decoration: none !important;

}

/* Hover effect on the entire card */
.internal-bookmark-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


/* ------------------------------------------------------------------ */
/* NEW FIX: Apply pointer cursor ONLY to clickable elements/containers  */
/* ------------------------------------------------------------------ */
.internal-bookmark-card-link-wrapper, /* Applies to standard internal/external cards */
.ibc-service-button /* Applies to the individual buttons in the Service Hub */
{
    cursor: pointer;
}
/* ------------------------------------------------------------------ */


/* --- Link overlay styling (unchanged) --- */
.internal-bookmark-card .ibc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: transparent; 
    text-decoration: none; 
}

/* ======================================================== */
/* --- External Card Specific Adjustments (Maps & Images) --- */
/* ======================================================== */

/* 1. Overall External Card Container - DESKTOP */
.internal-bookmark-card-external {
    height: auto; 
    align-items: stretch;
    flex-direction: row; /* Ensure side-by-side on desktop */
}

/* 2. Image Area Sizing and Overflow Control - DESKTOP */
.internal-bookmark-card-external .internal-bookmark-card-image {
    /* DESKTOP WIDTH/SIZE */
    flex: 0 0 200px; 
    width: 200px;
    max-height: 150px; 
    overflow: hidden; 
    position: relative;
    border-radius: 0; 
}

.internal-bookmark-card-external .internal-bookmark-card-image img {
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    display: block;
    border-radius: 0; 
}

/* 3. Content Area Sizing and Spacing - DESKTOP */
.internal-bookmark-card-external .internal-bookmark-card-content {
    padding: 6px 15px; /* Tighter padding */
    /* justify-content: space-between;  */
    overflow: visible; /* Allows content to stretch container */
}

/* 4. Minimize Margins on Text Elements - DESKTOP */
.internal-bookmark-card-external .internal-bookmark-card-tag {
    margin-bottom: 2px;
}

.internal-bookmark-card-external .internal-bookmark-card-title {
    margin-bottom: 0; 
}

.internal-bookmark-card-external .internal-bookmark-card-excerpt {
    margin-top: 2px; 
    margin-bottom: 0; 
    display: block; /* Ensure it behaves like a normal block element */
    -webkit-line-clamp: unset; 
    -webkit-box-orient: unset;
    overflow: visible;
}
p.internal-bookmark-card-excerpt{
    font-size: .8rem;
}
.internal-bookmark-card-service-hub p{
    text-align: center;
}
.internal-bookmark-card-external .read-more {
    margin-top: 0; 
    padding-top: 2px;
    margin-bottom: 0; 
}

/* ======================================================== */
/* --- General Card Element Styles (Internal & Default) --- */
/* ======================================================== */

.internal-bookmark-card-image {
    /* Default internal image size on desktop */
    flex: 0 0 150px; 
    overflow: hidden;
    position: relative;
}

.internal-bookmark-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.internal-bookmark-card-content {
    flex: 1;
    padding: 15px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 5; 
    overflow: hidden;
}

.internal-bookmark-card-title {
    color: rgba(26, 32, 44);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1px;
    text-transform: capitalize;
}

.internal-bookmark-card-tag {
    color: #1a73e8; 
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
}

.internal-bookmark-card-icon-wrapper {
    /* Wrapper for all icons to control size/spacing */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.internal-bookmark-card-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin-right: .5rem; 
}

.internal-bookmark-card-excerpt {
    font-size: 0.9em;
    color: #2e2e2e;
    margin-bottom: 1px;
    line-height: 1.5;
}

.internal-bookmark-card .read-more {
    text-align: right;
    color: #1a73e8; 
    font-weight: 500;
}

/* ======================================================== */
/* --- NEW: Service Hub Card (linkto="services") Layout --- */
/* ======================================================== */

.internal-bookmark-card-service-hub {
    /* Base Card container, override flex for this layout */
    display: block; 
    padding: 0;
    height: auto;
}

.internal-bookmark-card-service-hub .internal-bookmark-card-content {
    /* Use padding only for the top content area */
    padding: 15px 15px 0 15px; 
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible; /* Ensure content flows */
}

/* Text adjustments for the Service Hub card */
.internal-bookmark-card-service-hub .internal-bookmark-card-title {
    margin-bottom: 8px;
    font-size: 20px;
}

.internal-bookmark-card-service-hub .internal-bookmark-card-excerpt {
    margin-bottom: 15px;
}

/* --- 3-Button Flex Group Container --- */
.ibc-service-button-group {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    width: 100%;
    margin-top: auto; 
    border-top: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

/* --- Individual Service Button --- */
.ibc-service-button {
    flex: 1 1 33.33%; /* 3 columns */
    position: relative;
    height: 120px; /* Fixed height for the button/image area */
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-decoration: none;
    /* cursor: pointer; is now applied via the new rule above */
    overflow: hidden;

    /* Background Image Styling */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

/* Divider Effect using right border, removing it on the last child */
.ibc-service-button:not(:last-child) {
    border-right: 1px solid #e0e0e0;
}

.ibc-service-button:hover {
    transform: scale(1.02);
}

/* --- Overlay and Content --- */
.ibc-service-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* White 85% opacity overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: background-color 0.2s ease;
}

.ibc-service-button:hover .ibc-service-button-overlay {
    background-color: rgba(255, 255, 255, 0.95); /* Slightly less opaque on hover */
}

.ibc-service-button-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

.ibc-service-button-text {
    color: #1a73e8; 
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

.ibc-service-button-action {
    position: absolute;
    bottom: 5px;
    font-size: 0.8em;
    color: #1a73e8;
    font-weight: 600;
}

/* ======================================================== */
/* --- Responsive adjustments for Mobile (max-width: 640px) --- */
/* ======================================================== */
@media (max-width: 640px) {
    /* 1. General Stacking for ALL Cards */
    .internal-bookmark-card {
        flex-direction: column; 
        height: auto !important; 
    }
    
    /* 2. Image Area Styling for ALL stacked cards */
    .internal-bookmark-card-image {
        /* This applies to ALL card images on mobile (Internal and External) */
        flex: none !important; 
        width: 100% !important; 
        height: 180px; 
        position: relative; 
        border-radius: 8px 8px 0 0; 
    }
    
    .internal-bookmark-card-image img {
        border-radius: 8px 8px 0 0; 
        object-fit: cover !important; 
    }
    
    /* 3. Content Area Styling for ALL stacked cards */
    .internal-bookmark-card-content {
        padding: 15px; 
        justify-content: flex-start !important; 
    }

    /* 4. Reset External Card Mobile Styles to Match Internal Cards */
    .internal-bookmark-card-external {
        height: auto !important; 
        flex-direction: column !important;
    }

    .internal-bookmark-card-external .internal-bookmark-card-image {
        flex: none !important;
        width: 100% !important;
    }
    
    /* Reset text styles for normal stacking flow */
    .internal-bookmark-card-external .internal-bookmark-card-title,
    .internal-bookmark-card-external .internal-bookmark-card-excerpt {
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
        display: block; 
        color: inherit;
        margin-bottom: 8px; 
        margin-top: 0;
        overflow: visible; 
    }
    
    /* Adjust Read More alignment for mobile (bottom right) */
    .internal-bookmark-card-external .read-more {
        text-align: right; 
        margin-top: 10px; 
        padding-top: 0;
    }

    /* --- Service Hub Mobile Stacking --- */
    .ibc-service-button-group {
        flex-direction: column; /* Stack buttons vertically on mobile */
    }

    .ibc-service-button {
        flex: none; /* Reset flex */
        width: 100%;
        height: 80px; /* Smaller height for mobile buttons */
        border-right: none !important; /* Remove vertical divider */
        border-bottom: 1px solid #e0e0e0; /* Add horizontal divider */
    }
    
    .ibc-service-button:last-child {
        border-bottom: none; /* Remove divider on the last button */
    }
    
    .ibc-service-button-overlay {
        flex-direction: row; /* Horizontal layout for content inside button */
        justify-content: flex-start;
        padding-left: 20px;
    }
    
    .ibc-service-button-icon {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .ibc-service-button-text {
        text-align: left;
    }
    
    .ibc-service-button-action {
        /* Keep positioned right/bottom */
        font-size: 0.8em;
    }
}
/* --- New Minimal Icon Group for linkto="services2" --- */

/* * This DIV acts as the single container for grouping the icons 
 * and allowing positioning (like float: right or flex-end) via CSS.
 */
#services2-icon-group,
.ibc-minimal-icons {
    /* Changed to column to stack the icon row and the text */
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: center; /* Centers items horizontally */
    
    /* --- PILL SHAPE STYLING --- */
    gap: 0; /* Remove gap between stacked icon row and text */
    padding: 4px 8px 2px 8px; /* Adjusted padding: more on top, less on bottom */
    margin: 0 0 4px 10px; /* Margin on left when floating right for separation */
    border: 1px solid #ccc; /* Soft gray border for the pill */
    border-radius: 20px; /* Large radius for the pill shape */
    background-color: #fff; /* White background */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Very soft shadow */
    
    line-height: 1; 
    float: right; /* Use float to pull the entire group to the right of text */
    clear: none;
    cursor: default; /* Change cursor since the pill itself is now just a container */
}

/* New: Container for the 3 icons (Must use flex to keep them in a row) */
.ibc-minimal-icons-row {
    display: flex;
    align-items: center;
    gap: 4px; /* Space between icons */
    padding: 0;
    margin-bottom: 2px; /* Small space between icons and text */
}

/* New: Styling for the 'RESEARCH' text */
.ibc-minimal-icons-text {
    font-family: inherit; /* Use the site's default font */
    font-size: 9px; /* Very small text */
    font-weight: 700; /* Bold for clarity */
    color: #888; /* Soft gray color */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 0; 
}


/* Styling for the icon link (the A tag) */
.ibc-minimal-icons .ibc-service-icon-link {
    display: inline-block;
    padding: 2px;
    border-radius: 10px; 
    text-decoration: none;
    transition: background-color 0.1s;
}

.ibc-minimal-icons .ibc-service-icon-link:hover {
    background-color: #f0f0f0; 
}

/* Styling for the icon image itself (the IMG tag) */
.ibc-minimal-icons .ibc-service-icon-image {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    border-radius: 2px;
}