/* =========================================
WRAPPER & SYSTEM STYLES (Gold Standard)
========================================= */
.ioa-application-wrapper-v2 {
    position: relative;
    width: 100%;
}

.ioa-application-wrapper-v2 *,
.ioa-application-wrapper-v2 *::before,
.ioa-application-wrapper-v2 *::after {
    box-sizing: border-box;
}

/* =========================================
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 added via PHP) */
.is-editor-mode .ioa-teleport-slot {
    min-height: 40px;
    border: 1px dashed rgba(30, 58, 138, 0.3); /* Matches Primary Blue */
    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: #1e3a8a;
    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); }
}

/* =========================================
ORIGINAL STYLES (Preserved & Scoped)
========================================= */

/* IOA Application Widget Styles */

.ea3g-application-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ea3g-application-container {
    /* Core palette - Defaults set here, controlled by Elementor */
    --color-primary: #1e3a8a;
    --color-primary-dark: #1e40af;
    --color-primary-light: rgba(30, 58, 138, 0.08);
    --color-text-primary: #111827;
    --color-text-secondary: #374151;
    --color-text-tertiary: #6b7280;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-background: #f9fafb;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    
    /* Spacing */
    --space-xs: 0.75rem;   /* 12px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 2.5rem;    /* 40px */
    --space-2xl: 3.5rem;   /* 56px */
    --space-3xl: 5rem;     /* 80px */
    
    /* Border radius */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 0.75rem;  /* 12px */
    
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 400;
    color: var(--color-text-secondary);
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md) var(--space-3xl);
    position: relative;
    background-color: var(--color-background);
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

.ea3g-application-subtitle {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 720px;
}

/* Section heading with decoration */
.ea3g-section-heading {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.ea3g-section-heading::before {
    content: "";
    position: absolute;
    top: 24px;
    left: -30px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-primary-light);
    z-index: 0;
    transform: scale(0);
    animation: appear 1s ease-out 0.5s forwards;
}

@keyframes appear {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* Application option */
.ea3g-application-option {
    margin-bottom: var(--space-xl);
}

.ea3g-option-title {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
}

/* Application methods section */
.ea3g-application-methods {
    display: flex;
    flex-direction: row; /* MODIFIED: Set to row for side-by-side layout */
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

/* Application card */
.ea3g-application-card {
    flex: 1; /* ADDED: Makes cards share space equally */
    position: relative;
    padding: var(--space-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.ea3g-application-card:nth-child(1) {
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.ea3g-application-card:nth-child(2) {
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ea3g-application-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(30, 58, 138, 0.15);
}

/* Left edge mark */
.ea3g-application-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-dark));
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ea3g-application-card:hover::before {
    height: 100%;
}

/* CTA Button */
.ea3g-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-md);
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: var(--space-sm); /* Increased margin slightly for better spacing */
}

.ea3g-cta-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Subscription link */
.ea3g-subscription-link {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: var(--space-xl);
}

.ea3g-subscription-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ea3g-subscription-link:hover {
    color: var(--color-primary-dark);
}

.ea3g-subscription-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ea3g-application-methods {
        flex-direction: column; /* ADDED: Stack cards vertically on smaller screens */
    }

    .ea3g-application-subtitle {
        font-size: 15px;
    }
    
    .ea3g-section-heading::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .ea3g-application-card {
        padding: var(--space-md);
    }
}