/**
 * Cards with Buttons Widget Styles
 *
 * Professional call-to-action section styling with cards and action buttons.
 * Includes responsive design, hover effects, and accessibility features.
 *
 * @package CleanlistElementorWidgets
 * @since 1.0.0
 */

/* =============================
   MAIN CONTAINER
   ============================= */

.cards-buttons-container {
    background-color: #F7F8FA;
    padding: 80px 0;
    position: relative;
}

.cards-buttons-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* =============================
   HEADER SECTION
   ============================= */

.cards-buttons-header {
    margin-bottom: 60px;
}

.cards-buttons-header-text {
    color: #22813F;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

h2.cards-buttons-title {
    color: #263238;
    font-size: 30px;
    font-weight: 600;
    line-height: 40px;
}

.cards-buttons-description {
    color: #263238;
    font-size: 15px;
    line-height: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* =============================
   CARDS GRID
   ============================= */

.cards-buttons-grid {
    display: grid;
    gap: 60px;
    align-items: stretch;
    max-width: 1150px;
    margin: 0 auto;

    @media (min-width: 768px) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =============================
   INDIVIDUAL CARDS
   ============================= */

.cards-buttons-card {
    background: #ffffff;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 300px;
}

/* Card hover effects */
.cards-buttons-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Focus visibility for accessibility */
.cards-buttons-card:focus-within {
    outline: 2px solid #22813F;
    outline-offset: 2px;
}

/* =============================
   CARD CONTENT
   ============================= */

h3.cards-buttons-card-title {
    color: #263238;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
    margin-bottom: 16px;
    word-wrap: break-word;
    flex-grow: 0;
}

.cards-buttons-card-description {
    color: #263238;
    font-size: 15px;
    line-height: 30px;
    margin-bottom: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* =============================
   BUTTONS
   ============================= */

.cards-buttons-button {
    border: 2px solid #22813F;
    border-radius: 6px;
    color: #22813F;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    text-align: center;
    margin-top: 30px;
}

/* Button hover effects */
.cards-buttons-button:hover {
    background-color: #14662D;
    border-color: #14662D;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Button focus effects for accessibility */
.cards-buttons-button:focus {
    outline: 3px solid rgba(76, 175, 80, 0.5);
    outline-offset: 2px;
}

/* Button active state */
.cards-buttons-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

/* Button text styling */
.cards-buttons-button-text {
    font-weight: 500;
    letter-spacing: 0.25px;
}

/* Button icon styling */
.cards-buttons-button-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.cards-buttons-button:hover .cards-buttons-button-icon {
    transform: translateX(3px);
}

/* =============================
   RESPONSIVE ADJUSTMENTS
   ============================= */

@media (max-width: 1024px) {
    .cards-buttons-container {
        padding: 60px 0;
    }

    .cards-buttons-grid {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .cards-buttons-container {
        padding: 50px 0;
    }

    .cards-buttons-header {
        margin-bottom: 40px;
    }

    h2.cards-buttons-title {
        margin-bottom: 16px;
    }

    .cards-buttons-grid {
        gap: 20px;
    }

    .cards-buttons-card {
        padding: 30px 20px;
        min-height: 280px;
    }

    h3.cards-buttons-card-title {
        margin-bottom: 14px;
    }

    .cards-buttons-button {
        font-size: 0.875rem;
        padding: 10px 20px;
        min-width: 160px;
    }
}

@media (max-width: 640px) {
    .cards-buttons-wrapper {
        padding: 0 16px;
    }
}

/* =============================
   ACCESSIBILITY ENHANCEMENTS
   ============================= */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cards-buttons-card {
        border: 2px solid #263238;
    }

    .cards-buttons-button {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cards-buttons-card,
    .cards-buttons-button,
    .cards-buttons-button-icon {
        transition: none;
    }

    .cards-buttons-card:hover {
        transform: none;
    }

    .cards-buttons-button:hover {
        transform: none;
    }

    .cards-buttons-button:hover .cards-buttons-button-icon {
        transform: none;
    }
}

/* =============================
   PRINT STYLES
   ============================= */

@media print {
    .cards-buttons-container {
        background: white !important;
        box-shadow: none !important;
    }

    .cards-buttons-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .cards-buttons-button {
        border: 1px solid #22813F !important;
        background: white !important;
        color: #22813F !important;
    }
}

/* =============================
   CUSTOM VARIATIONS
   ============================= */

/* Alternative button style (outline) */
.cards-buttons-container.outline-buttons .cards-buttons-button {
    background-color: transparent;
    color: #22813F;
}

.cards-buttons-container.outline-buttons .cards-buttons-button:hover {
    background-color: #22813F;
    color: #ffffff;
}

/* Centered layout variation */
.cards-buttons-container.centered-layout .cards-buttons-grid {
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Compact spacing variation */
.cards-buttons-container.compact-spacing .cards-buttons-card {
    padding: 30px 20px;
    min-height: 250px;
}

.cards-buttons-container.compact-spacing .cards-buttons-header {
    margin-bottom: 40px;
}

/* =============================
   RTL (Right-to-Left) SUPPORT
   ============================= */

[dir="rtl"] .cards-buttons-button-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .cards-buttons-button:hover .cards-buttons-button-icon {
    transform: scaleX(-1) translateX(3px);
}