/* 
 * IOA Governance Widget Styles - S-Tier Edition
 * Scoped to .ioa-association-2025-v2 to match JS Controller
 */

.ioa-association-2025-v2 {
    /* Base Variables - Default State */
    --color-bg: #f9fafb;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-secondary: #374151;
    --color-text-tertiary: #6b7280;
    --color-primary: #1e3a8a;
    --color-primary-dark: #1e40af;
    --color-border: #e5e7eb;
    
    /* Variables for Gradient Accents */
    --card-accent-start: var(--color-primary);
    --card-accent-end: var(--color-primary-dark);
    --card-accent-start-hover: var(--color-primary);
    --card-accent-end-hover: var(--color-primary);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    font-family: 'Inter', sans-serif;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.ioa-association-2025-v2 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   TELEPORT SLOTS (Feature Injection)
   ========================================= */
.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-gov-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(30, 58, 138, 0.3); /* Brand Primary */
    background: rgba(30, 58, 138, 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-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

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

/* =========================================
   MAIN CONTAINER
   ========================================= */
.ea3g-exec-container {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 400;
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    background-color: var(--color-bg);
    letter-spacing: 0.01em;
}

/* Boxed vs Fluid Layout handled by wrapper classes in widget */
.ioa-layout-fluid .ea3g-exec-container {
    max-width: 100%;
}

/* Header Typography */
.ea3g-exec-container h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-size: 2.75rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.ea3g-exec-container h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-primary);
}

.ea3g-exec-intro {
    margin-bottom: 3.5rem;
    position: relative;
}

/* =========================================
   COMMITTEE GRID
   ========================================= */
.ea3g-exec-grid {
    display: grid;
    gap: 2rem;
    /* Default is overridden by Elementor controls */
    grid-template-columns: repeat(4, 1fr); 
}

/* Committee member card */
.ea3g-exec-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    z-index: 1;
    height: 100%; /* Ensures equal height in flex context if needed */
}

/* Top Accent Gradient */
.ea3g-exec-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--card-accent-start), var(--card-accent-end));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ea3g-exec-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.ea3g-exec-card:hover::before {
    opacity: 1;
    background: linear-gradient(to right, var(--card-accent-start-hover), var(--card-accent-end-hover));
}

/* Profile photo */
.ea3g-exec-photo {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
    border-radius: 9999px;
    overflow: hidden;
    border: 2px solid var(--color-border);
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0; /* Prevent squishing */
}

.ea3g-exec-card:hover .ea3g-exec-photo {
    transform: scale(1.05);
}

.ea3g-exec-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ea3g-exec-card:hover .ea3g-exec-photo img {
    transform: scale(1.05);
}

/* Member info */
/* Note: WYSIWYG Editors inject <p> tags, so we need to target them */

.ea3g-exec-role {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    transition: color 0.3s ease;
    width: 100%;
}

.ea3g-exec-role p {
    margin: 0; /* Reset WP autop */
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.ea3g-exec-card:hover .ea3g-exec-role {
    color: var(--color-primary-dark);
}

.ea3g-exec-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.4;
    width: 100%;
}

.ea3g-exec-name p {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
}

.ea3g-exec-country {
    font-size: 14px;
    color: var(--color-text-tertiary);
    max-width: 90%;
    font-weight: 400;
    line-height: 1.4;
    width: 100%;
}

.ea3g-exec-country p {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* Superscript/Subscript Support */
sup {
    vertical-align: super;
    font-size: smaller;
}

sub {
    vertical-align: sub;
    font-size: smaller;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .ea3g-exec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ea3g-exec-container h1 {
        font-size: 2.25rem;
    }
    .ea3g-exec-container {
        padding: 2.5rem 1.5rem;
    }
    .ea3g-exec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ea3g-exec-container h1 {
        font-size: 1.875rem;
    }
    .ea3g-exec-photo {
        width: 90px;
        height: 90px;
    }
    .ea3g-exec-grid {
        grid-template-columns: 1fr;
    }
}