/* ========================================
   PAGE: automatizaciones-ia.php
   Page-specific styles ONLY.
   Shared styles live in:
     - variables.css  (design tokens)
     - base.css       (reset, typography, container)
     - animations.css (keyframes, .reveal classes)
     - components.css (section, hero, cards, feature-blocks,
                       pricing, methodology, faq, cta, forms,
                       buttons, inline-cta, responsive)
     - site-shell.css (header, nav, footer, mobile menu)
   ======================================== */

/* ========================================
   BODY BACKGROUND
   Radial gradient aurora + animated overlay
   (base.css sets no background on body)
   ======================================== */
body {
    position: relative;
    background:
        radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.45), transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(236, 72, 153, 0.35), transparent 45%),
        radial-gradient(circle at 20% 85%, rgba(6, 182, 212, 0.4), transparent 55%),
        radial-gradient(circle at 75% 75%, rgba(251, 191, 36, 0.35), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.25), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: bg-flow 30s ease infinite;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.2), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.2), transparent 45%);
    animation: gradient-shift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   MAIN STACKING CONTEXT
   Ensures content sits above body::before
   ======================================== */
main {
    position: relative;
    z-index: 1;
}

/* ========================================
   LARGE CONTAINER BREAKPOINTS
   (base.css only defines the default container)
   ======================================== */
@media (min-width: 1600px) {
    .container { width: min(1600px, 92%); }
}

@media (min-width: 2000px) {
    .container { width: min(1800px, 90%); }
}

/* ========================================
   HERO OVERRIDES
   This page uses a different hero layout
   vs the shared hero in components.css:
   - overflow: hidden for decorative elements
   - Different padding rhythm
   - Gradient badge (vs white-bg badge in shared)
   - cyan in h1 gradient (vs blue in shared)
   - hero-platforms block (unique to this page)
   ======================================== */
.hero {
    padding: calc(var(--space-3xl) + 2rem) 0 var(--space-3xl);
    overflow: hidden;
    max-width: none;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin-inline: auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    background: linear-gradient(135deg, var(--c-purple), var(--c-pink));
    color: #fff;
    padding: .6rem 1.4rem;
    font-size: .85rem;
    letter-spacing: .3px;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
    border: none;
    backdrop-filter: none;
    animation: scale-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--c-purple), var(--c-pink), var(--c-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-cta {
    animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* Hero platforms -- unique to this page */
.hero-platforms {
    margin-bottom: var(--space-xl);
    animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-platforms p {
    color: var(--c-text-secondary);
    font-size: 1rem;
    margin-bottom: .5rem;
}

.hero-platforms p:last-child {
    font-size: .9rem;
    color: var(--c-text-tertiary);
    margin-bottom: 0;
}

/* ========================================
   SHOWCASE SECTION
   Entirely unique to this page -- not in
   components.css at all.
   ======================================== */
.showcase-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-2xl);
    max-width: min(1200px, 90%);
    margin-left: auto;
    margin-right: auto;
}

.showcase-section.is-image-only {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.showcase-section.is-image-only .showcase-image {
    box-shadow: var(--shadow-strong);
    border-radius: var(--radius-xl);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.showcase-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    color: var(--c-text);
}

.showcase-content p {
    font-size: 1.05rem;
    color: var(--c-text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.showcase-features {
    list-style: none;
    padding: 0;
}

.showcase-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    color: var(--c-text);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--c-purple), var(--c-pink));
    color: white;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.showcase-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.showcase-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-slow);
}

.showcase-image:hover img {
    transform: scale(1.05);
}

/* ========================================
   CARD-ICON OVERRIDE
   Pink-to-purple gradient (vs purple-to-teal
   in components.css). Unique to this page.
   ======================================== */
.card-icon {
    background: linear-gradient(145deg, var(--c-pink) 0%, var(--c-purple) 100%);
    box-shadow:
        0 10px 30px rgba(236, 72, 153, .4),
        0 2px 8px rgba(0, 0, 0, .2),
        inset 0 1px 0 rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .2);
}

.card:hover .card-icon {
    box-shadow:
        0 15px 40px rgba(236, 72, 153, .5),
        0 4px 12px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .4),
        inset 0 -2px 0 rgba(0, 0, 0, .3);
}

/* ========================================
   #INTEGRACIONES – card list styling
   Cards with <ul> lists inside.
   ======================================== */
#integraciones .card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-xs);
}

#integraciones .card li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: .95rem;
    color: var(--c-text-secondary);
    line-height: 1.5;
}

#integraciones .card li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-purple), var(--c-pink));
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
    margin-top: 0.35rem;
    flex-shrink: 0;
}

/* ========================================
   INTEGRATIONS CARDS
   Entirely unique to this page.
   ======================================== */
.integrations-section {
    margin-bottom: var(--space-2xl);
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.integrations-section .integrations-grid {
    max-width: none;
}

.integration-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.integration-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-purple);
}

.integration-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.integration-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--c-text);
}

.integration-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.integration-card li {
    font-size: .95rem;
    color: var(--c-text-secondary);
    margin-bottom: .4rem;
    padding-left: 1rem;
    position: relative;
}

.integration-card li::before {
    content: "\B7";
    position: absolute;
    left: 0;
    color: var(--c-purple);
    font-weight: 700;
}

/* ========================================
   EXAMPLES SLIDER
   Entirely unique to this page.
   ======================================== */
.examples-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: var(--space-md) 0;
}

.examples-grid {
    display: flex;
    gap: var(--space-lg);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: stretch;
}

.example-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    flex: 0 0 calc((100% - (2 * var(--space-lg))) / 3);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.example-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Slider navigation */
.slider-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    color: var(--c-purple);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.slider-btn:hover {
    background: var(--c-purple);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-dots {
    display: flex;
    gap: var(--space-xs);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.3);
    cursor: pointer;
    transition: all var(--transition-base);
}

.slider-dot.active {
    background: var(--c-purple);
    width: 30px;
    border-radius: 5px;
}

/* Example card content */
.example-content {
    padding: var(--space-md);
    flex: 1 1 auto;
}

.example-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--c-purple), var(--c-pink));
    color: white;
    padding: .5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: .75rem;
    margin-bottom: var(--space-sm);
}

.example-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--c-text);
}

.example-card p {
    color: var(--c-text-secondary);
    margin-bottom: var(--space-xs);
    line-height: 1.7;
    font-size: .95rem;
}

.example-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: var(--space-md);
}

.example-card li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
    color: var(--c-text-secondary);
    font-size: .95rem;
}

.example-card li::before {
    content: "\2713";
    color: var(--c-purple);
    font-weight: 700;
    flex-shrink: 0;
}

.example-result {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--c-purple);
    margin-top: var(--space-sm);
    font-size: .95rem;
}

.example-result strong {
    color: var(--c-purple);
}

.example-image {
    width: 100%;
    overflow: hidden;
    margin-top: auto;
}

.example-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ========================================
   3D IMAGE CAROUSEL
   Entirely unique to this page.
   ======================================== */
.image-carousel {
    max-width: 900px;
    margin: 0 auto;
    perspective: 1400px;
    --carousel-depth: clamp(140px, 26vw, 260px);
}

.carousel-3d {
    position: relative;
    width: 100%;
    height: clamp(260px, 50vw, 420px);
    transform-style: preserve-3d;
    transform: rotateX(6deg);
}

.carousel-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.carousel-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
}

.carousel-face.face-1 {
    animation: carousel-face-1 12s linear infinite;
}

.carousel-face.face-2 {
    animation: carousel-face-2 12s linear infinite;
}

@keyframes carousel-face-1 {
    0%   { transform: rotateY(0deg) translateZ(var(--carousel-depth)); opacity: 1; }
    45%  { opacity: 1; }
    50%  { opacity: 0.45; }
    55%  { opacity: 0; }
    100% { transform: rotateY(160deg) translateZ(var(--carousel-depth)); opacity: 0; }
}

@keyframes carousel-face-2 {
    0%   { transform: rotateY(-160deg) translateZ(var(--carousel-depth)); opacity: 0; }
    45%  { opacity: 0; }
    50%  { opacity: 0.45; }
    55%  { opacity: 1; }
    100% { transform: rotateY(0deg) translateZ(var(--carousel-depth)); opacity: 1; }
}

/* ========================================
   CTA SECTION OVERRIDE
   Glass-morphism CTA at wider max-width
   vs components.css default (900px, no glass).
   ======================================== */
.cta-section {
    text-align: center;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: var(--space-3xl) var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    max-width: min(1200px, 92%);
    margin: 0 auto var(--space-3xl);
}

.cta-section h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--c-text-secondary);
    max-width: 700px;
    margin-inline: auto;
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

/* ========================================
   FAQ OVERRIDES
   This page uses .faqs-section wrapper and
   a details-based FAQ with different styling
   vs the shared .faq-item in components.css.
   ======================================== */
.faqs-section {
    background: transparent;
    backdrop-filter: none;
    padding: var(--space-2xl) 0;
    border-radius: 0;
    box-shadow: none;
}

.faq-item details {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.faq-item details[open] {
    border-color: var(--c-purple);
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: var(--space-md) var(--space-lg);
    color: var(--c-text);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-md);
}

/* ========================================
   RESPONSIVE: 1024px
   Page-specific breakpoint overrides
   ======================================== */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .example-card {
        flex: 0 0 calc((100% - var(--space-lg)) / 2);
    }
}

/* ========================================
   RESPONSIVE: 768px
   Page-specific breakpoint overrides
   ======================================== */
@media (max-width: 768px) {
    .example-card {
        flex: 0 0 100%;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .hero {
        padding: calc(var(--space-2xl) + 1rem) 0 var(--space-2xl);
    }

    .integrations-grid {
        grid-template-columns: 1fr;
    }

    #integraciones .cards-grid {
        grid-template-columns: 1fr;
    }

    .showcase-section {
        padding: var(--space-lg);
    }

    .example-image img {
        height: 160px;
    }
}

/* ========================================
   REDUCED MOTION: carousel
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .carousel-face {
        animation: none;
    }
}
