/**
 * Estilos Mejorados para GanaTuDrone Theme
 * CSS Moderno con Animaciones Suaves
 *
 * @package GanaTuDrone
 * @author Daniel Esau Rivera Ayala - Kreativos Pro
 * @version 1.0.4
 */

/* ==========================================================================
   HERO SECTION - DISEÑO MODERNO
   ========================================================================== */

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0066cc 0%, #00a8e8 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    padding: 6rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 168, 232, 0.6) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
    animation: heroFadeInUp 1s ease-out;
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(0, 168, 232, 0.4);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--color-white);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 10px 30px rgba(255, 107, 53, 0.3),
        0 0 40px rgba(255, 107, 53, 0.2);
    position: relative;
    overflow: hidden;
}

.hero__cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero__cta:hover::before {
    width: 400px;
    height: 400px;
}

.hero__cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 20px 50px rgba(255, 107, 53, 0.4),
        0 0 60px rgba(255, 107, 53, 0.3);
}

/* Partículas decorativas animadas */
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -300px;
    right: -300px;
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding: 4rem 0;
        background-attachment: scroll;
    }

    .hero__content {
        padding: 0 1.5rem;
    }

    .hero__cta {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
        padding: 3rem 0;
    }

    .hero__cta {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   GRIDS - SOLUCIÓN DEFINITIVA 2x2
   ========================================================================== */

/* Mobile: 1 columna */
.steps-grid,
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Tablet pequeño: 2 columnas */
@media (min-width: 576px) {
    .steps-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}

/* Tablet a Desktop: FORZAR 2 columnas centradas */
@media (min-width: 768px) and (max-width: 1199px) {
    .steps-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 800px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Desktop grande: 4 columnas */
@media (min-width: 1200px) {
    .steps-grid,
    .features-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        max-width: 100% !important;
    }
}

/* Animación de entrada para las cards */
.step-card,
.feature-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.step-card:nth-child(1),
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2),
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3),
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4),
.feature-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   CARDS DE PASOS - Diseño Mejorado
   ========================================================================== */

.step-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease-out;
}

.step-card:hover::before {
    transform: scaleX(1);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.15);
}

.step-card__number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    transition: transform 0.3s ease-out;
}

.step-card:hover .step-card__number {
    transform: scale(1.1) rotate(5deg);
}

.step-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.step-card__description {
    color: var(--color-gray-700);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   CARDS DE CARACTERÍSTICAS - Diseño Mejorado
   ========================================================================== */

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    transition: transform 0.3s ease-out;
}

.feature-card:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.feature-card__icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    transition: transform 0.3s ease-out;
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.15);
}

.feature-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.feature-card__description {
    color: var(--color-gray-700);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   BLOG GRID
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   BOTONES MEJORADOS
   ========================================================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ==========================================================================
   SECCIÓN HERO - Animación de Entrada
   ========================================================================== */

.hero-content {
    animation: heroFadeIn 0.8s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   ANIMACIONES DE SCROLL
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .section-header {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease-out forwards;
    }
}

/* ==========================================================================
   CTA SECTION - Mejorada
   ========================================================================== */

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   WHATSAPP FLOTANTE - Mejorado
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    animation: none;
}

/* ==========================================================================
   SCROLL TO TOP - Mejorado
   ========================================================================== */

.scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    z-index: 998;
    transition: all 0.3s ease-out;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-secondary);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 767px) {
    .step-card,
    .feature-card {
        padding: 2rem 1.5rem;
    }

    .step-card__number {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    .feature-card__icon {
        font-size: 3rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 80px;
    }
}

/* ==========================================================================
   ACCESIBILIDAD
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   OPTIMIZACIONES DE RENDIMIENTO
   ========================================================================== */

.step-card,
.feature-card,
.btn {
    will-change: transform;
}

.step-card:not(:hover),
.feature-card:not(:hover),
.btn:not(:hover) {
    will-change: auto;
}
