/**
 * Mayflower Magazine Related Posts
 * Plugin Styles
 * Version: 1.5.1
 */

/**
 * Latest Post – Special Effects
 */
div.mayflower-latest .mask,
div.mayflower-latest .content {
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
}

div.mayflower-latest img {
    display: block;
    position: relative;
    transition: all 0.2s linear;
}

div.mayflower-latest h2, div.mayflower-latest h3 {
    text-transform: uppercase;
    color: #fff;
    font-size: 0.9em;
    font-weight: bold;
    padding: 10px;
}

div.mayflower-latest p {
    font-family: Georgia, serif;
    font-size: 0.9rem;
    position: relative;
    color: #fff;
    padding: 0;
    text-align: center;
}

div.mayflower-latest a.info {
    display: inline-block;
    text-decoration: none;
    padding: 7px 14px;
    background: #000;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 0 1px #000;
}

div.mayflower-latest a.info:hover {
    box-shadow: 0 0 5px #000;
}

div.mayflower-latest .mask {
    opacity: 0;
    background-color: rgba(236, 116, 4, 0.95);
    transition: all 0.4s ease-in-out;
}

div.mayflower-latest h2 {
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

div.mayflower-latest p {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.2s linear;
}

div.mayflower-latest a.info {
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

div.mayflower-latest:hover img {
    transform: scale(1.1);
}

div.mayflower-latest:hover .mask {
    opacity: 1;
}

div.mayflower-latest:hover h2,
div.mayflower-latest:hover p,
div.mayflower-latest:hover a.info {
    opacity: 1;
    transform: translateY(0px);
}

div.mayflower-latest:hover p {
    transition-delay: 0.1s;
}

div.mayflower-latest:hover a.info {
    transition-delay: 0.2s;
}

/**
 * Related Posts Styling
 */
h3.mf-related-posts-title {
    text-transform: uppercase;
    color: #1a1a1a;
    font-size: 0.9em;
}

/**
 * Grid Layout with Responsive Columns
 */
div.mayflower-related-posts {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Mobile: 1 column (default) */
div.mayflower-related-posts {
    grid-template-columns: 1fr;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    div.mayflower-related-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: Configurable columns (1-6) */
@media (min-width: 1024px) {
    div.mayflower-related-posts-cols-1 {
        grid-template-columns: 1fr;
    }

    div.mayflower-related-posts-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    div.mayflower-related-posts-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    div.mayflower-related-posts-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    div.mayflower-related-posts-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }

    div.mayflower-related-posts-cols-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

div.mayflower-related-posts img {
    transition: all 0.4s ease-out;
    box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    display: block;
}

div.mayflower-related-posts img:hover {
    box-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.75);
    transition: all 0.4s ease-in-out;
}

/**
 * Align Support (Wide/Full Width)
 * Fallback CSS wenn Theme keinen Support hat
 */
.wp-block-mf-related-posts-related-posts {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-mf-related-posts-related-posts.alignwide {
    max-width: 1200px;
    width: 100%;
}

.wp-block-mf-related-posts-related-posts.alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}