/*
 * IOA What's On Section Widget Styles
 * S-Tier Edition: Includes Teleporter & Dev Mode Styles
 */

/* Scoped container for the "What's On" section */
.ioa-whatson-2025-final {
    /* Design System Variables */
    --color-title-1: #2E3A61;
    --color-highlight: #0AA7FF;
    --color-surface: #ffffff;
    --color-dark-bg: #2E3A61; /* Default Dark Slate Blue */
    --color-text-on-dark: #ffffff;
    --color-text-on-dark-secondary: #e2e8f0;

    /* Shadows */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing Scale */
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3.5rem;
    --space-4xl: 5rem;

    font-family: 'Inter', sans-serif;
    background-color: var(--color-dark-bg);
    color: var(--color-text-on-dark-secondary);
    width: 100%;
    height: 100%; /* Critical for Pillar height matching */
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

/* Scoped Reset */
.ioa-whatson-2025-final *,
.ioa-whatson-2025-final *::before,
.ioa-whatson-2025-final *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Support for Superscript and Subscript --- */
/* Ensures line-height doesn't break when using sup/sub */
.ioa-whatson-2025-final sup,
.ioa-whatson-2025-final sub {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.ioa-whatson-2025-final sup {
    top: -0.5em;
}

.ioa-whatson-2025-final sub {
    bottom: -0.25em;
}

/* =========================================
   TELEPORT SLOTS (Gold Standard Feature)
   ========================================= */
.ioa-teleport-slot {
    min-height: 0;
    transition: all 0.3s ease;
    margin-bottom: 0;
    width: 100%;
}

.ioa-teleport-slot.has-content {
    margin-bottom: 2rem;
    animation: ioa-fade-in 0.5s ease;
}

/* Editor Visuals - Visible only in Elementor Editor */
.is-editor-mode .ioa-teleport-slot {
    min-height: 40px;
    border: 1px dashed rgba(10, 167, 255, 0.3);
    background: rgba(10, 167, 255, 0.05);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.is-editor-mode .ioa-teleport-slot::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--color-highlight);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@keyframes ioa-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Layout & Container (Normal Mode) --- */
.ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl);
    width: 100%;
}

.ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

/* --- Header / Title --- */
.ioa-whatson-2025-final .ioa-title {
    font-family: 'Poppins', sans-serif;
    /* Font size removed to allow HTML Tag inheritance or Elementor Control override */
    font-weight: 600;
    color: var(--color-text-on-dark);
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    margin-top: 0;
}

/* --- Description --- */
.ioa-whatson-2025-final .ioa-description {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    color: var(--color-text-on-dark-secondary);
}

.ioa-whatson-2025-final .ioa-description p {
    margin-bottom: 1em;
}
.ioa-whatson-2025-final .ioa-description p:last-child {
    margin-bottom: 0;
}

/* --- Image / Visual --- */
.ioa-whatson-2025-final .ioa-visual-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.ioa-whatson-2025-final .ioa-newsletter-link {
    display: block;
    transition: var(--transition);
    max-width: 100%;
    /* Default to fit content so it can be controlled by widget width */
    width: fit-content; 
}

.ioa-whatson-2025-final .ioa-newsletter-link:hover {
    transform: translateY(-4px);
}

.ioa-whatson-2025-final .ioa-newsletter-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover; /* Ensures cropping works if height is forced */
}

/* --- Buttons --- */
.ioa-whatson-2025-final .ioa-buttons-wrapper {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: flex-start; /* Vertical align */
    width: 100%;
}

.ioa-whatson-2025-final .ioa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px; /* Default padding, overridable by widget */
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

/* Light Button Defaults */
.ioa-whatson-2025-final .ioa-btn-light {
    background-color: var(--color-surface);
    color: var(--color-title-1);
}
.ioa-whatson-2025-final .ioa-btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Outline Button Defaults */
.ioa-whatson-2025-final .ioa-btn-outline {
    background-color: transparent;
    color: var(--color-text-on-dark);
    border-color: rgba(255, 255, 255, 0.4);
}
.ioa-whatson-2025-final .ioa-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-on-dark);
}

/* --- Responsive (Mobile) Normal Mode --- */
@media (max-width: 900px) {
    .ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-text-content {
        text-align: center;
        order: 1;
    }

    .ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-visual-wrapper {
        order: 2;
        margin-bottom: var(--space-xl);
    }

    .ioa-whatson-2025-final:not(.ioa-compact-mode) .ioa-buttons-wrapper {
        justify-content: center;
        order: 3;
    }
}

/* =========================================
   COMPACT / PILLAR MODE
   ========================================= */

.ioa-whatson-2025-final.ioa-compact-mode {
    /* Pillar Styling: Vertical Flex */
    display: flex;
    flex-direction: column;
    height: 100%;
    
    /* Reset generic borders/radius */
    border-radius: 0; 
    box-shadow: none;
}

.ioa-whatson-2025-final.ioa-compact-mode .ioa-container {
    /* 1. Flexbox Column Layout */
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;

    /* 2. Standardized Padding (Overridable) */
    padding: 40px; 
    
    /* 3. Text Alignment */
    text-align: left;
}

/* Title Area (Common for all compact layouts) */
.ioa-whatson-2025-final.ioa-compact-mode .ioa-title {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle separator */
    flex-shrink: 0;
}

.ioa-whatson-2025-final.ioa-compact-mode .ioa-description {
    font-size: 15px;
    margin-bottom: 20px;
}

.ioa-whatson-2025-final.ioa-compact-mode .ioa-btn {
    /* By default in compact mode, buttons are full width, 
       but we allow overrides via specific helper classes now */
    width: 100%; 
    justify-content: center;
}
/* Allow custom width override in compact mode */
.ioa-whatson-2025-final.ioa-compact-mode .ioa-btn-width-custom .ioa-btn,
.ioa-whatson-2025-final.ioa-compact-mode .ioa-btn-width-auto .ioa-btn {
    width: auto;
}

/* 
   OPTION A: STACKED LAYOUT (Default)
   Vertical: Description -> Image -> Buttons
*/
.ioa-whatson-2025-final.ioa-compact-mode:not(.ioa-layout-side_left) .ioa-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
    flex-grow: 1;
}

.ioa-whatson-2025-final.ioa-compact-mode:not(.ioa-layout-side_left) .ioa-text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ioa-whatson-2025-final.ioa-compact-mode:not(.ioa-layout-side_left) .ioa-visual-wrapper {
    margin-top: auto; /* Push towards bottom if text is short */
    margin-bottom: 25px;
    flex-shrink: 0;
}

.ioa-whatson-2025-final.ioa-compact-mode:not(.ioa-layout-side_left) .ioa-buttons-wrapper {
    margin-top: 0;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    flex-shrink: 0;
}

/* 
   OPTION B: SIDE-BY-SIDE LAYOUT
   Image Left, Text Right, Buttons Bottom
*/
.ioa-whatson-2025-final.ioa-compact-mode.ioa-layout-side_left .ioa-grid {
    display: grid;
    /* 
       AUTO 1FR allows the image column (auto) to shrink/grow based on
       the Elementor Width Control, while text takes remaining space.
    */
    grid-template-columns: auto 1fr; 
    /* Two rows: Content (expands), Buttons (auto) */
    grid-template-rows: 1fr auto;
    grid-template-areas: 
        "image text"
        "buttons buttons";
    gap: 24px;
    height: 100%; /* Fill the container to push buttons down */
}

/* 1. Image Area */
.ioa-whatson-2025-final.ioa-compact-mode.ioa-layout-side_left .ioa-visual-wrapper {
    grid-area: image;
    width: 100%; /* Fill the 'auto' column allocated by grid */
    margin: 0;
    align-self: start; /* Align image to top of cell */
}

/* 2. Text Area */
.ioa-whatson-2025-final.ioa-compact-mode.ioa-layout-side_left .ioa-text-content {
    grid-area: text;
    text-align: left;
    margin-bottom: 0;
    min-width: 0; /* Prevents text overflow causing grid blowout */
}

/* 3. Buttons Area */
.ioa-whatson-2025-final.ioa-compact-mode.ioa-layout-side_left .ioa-buttons-wrapper {
    grid-area: buttons;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    /* Ensure it sticks to bottom of grid if content is short */
    align-self: end; 
}

/* Responsive Fallback for Side-by-Side */
@media (max-width: 768px) {
    .ioa-whatson-2025-final.ioa-compact-mode.ioa-layout-side_left .ioa-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 
            "text"
            "image"
            "buttons";
    }
}