/* ==========================================================================
   IA + Automation Page Styles
   Compatible con WordPress y Oxygen Builder
   ========================================================================== */

.ia-main {
    position: relative;
    min-height: calc(100vh - 200px);
    overflow: visible; /* allow blurred balls to flow over the footer edge without a sharp cut */
    background: #FFFFFF;
}

.ia-hero {
    position: relative;
    z-index: 2;
    max-width: 1920px;
    margin: 0 auto;
    padding: 120px var(--spacing-xl) 60px;
}

.ia-title {
    font-size: 70px;
    line-height: 1;
    font-weight: 400;
    font-family: var(--font-family-primary);
    letter-spacing: -3.845px;
    color: var(--color-text-primary);
    margin: 0 0 48px 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.ia-subtitle {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    font-weight: 400;
    font-family: var(--font-family-primary);
    color: var(--color-text-primary);
    margin: 0 0 40px 0;
    max-width: 640px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.ia-note {
    font-size: 16px;
    line-height: 24px;
    font-family: var(--font-family-primary);
    color: #A8A8A8;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Animated balls background */
.ia-balls {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.ball {
    position: absolute;
    border-radius: 30504000px; /* effectively infinite for perfect circle */
    filter: blur(64px);
    opacity: 0.54;
    will-change: transform;
    mix-blend-mode: normal;
    pointer-events: none;
}

/* Ball sizes and colors from captures */
/* Ball 1: 649 x 649, gradient #F6E4DF 50% → #67E3EE 50% */
.ball-1 {
    width: 649px;
    height: 649px;
    left: -20vw;
    top: 12vh;
    background: linear-gradient(135deg, #F6E4DF 50%, #67E3EE 50%);
    opacity: 0.54;
    animation: sweep-1 40s linear 0s infinite alternate;
}

/* Ball 2: 389 x 389, gradient #A78BFA 30% → #38BDF8 30%, blur 40px */
.ball-2 {
    width: 389px;
    height: 389px;
    right: -18vw;
    top: 38vh;
    background: linear-gradient(135deg, #A78BFA 30%, #38BDF8 30%);
    filter: blur(40px);
    opacity: 0.27;
    animation: sweep-2 46s linear -10s infinite alternate;
}

/* Ball 3: 567 x 567, gradient #6A2AB1 40% → #0FC0FC 40% */
.ball-3 {
    width: 567px;
    height: 567px;
    left: 8vw;
    bottom: -18vh;
    background: linear-gradient(135deg, #6A2AB1 40%, #0FC0FC 40%);
    opacity: 0.54;
    animation: sweep-3 52s linear -20s infinite alternate;
}

/* Larger, side-to-side sweeps with subtle vertical drift and scale */
@keyframes sweep-1 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(60vw, -6vh, 0) scale(1.06); }
    100% { transform: translate3d(120vw, 0, 0) scale(1); }
}

@keyframes sweep-2 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    40%  { transform: translate3d(-45vw, 5vh, 0) scale(1.05); }
    100% { transform: translate3d(-110vw, -2vh, 0) scale(1.08); }
}

@keyframes sweep-3 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(55vw, -4vh, 0) scale(1.07); }
    100% { transform: translate3d(115vw, 3vh, 0) scale(1.02); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .ia-hero { padding: 140px var(--spacing-lg) 100px; }
    .ia-title { font-size: 60px; line-height: 1; letter-spacing: -2.8px; }
    .ia-subtitle { font-size: 22px; line-height: 32px; }

    .ball-1 { width: 520px; height: 520px; left: -160px; top: 80px; }
    .ball-2 { width: 320px; height: 320px; right: -80px; top: 220px; }
    .ball-3 { width: 460px; height: 460px; left: 35%; bottom: -140px; }
}

@media (max-width: 768px) {
    .ia-hero { padding: 120px var(--spacing-md) 80px; }
    .ia-title { font-size: 48px; line-height: 1; letter-spacing: -2px; }
    .ia-subtitle { font-size: 20px; line-height: 28px; }

    .ball-1 { width: 400px; height: 400px; left: -200px; top: 60px; }
    .ball-2 { width: 260px; height: 260px; right: -100px; top: 200px; }
    .ball-3 { width: 360px; height: 360px; left: 20%; bottom: -160px; }
}

/* Blog Posts Grid Section */
.ia-blog-posts {
    position: relative;
    z-index: 2;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl) 180px;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    min-height: 380px;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.post-date {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    font-family: var(--font-family-primary);
    color: #A8A8A8;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.post-thumbnail {
    width: 140px;
    height: 140px;
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.post-thumbnail .post-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post-title {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 400;
    font-family: var(--font-family-primary);
    color: var(--color-text-primary);
    margin: 0 0 auto 0;
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.post-link {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    font-family: var(--font-family-primary);
    color: var(--color-text-primary);
    margin-top: 24px;
    font-style: italic;
}

/* Responsive adjustments for blog grid */
@media (max-width: 1200px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ia-blog-posts {
        padding: 0 var(--spacing-md) 80px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-post-card {
        padding: 24px;
        min-height: 320px;
    }
    
    .post-thumbnail {
        width: 120px;
        height: 120px;
    }
    
    .post-title {
        font-size: 20px; 
    }
}

/* Override shared footer spacing on IA page */
.footer { margin-top: 0; }
/* Utilidades de animación de entrada (reveal), iguales a About */
.reveal {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.995);
    filter: blur(2px);
    transition:
        opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
        filter 600ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform, filter;
}
.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}
.reveal-up { transform: translate3d(0, 18px, 0) scale(0.995); }
.reveal-fade { transform: none; filter: blur(1px); }

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.is-visible {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

