﻿/**
 * Image-Text Block Styles
 * 
 * Reusable section with image and text side by side.
 * Supports: image-left, image-right layouts
 * 
 * @package Sports_Legacy
 */

/* ========================================
   IMAGE-TEXT BLOCK - BASE STYLES
   ======================================== */

.image-text-block {
    padding: 5rem 0;
    overflow: hidden;
}

.image-text-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Columns */
.image-text-block .image-column,
.image-text-block .text-column {
    flex: 1 1 50%;
    min-width: 300px;
}

.image-text-block .image-column {
    flex-basis: var(--image-width, 50%);
}

.image-text-block .text-column {
    flex-basis: calc(100% - var(--image-width, 50%));
}

/* ========================================
   LAYOUT VARIANTS
   ======================================== */

/* Image Left (default) */
.image-text-block.layout-image-left .image-text-container {
    flex-direction: row;
}

.image-text-block.layout-image-left .image-column {
    padding-right: 3rem;
}

/* Image Right */
.image-text-block.layout-image-right .image-text-container {
    flex-direction: row-reverse;
}

.image-text-block.layout-image-right .image-column {
    padding-left: 3rem;
}

/* ========================================
   VERTICAL ALIGNMENT
   ======================================== */

.image-text-block.align-top .image-text-container {
    align-items: flex-start;
}

.image-text-block.align-center .image-text-container {
    align-items: center;
}

.image-text-block.align-bottom .image-text-container {
    align-items: flex-end;
}

/* ========================================
   IMAGE COLUMN
   ======================================== */

.image-text-block .image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.image-text-block .image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-text-block:hover .image-wrapper img {
    transform: scale(1.02);
}

/* Image with decorative accent */
.image-text-block .image-wrapper::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 60%;
    height: 60%;
    background: var(--cf-primary);
    opacity: 0.1;
    border-radius: 8px;
    z-index: -1;
    transition: all 0.3s ease;
}

.image-text-block:hover .image-wrapper::after {
    bottom: -15px;
    right: -15px;
    opacity: 0.15;
}

/* Image placeholder */
.image-text-block .image-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 8px;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.image-text-block .image-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
}

/* ========================================
   TEXT COLUMN
   ======================================== */

.image-text-block .text-content {
    padding: 2rem 0;
}

.image-text-block .block-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.image-text-block .block-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 2px;
    background: currentColor;
}

.image-text-block .block-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
}

.image-text-block .block-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.image-text-block .block-content p {
    margin-bottom: 1rem;
}

.image-text-block .block-content p:last-child {
    margin-bottom: 0;
}

/* Lists in content */
.image-text-block .block-content ul,
.image-text-block .block-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.image-text-block .block-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.image-text-block .block-content ul li::marker {
    color: var(--cf-primary);
}

/* CTA Button */
.image-text-block .block-cta {
    margin-top: 2rem;
}

.image-text-block .cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-text-block .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* ========================================
   ANIMATION VARIANTS
   ======================================== */

.image-text-block.animate-on-scroll .image-column,
.image-text-block.animate-on-scroll .text-column {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.image-text-block.animate-on-scroll.layout-image-left .image-column {
    transform: translateX(-30px);
}

.image-text-block.animate-on-scroll.layout-image-right .image-column {
    transform: translateX(30px);
}

.image-text-block.animate-on-scroll .image-column.visible,
.image-text-block.animate-on-scroll .text-column.visible {
    opacity: 1;
    transform: translate(0);
}

/* ========================================
   SPECIAL VARIANTS
   ======================================== */

/* Full Bleed Image */
.image-text-block.full-bleed-image .image-column {
    padding: 0;
}

.image-text-block.full-bleed-image .image-wrapper {
    border-radius: 0;
    box-shadow: none;
}

.image-text-block.full-bleed-image .image-wrapper::after {
    display: none;
}

/* Bordered Style */
.image-text-block.bordered .image-wrapper {
    border: 4px solid var(--cf-primary);
}

/* Dark Theme */
.image-text-block.dark-theme {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
}

.image-text-block.dark-theme .block-content {
    color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 992px) {
    .image-text-block .block-title {
        font-size: 2rem;
    }
    
    .image-text-block .image-column,
    .image-text-block .text-column {
        padding: 0 !important;
    }
    
    .image-text-block.layout-image-left .image-column,
    .image-text-block.layout-image-right .image-column {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .image-text-block {
        padding: 3rem 0;
    }
    
    .image-text-container {
        flex-direction: column !important;
        padding: 0 1.5rem;
    }
    
    .image-text-block .image-column,
    .image-text-block .text-column {
        flex-basis: 100% !important;
        min-width: 100%;
    }
    
    .image-text-block .image-column {
        margin-bottom: 2rem;
    }
    
    .image-text-block .block-title {
        font-size: 1.75rem;
    }
    
    .image-text-block .block-content {
        font-size: 1rem;
    }
    
    .image-text-block .text-content {
        padding: 1rem 0;
    }
    
    .image-text-block .image-wrapper::after {
        display: none;
    }
}

/* ========================================
   PARTNER/SPONSOR SHOWCASE VARIANT
   ======================================== */

.image-text-block.partner-showcase .image-wrapper {
    background: #fff;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-text-block.partner-showcase .image-wrapper img {
    max-width: 80%;
    height: auto;
    object-fit: contain;
}

/* Stats List in Content */
.image-text-block .stats-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.image-text-block .stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(45, 95, 63, 0.1);
    border-radius: 8px;
}

.image-text-block .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--cf-primary);
}

.image-text-block .stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}
