/**
 * Cards Block Styles
 * 
 * Responsive card grid layout with multiple style variations
 */

/* Base Cards Block Styles */
.cards-block {
    padding: 5em 0;
    position: relative;
}

/* Admin Notice */
.cards-admin-notice {
    background: #e7f3ff;
    border: 1px solid #007cba;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.cards-admin-notice p {
    margin: 0;
    font-weight: 500;
}

/* Container */
.cards-container {
    max-width: 100%;
    background: #FFFFFF;
}

/* Container Header */
.cards-header {
    margin-bottom: 30px;
    text-align: center;
}

.cards-heading {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 400;
    color: #2c3e50;
    font-family: 'Open Sans', sans-serif;
}

.cards-heading span {
    font-weight: 700;
}

.cards-text {
    margin: 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.cards-text p {
    margin: 0 0 10px 0;
}

.cards-text p:last-child {
    margin-bottom: 0;
}

.cards-text strong {
    font-weight: 600;
    color: #333;
}

.cards-text em {
    font-style: italic;
}

.cards-text a {
    color: #007cba;
    text-decoration: none;
}

.cards-text a:hover {
    text-decoration: underline;
}

/* Cards Grid - Responsive by default */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 auto;
    justify-content: center;
}

/* Individual Card */
.card-item {
    position: relative;
    height: 100%;
    flex: 0 0 calc(25% - 15px);
    min-width: 180px;
    max-width: 100%;
}

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Card Link Wrapper */
.card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

/* Card Image - No cropping, maintain aspect ratio */
.card-image {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.card-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.card-item:hover .card-image img {
    transform: scale(1.02);
}

.card-item:hover .card-inner,
.card-item:hover .card-inner a {
    color: #FFFFFF;
    background: #a02237;
}

/* Card Content */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    margin-bottom: 10px;
}

.card-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.card-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.card-title-link:hover {
    color: #007cba;
    text-decoration: none;
}

.card-text {
    flex: 1;
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.card-text p {
    margin: 0 0 10px 0;
}

.card-text p:last-child {
    margin-bottom: 0;
}

/* Card Button */
.card-button {
    margin-top: auto;
    text-align: center;
}

.card-btn {
    display: inline-block;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.card-btn:hover {
    color: #333;
    text-decoration: none;
}

/* Card Alignment */
.cards-align-left .card-content {
    text-align: left;
}

.cards-align-center .card-content {
    text-align: center;
}

.cards-align-right .card-content {
    text-align: right;
}

/* Card Style Variations */

/* Standard Style */
.cards-style-standard .card-inner {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cards-style-standard .card-item:hover .card-inner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.cards-style-standard .card-image {
    margin: -20px -20px 15px -20px;
    padding: 10px;
}

/* Minimal Style */
.cards-style-minimal .card-inner {
    background: transparent;
    padding: 10px;
}

.cards-style-minimal .card-title h3 {
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
    display: inline-block;
}

.cards-style-minimal .card-btn {
    color: #000;
}

.cards-style-minimal .card-btn:hover {
    color: #333;
}

/* Bordered Style */
.cards-style-bordered .card-inner {
    background: white;
    border: 2px solid #007cba;
    border-radius: 12px;
    padding: 25px;
}

.cards-style-bordered .card-item:hover .card-inner {
    border-color: #005a87;
    box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.1);
}

.cards-style-bordered .card-image {
    margin: -25px -25px 15px -25px;
    border-radius: 10px 10px 0 0;
}

/* Elevated Style */
.cards-style-elevated .card-inner {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cards-style-elevated .card-item:hover .card-inner {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px);
}

.cards-style-elevated .card-image {
    margin: -25px -25px 15px -25px;
    border-radius: 10px 10px 0 0;
}

.cards-style-elevated .card-btn {
    color: #000;
}

.cards-style-elevated .card-btn:hover {
    color: #333;
}

/* Placeholder */
.cards-placeholder {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    color: #7f8c8d;
    font-style: italic;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .card-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        gap: 15px;
    }

    .card-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 250px;
    }

    .cards-heading {
        font-size: 28px;
    }

    .card-inner {
        padding: 15px;
    }

    .cards-style-standard .card-image,
    .cards-style-bordered .card-image,
    .cards-style-elevated .card-image {
        margin: -15px -15px 15px -15px;
    }

    .card-image {
        min-height: 160px;
    }

    .card-title h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        gap: 12px;
    }

    .card-item {
        flex: 0 0 100%;
        min-width: auto;
    }

    .cards-heading {
        font-size: 24px;
    }

    .cards-text {
        font-size: 14px;
    }

    .card-inner {
        padding: 12px;
    }

    .cards-style-standard .card-image,
    .cards-style-bordered .card-image,
    .cards-style-elevated .card-image {
        margin: -12px -12px 12px -12px;
    }

    .card-image {
        min-height: 140px;
    }

    .card-title h3 {
        font-size: 16px;
    }

    .card-btn {
        font-size: 14px;
    }
}