/* Home Page Styles */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px); /* Increased distance for visibility */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px); /* Increased distance */
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Background Glow - Modified */
.bg-glow {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
}

.bg-glow-hero {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 128, 255, 0.25) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background 0.3s ease;
}

[data-theme="light"] .bg-glow-hero {
    background: radial-gradient(circle, rgba(0, 128, 255, 0.15) 0%, rgba(241, 245, 249, 0) 70%);
}

/* Hero Section - Redesigned */
.hero {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: visible;
    padding-bottom: 1rem; /* Reduced bottom padding */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    text-align: left;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.8) contrast(1.1); /* Slight adjustment to blend better */
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 128, 255, 0.3), transparent 70%);
    pointer-events: none;
    transition: background 0.3s ease;
}

[data-theme="light"] .hero-glow {
    background: radial-gradient(circle at 50% 50%, rgba(0, 128, 255, 0.2), transparent 70%);
}


/* Section Spacing & Separation */
.section-padding {
    padding: 5rem 0; /* Reduced padding from 8rem */
}

/* First section after hero - reduced top padding */
section.hero + section.section-padding {
    padding-top: 0;
}

/* Alternate Section Backgrounds */
.philosophy {
    position: relative;
}

.vendace-showcase {
    background: linear-gradient(to bottom, transparent, rgba(0, 128, 255, 0.08), transparent);
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="light"] .vendace-showcase {
    background: linear-gradient(to bottom, transparent, rgba(0, 128, 255, 0.12), transparent);
}

.roadmap {
    position: relative;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem; /* Reduced margin */
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-md);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -5px rgba(0,0,0,0.2);
}

[data-theme="light"] .card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 40px -5px rgba(0,0,0,0.15);
}

/* Card with Image - Desktop (imagen arriba) */
.feature-card.card-image {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.feature-card.card-image .card-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.08), rgba(0, 128, 255, 0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

[data-theme="light"] .feature-card.card-image .card-image-container {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.03));
}

.feature-card.card-image .card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-card.card-image .card-content {
    padding: 1.5rem 2.5rem 2.5rem;
}

.feature-card.card-image h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.feature-card.card-image p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

[data-theme="light"] .feature-card.card-image .card-content h3 {
    color: var(--text-main);
}

[data-theme="light"] .feature-card.card-image .card-content p {
    color: rgba(0, 0, 0, 0.7);
}

/* VendAce Showcase */
.showcase-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 128, 255, 0.15);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 128, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.15);
}

.showcase-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.showcase-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.showcase-features {
    margin-bottom: 3rem;
}

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

.showcase-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.showcase-buttons .btn {
    flex: 1;
    min-width: 0;
}

/* En desktop, los botones ocupan el espacio disponible, App Store a la derecha */
.showcase-buttons .desktop-only {
    flex: 0 0 auto;
}

/* App Store button styles */
.app-store-badge {
    display: inline-block;
    transition: opacity 0.3s ease;
    line-height: 0;
}

.app-store-badge:hover {
    opacity: 0.8;
}

.app-store-badge-img {
    display: block;
    height: 60px;
    width: auto;
}

.app-store-light {
    display: none !important;
}

[data-theme="light"] .app-store-dark {
    display: none !important;
}

[data-theme="light"] .app-store-light {
    display: block !important;
}

/* Desktop: mostrar App Store en showcase-buttons, ocultar showcase-app-store */
.desktop-only {
    display: inline-block;
}

.showcase-app-store {
    display: none;
}

/* Móvil: ocultar App Store en showcase-buttons, mostrar showcase-app-store */
@media (max-width: 768px) {
    .desktop-only,
    .showcase-buttons .app-store-badge,
    .showcase-buttons .desktop-only {
        display: none !important;
    }
    
    .showcase-app-store {
        display: block;
    }
}

.showcase-image {
    position: relative;
}

.app-mockup {
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
}

.showcase-layout:hover .app-mockup {
    transform: scale(1.02) rotate(1deg);
}

/* Roadmap Cards */
.roadmap-card .card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
}

.card-logo {
    width: 72px; /* Larger icons */
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05); /* Subtle background */
    padding: 8px; /* Padding to prevent clipping */
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.roadmap-card h3 {
    font-size: 1.75rem; /* Larger titles */
    flex: 1;
    margin: 0;
}

.roadmap-card .card-header .link-arrow {
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Desktop: ocultar link en header, mostrar debajo del texto */
.roadmap-card .card-header .link-arrow-mobile,
.link-arrow-mobile {
    display: none !important;
}

.link-arrow-desktop {
    display: inline-flex;
    margin-top: 1rem;
}

.roadmap-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    min-height: 3rem;
}

.link-arrow {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.link-arrow:hover {
    gap: 0.75rem;
}

.center-cta {
    text-align: center;
    margin-top: 5rem;
}

/* Contact CTA */
.cta-box {
    background: var(--gradient-primary);
    border-radius: 2rem;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 128, 255, 0.5);
}

[data-theme="light"] .cta-box {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.35), rgba(0, 80, 180, 0.28));
    box-shadow: 0 20px 40px -10px rgba(0, 128, 255, 0.25), 0 0 0 1px rgba(0, 128, 255, 0.1);
    border: 1px solid rgba(0, 128, 255, 0.35);
}

.cta-box h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

[data-theme="light"] .cta-box h2 {
    color: var(--text-main);
}

.cta-box p {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .cta-box p {
    color: var(--text-muted);
    opacity: 1;
}

.cta-box .btn {
    background: white;
    color: var(--primary);
    position: relative;
    z-index: 1;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

[data-theme="light"] .cta-box .btn {
    background: white;
    color: rgb(0, 128, 255);
    border: 2px solid rgb(0, 128, 255);
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.2);
}

[data-theme="light"] .cta-box .btn:hover {
    background: rgb(0, 128, 255);
    color: white;
    box-shadow: 0 6px 16px rgba(0, 128, 255, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-wrapper {
        transform: none;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-image-wrapper:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    /* Mayor separación después del hero para que la sombra no se corte */
    .hero {
        padding-bottom: 3rem;
        overflow: visible;
    }
    
    /* Reducir espacio superior en páginas secundarias (excepto home, vendace, sendshield, crmobile) */
    body[data-page="about"] .hero,
    body[data-page="contact"] .hero,
    body[data-page="live-products"] .hero,
    body[data-page="future-projects"] .hero {
        padding-top: 100px !important;
    }
    
    .hero-image-wrapper {
        margin-bottom: 1.5rem;
    }
    
    /* Menor separación entre subtítulo y cards */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    /* Feature cards - imagen arriba también en móvil */
    .feature-card.card-horizontal-mobile {
        /* Mantener formato vertical (imagen arriba) igual que desktop */
    }
    
    .feature-card.card-horizontal-mobile .card-content {
        padding: 1.5rem 1.5rem 2rem;
    }
    
    .feature-card.card-horizontal-mobile h3 {
        font-size: 1.25rem;
    }
    
    /* VendAce Showcase - Mobile Layout */
    .showcase-layout {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        text-align: left;
    }
    
    .showcase-content {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    
    /* Título primero */
    .showcase-title {
        order: 1;
        margin-right: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Badge después del título, centrado verticalmente */
    .showcase-content .badge {
        order: 2;
        margin-bottom: 0.5rem;
        align-self: center;
    }
    
    /* Descripción ancho completo */
    .showcase-desc {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Features */
    .showcase-features {
        order: 4;
        width: 55%;
        margin-bottom: 1rem;
    }
    
    .showcase-features li {
        justify-content: flex-start;
    }
    
    /* App Store button */
    .showcase-app-store {
        order: 5;
        width: 55%;
        margin-top: -1rem;
        margin-bottom: 1rem;
    }
    
    .showcase-app-store .app-store-badge-img {
        height: 50px;
    }
    
    .app-store-badge {
        display: inline-block;
        transition: opacity 0.3s ease;
        line-height: 0;
    }
    
    .app-store-badge:hover {
        opacity: 0.8;
    }
    
    .app-store-badge-img {
        display: block;
        height: 50px;
        width: auto;
    }
    
    .app-store-light {
        display: none !important;
    }
    
    [data-theme="light"] .app-store-dark {
        display: none !important;
    }
    
    [data-theme="light"] .app-store-light {
        display: block !important;
    }
    
    /* Botones en horizontal, ocupando todo el ancho de la pantalla */
    .showcase-buttons {
        order: 6;
        width: 100%;
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .showcase-buttons .btn {
        flex: 1 1 0;
        min-width: 0;
    }
    
    /* Imagen a la derecha, más arriba para aprovechar espacio vacío */
    .showcase-image {
        position: absolute;
        right: 1rem;
        bottom: 80px;
        width: 40%;
        max-width: 154px;
    }
    
    .vendace-showcase .container {
        position: relative;
    }
    
    .app-mockup {
        width: 100%;
        height: auto;
    }
    
    /* Reducir espacio antes de VendAce */
    .vendace-showcase.section-padding {
        padding-top: 2rem;
        padding-bottom: 4rem;
    }
    
    /* Espacio entre showcase-buttons y roadmap */
    .vendace-showcase + .roadmap.section-padding {
        padding-top: 1.5rem;
    }
    
    /* Reducir espacio en roadmap */
    .roadmap.section-padding {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    /* Roadmap cards - reducir altura y espacios en móvil */
    .roadmap-card {
        padding: 1rem !important;
    }
    
    .roadmap-card .card-header {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }
    
    .roadmap-card .card-logo {
        width: 48px;
        height: 48px;
        padding: 4px;
    }
    
    .roadmap-card h3 {
        font-size: 1.25rem;
        margin: 0;
    }
    
    /* Móvil: mostrar link en header, ocultar debajo del texto */
    .roadmap-card .card-header .link-arrow-mobile {
        display: inline-flex !important;
    }
    
    .link-arrow-desktop {
        display: none !important;
    }
    
    .roadmap-card .card-header .link-arrow {
        font-size: 0.85rem;
    }
    
    .roadmap-card p {
        margin-bottom: 0.75rem;
        min-height: auto;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Reducir espacio entre roadmap y botón View All */
    .center-cta {
        margin-top: 1.5rem;
    }
    
    /* Reducir espacio entre botón View All y contact-cta */
    .roadmap + .contact-cta.section-padding {
        padding-top: 1rem;
    }
    
    /* Reducir espacio en contact-cta y antes del footer */
    .contact-cta.section-padding {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .cta-box {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .cta-box h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .cta-box p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-box .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}
