/*
 * Final CSS for the Reynolds 100% Width Card (card-100) element.
 * MODIFIED for Background Zoom Effect and Mobile Scaling Fix
 */

.card-100 {
    position: relative;
    overflow: hidden;
    border-radius: 35px;
    min-height: 600px;
    
    /* FIX: Prevents base background from ghosting on mobile */
    background-image: none !important; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
    max-width: var(--site-container-width, 1100px);
    margin-left: auto;
    margin-right: auto;
    
    margin-top: 75px;
    margin-bottom: 75px;
}

/* * Pseudo-element to hold the background image and enable scaling. 
 * Uses the CSS variable --card-bg passed from PHP.
 */
.card-100::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* FIX: Pulls image URL from the CSS variable */
    background-image: var(--card-bg); 
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    transform: scale(1); /* Initial state: no zoom */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    
    z-index: 0; /* Placed behind all content and overlay */
    border-radius: inherit; /* Inherits the card's rounded corners */
    
    /* Improves performance on mobile browsers during transform */
    backface-visibility: hidden;
}

/* Apply the zoom transformation on hover and active (for touch) */
.card-100:hover::before,
.card-100:active::before {
    transform: scale(1.05); /* Zooms in 5% */
}

/* * MODIFIED: Increased z-index to place the overlay above 
 * the zooming background (::before at z-index: 0). 
 */
.card-100 .card-100-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 1; /* <-- CHANGED from 0 to 1 */
    border-radius: inherit;
}

/* * MODIFIED: Increased z-index to place the content above 
 * the new overlay (at z-index: 1). 
 */
.card-100 .card-100-content-wrapper {
    position: relative;
    z-index: 2; /* <-- CHANGED from 1 to 2 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 90%;
    width: 100%;
    color: #fff;
}

.card-100 .card-100-heading {
    margin: 0;
    color: inherit;
}

.card-100 .card-100-text-content {
    max-width: 700px;
    color: inherit;
}

.card-100 .card-100-text-content p {
    margin: 0px !important;
}

.card-100 .card-100-text-content a {
    color: #fff;
    text-decoration: underline;
}

.card-100 .card-100-text-content a:hover {
    text-decoration: none;
}

.card-100 .card-100-arrow {
    max-width: 100px;
    height: auto;
}

/* * Responsive styles for mobile devices 
 */
@media (max-width: 768px) {
    
    .card-100 {
        min-height: var(--min-height-images-mob, 400px);
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        border-radius: 0px;
        padding-left: 30px;
        padding-right: 30px;
    }

    .card-100-content-wrapper h2 {
        font-size: 1.6em !important;
    }

    .card-100-text-content p {
        font-size: 0.8em !important;
        line-height: normal;
    }

}

/* * Extra spacing to maintain original file structure 
 * and line count preferences.
 */