/**
 * MarketBox Landing Page Styles
 * Estilos específicos para la landing page principal, optimizados para Pico CSS.
 */

/* El botón se controla desde el header.php para evitar conflictos */
.mobile-menu-toggle li {
    padding: 0;
    list-style: none;
}

@media (max-width: 850px) {
    .header-landing {
        padding: 0.5rem 1rem;
    }

    .header-landing nav {
        height: 75px;
    }

    /* La visibilidad se maneja en header.php */
    .mobile-menu-toggle {
        order: 2;
    }

    .logo-link {
        order: 1;
    }

    .nav-links-container {
        display: none;
    }

    .nav-links-container.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .main-nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .main-nav-list li {
        width: 100%;
        padding: 0;
    }

    .main-nav-list li a {
        width: 100%;
        display: block;
        padding: 0.75rem 1rem;
        text-align: left;
        border-radius: 8px;
    }

    .main-nav-list li a:not([role="button"]):hover {
        background: #ffffff;
    }

    .btn-login, .btn-cta {
        margin: 0.5rem 0;
        width: 100% !important;
        text-align: center !important;
    }

    .mobile-only {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Ajustes para pantallas extra pequeñas */
@media (max-width: 575px) {
    .header-landing.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 70px;
        width: 190px;
        object-fit: contain;
    }

    @media (max-width: 575px) {
        .logo-img {
            height: 65px;
            width: 175px;
        }
    }

    .logo-link {
        gap: 0.5rem;
    }

    #mobile-menu-btn {
        width: 38px;
        height: 38px;
    }

    .header-landing nav {
        height: 50px;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
    padding: 6rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-icon-bg {
    position: absolute;
    top: 5%;
    right: -5%;
    width: 300px;
    height: 300px;
    opacity: 0.2;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

.brand-icon-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section hgroup h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--pico-heading-color);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-section hgroup h1 span {
    color: var(--pico-primary);
}

.hero-section hgroup h2 {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: var(--pico-muted-color);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Tarjetas y Secciones */
article, .card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--pico-border-radius);
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    height: 100%;
}

article:hover, .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--pico-primary);
}

/* Sección de Precios */
.pricing-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.pricing-grid > div {
    flex: 0 0 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .pricing-grid > div {
        flex: 0 0 calc(50% - 2rem);
    }
}

@media (min-width: 1100px) {
    .pricing-grid > div {
        flex: 0 0 calc(33.333% - 2rem);
    }
}

.pricing-grid .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-grid .card ul {
    flex-grow: 1;
}

.card.popular {
    border: 2px solid var(--pico-primary);
    position: relative;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 20px 25px -5px rgba(50, 150, 250, 0.15);
}

.card.popular::before {
    content: "MÁS POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pico-primary);
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--pico-heading-color);
    margin: 1.5rem 0;
}

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

.card ul li {
    padding: 0.5rem 0;
    color: var(--pico-muted-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card ul li i {
    color: var(--pico-primary);
}

.plan-bullet {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Stats Section */
.stats-section,
.features-section,
.pricing-section,
#auth-section {
    padding: 6rem 1rem;
}

.stat-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.brand-stat-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    opacity: 0.15;
    z-index: 0;
}

.stats-section article i {
    position: relative;
    z-index: 1;
    color: var(--pico-primary);
    font-size: 2.5rem;
}

.feature-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
}

.brand-feature-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    opacity: 0.12;
    z-index: 0;
}

.feature-header i {
    position: relative;
    z-index: 1;
    color: var(--pico-primary);
}

.features-section hgroup,
.pricing-section hgroup,
.testimonials-section hgroup {
    text-align: center;
    margin-bottom: 4rem;
}

.stats-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.stats-section article {
    border: none;
    box-shadow: none;
    background: transparent;
    text-align: center;
}

.stats-section h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pico-primary);
    margin-bottom: 0.5rem;
}

/* Testimonials Section */
.testimonials-section {
    position: relative;
    overflow: hidden;
    background: #f0f7ff; /* Azul muy suave para destacar la sección */
    padding: 6rem 1rem;
}

.testimonials-brand-bg {
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%) rotate(-15deg);
    width: 500px;
    height: 500px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.testimonials-brand-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.testimonials-section .container {
    position: relative;
    z-index: 1;
}

.testimonials-section article {
    background: #ffffff;
    border: none;
    border-radius: 1rem;
    padding: 3rem 2rem 2rem;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonials-section article::before {
    content: "\f10d"; /* Icono de comillas de FontAwesome */
    font-family: "FontAwesome";
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 2rem;
    color: var(--pico-primary);
    opacity: 0.15;
}

.testimonials-section p {
    font-style: normal;
    font-size: 1.15rem;
    color: var(--pico-heading-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonials-section cite {
    font-style: normal;
    border-top: 1px solid #edf2f7;
    padding-top: 1rem;
    display: block;
}

.testimonials-section cite strong {
    color: var(--pico-primary);
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.testimonials-section cite span {
    color: var(--pico-muted-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--pico-primary) 0%, #1e87f0 100%);
    color: white;
    padding: 6rem 1rem;
    border-radius: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-brand-watermark {
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    opacity: 0.1;
    filter: brightness(0) invert(1);
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 0;
}

.cta-brand-watermark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Auth Section Watermark */
#auth-section {
    position: relative;
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    opacity: 0.2;
    transform: rotate(20deg);
    pointer-events: none;
    z-index: 0;
}

.auth-brand-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .auth-brand-bg {
        width: 300px;
        height: 300px;
        top: -5%;
        left: -5%;
    }
}

#registro-form {
    position: relative;
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: white;
    font-size: 3rem;
    font-weight: 800;
}

.cta-section h3 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.cta-section [role="button"] {
    background: white;
    color: var(--pico-primary);
    border: none;
    font-weight: 700;
    padding: 1rem 2rem;
}

.cta-section [role="button"]:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

/* Grid responsiva unificada */
.grid-3-2-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-3-2-1 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3-2-1 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4-2-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-4-2-1 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4-2-1 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Footer */
footer.container {
    padding: 4rem 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: left;
}

footer.container .grid {
    gap: 2rem;
}

@media (max-width: 768px) {
    footer.container {
        text-align: center;
        padding: 3rem 1rem;
    }

    footer.container .grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    footer.container div[style*="display: flex"] {
        justify-content: center;
    }
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li a {
    color: var(--pico-muted-color);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-links li a:hover {
    color: var(--pico-primary);
}

.stats-section article {
    text-align: center;
}

.stats-section article h3 {
    margin-bottom: 0.25rem;
}

.stats-section article p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
}

/* Animaciones sutiles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section hgroup,
.hero-section footer {
    animation: fadeInUp 0.8s ease-out both;
}

.hero-section hgroup { animation-delay: 0.2s; }
.hero-section footer { animation-delay: 0.4s; }

.heart-pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
