/* Reset & Base Styles */
/** {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    padding: 40px 20px;
}*/

/* Layout Container */
.container-section {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: var(--theme-padding);
    margin-bottom: var(--theme-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #1a1a1a;
}

/* Responsive 3-Column Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Card Wrapper (The Entire Card is a Link) */
.card-link-sip {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #d5d5d8; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lift effect on hover */
.card-link-sip:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Background Image Container */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 1;
}

/* Subtle image zoom on hover */
.card-link-sip:hover .card-bg {
    transform: scale(1.05);
}

/* Text Container */
.card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    width: 100%;
    color: #ffffff;
    isolation: isolate; 
    
    /* CRITICAL: Hides the gray cover as it slides past the bottom boundary */
    overflow: hidden; 
}

/* The sliding transparent cover layer sitting BEHIND the text */
.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 44, 52, 0.8); /* Slate-gray block */
    z-index: -1;
    
    /* Sets up the slide animation on the Y axis */
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Grayish block slides smoothly downwards when the card is hovered */
.card-link-sip:hover .card-content::before {
    transform: translateY(100%);
}

/* Typography */
.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); 
}

p.card-desc-sip {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}