/* =================================================================
   THREE COLUMNS SECTION BLOCK - Pixel-perfect implementation
   Based on Kredlo design measurements
   ================================================================= */

.three-columns-section {
    position: relative;
    width: 100%;
    padding: 120px 0; /* Increased vertical spacing to match reference */
}

/* Full width alignment support */
.three-columns-section.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
}

/* =================================================================
   SECTION HEADLINE
   ================================================================= */
.three-columns-section__headline {
    font-size: 36px; /* Larger to match design */
    font-weight: 800;
    line-height: 1.2;
    color: #000000;
    margin: 0 0 80px 0; /* Increased spacing to grid to match reference */
    text-align: center;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* =================================================================
   THREE COLUMNS GRID
   ================================================================= */
.three-columns-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Equal width columns */
    gap: 27px; /* Optimized spacing between columns to match reference */
    align-items: start;
}

/* Individual Column - Card Style */
.three-columns-section__column {
    background: #0002331A; /* White card background from design */
    border-radius: 12px; /* Rounded corners from design */
    padding: 50px 30px; /* Increased internal padding to match reference */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 290px; /* Increased card height to match reference */
    justify-content: center;
}

.column-toggle--text-active .three-columns-section__column,
.three-columns-section__column:hover {
    margin: -20px 0 -20px;
    min-height: 330px;
}

@media(max-width: 600px){
    .three-columns-section__column:hover{
        margin: auto;
    }
}

/* =================================================================
   COLUMN ICON
   ================================================================= */
.column__icon {
    width: 70px; /* Match the checkmark SVG size */
    height: 70px;
    border-radius: 50%;
    background-color: transparent; /* No background - icon has its own styling */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px auto 8px; /* Optimized spacing to title to match reference */
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.column__icon:hover {
    transform: scale(1.05);
}

.icon-svg {
    width: 70px;
    height: 70px;
    transition: transform 0.3s ease;
}

.column__icon:hover .icon-svg {
    transform: scale(1.1);
}

/* =================================================================
   COLUMN CONTENT
   ================================================================= */
.column__title {
    font-size: 20px; /* Larger to match design proportions in cards */
    font-weight: 700;
    line-height: 1.3;
    color: #000000;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Description removed to match reference design */

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Large desktop - increase spacing */
@media (min-width: 1400px) {
    .three-columns-section {
        padding: 120px 0;
    }

    .three-columns-section__headline {
        font-size: 36px;
        margin-bottom: 80px;
    }
}

/* Desktop adjustments */
@media (max-width: 1200px) {
    .three-columns-section__grid {
        gap: 30px;
    }

    .three-columns-section__headline {
        font-size: 28px;
    }

    .column__icon {
        width: 55px;
        height: 55px;
    }
}

/* Tablet - adjust spacing and icons */
@media (max-width: 768px) {
    .three-columns-section {
        padding: 80px 0;
    }

    .three-columns-section__grid {
        gap: 30px;
    }

    .three-columns-section__headline {
        font-size: 24px;
        margin-bottom: 50px;
    }

    .three-columns-section__column {
        padding: 30px 20px;
    }

    .column__icon {
        width: 50px;
        height: 50px;
        margin-bottom: 16px;
    }

    .icon-svg {
        width: 50px;
        height: 50px;
    }

    .column__title {
        font-size: 18px;
    }

    .column__description {
        font-size: 13px;
    }
}

/* Mobile - stack vertically */
@media (max-width: 600px) {
    .three-columns-section {
        padding: 60px 0;
    }

    .three-columns-section__grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 40px;
        margin: 0 auto;
    }

    .three-columns-section__headline {
        font-size: 22px;
        margin-bottom: 40px;
    }

    .three-columns-section__column {
        margin: 0 auto;
        padding: 25px 15px;
        width: 100%;
    }

    .column__icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }

    .column__title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .column__description {
        font-size: 12px;
        max-width: 250px;
    }
}

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

/* Focus states for interactive elements */
.column__icon:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .three-columns-section__headline {
        color: #000000;
    }

    .column__title {
        color: #000000;
    }

    .column__description {
        color: #333333;
    }

    .column__icon {
        border: 2px solid #000000;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .column__icon {
        transition: none;
    }

    .icon-svg {
        transition: none;
    }

    .column__icon:hover {
        transform: none;
    }

    .column__icon:hover .icon-svg {
        transform: none;
    }
}

/* =================================================================
   GUTENBERG EDITOR STYLES
   ================================================================= */

/* Editor-specific styles for better preview */
.block-editor-block-list__layout .three-columns-section {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.block-editor-block-list__layout .three-columns-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B5CF6, #F8F9FA);
    z-index: 10;
}

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

@media print {
    .three-columns-section {
        background: white !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        padding: 40px 0;
    }

    .three-columns-section__grid {
        gap: 30px;
    }

    .three-columns-section__headline {
        color: black !important;
    }

    .column__title {
        color: black !important;
    }

    .column__description {
        color: black !important;
    }

    .column__icon {
        background: #666 !important;
        box-shadow: none !important;
    }
}

/* =================================================================
   TOGGLE FUNCTIONALITY STYLES
   ================================================================= */

/* Make columns clickable */
.column-toggle {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Click indicator */
.column__click-indicator {
    margin-top: auto;
    padding-top: 16px;
    opacity: 0.7;
    font-size: 12px;
    color: #666;
    transition: opacity 0.3s ease;
}

.column-toggle:hover .column__click-indicator {
    opacity: 1;
}

/* Text view styling */
.column__text-view {
    display: none;
    text-align: left;
    transition: opacity 0.3s ease;
    flex-direction: column;
    justify-content: space-between;
}

.column__text-content {
    flex: 1;
}

.column-toggle--text-active .column__default-view {
    display: none;
}

.column-toggle--text-active .column__text-view {
    display: flex;
}

.column__text-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

/* Responsive adjustments for toggle functionality */
@media (max-width: 768px) {
    .column__text-view {
        min-height: 200px;
        padding: 20px 15px;
    }

    .column__text-content p {
        font-size: 13px;
    }

    .column__click-indicator {
        font-size: 11px;
        padding-top: 12px;
    }
}

@media (max-width: 600px) {
    .column__text-view {
        min-height: 180px;
        padding: 20px 12px;
    }

    .column__text-content p {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* Accessibility improvements for toggle */
@media (prefers-reduced-motion: reduce) {
    .column-toggle {
        transition: none;
    }

    .column__text-view {
        transition: none;
    }

    .column__click-indicator {
        transition: none;
    }

    .column-toggle:hover {
        transform: none;
    }
}
