/**
 * Viozzo How It Works Widget Styles
 * Step-by-step guide section
 */

/* ============================================================================
   HOW IT WORKS SECTION
   ============================================================================ */

.viozzo-how-it-works.how-it-works-section {
    padding: 0;
    background: #F4F7FF;
    position: relative;
    color: #222222;
    min-height: 35vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 10px;
}

.viozzo-how-it-works.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

.viozzo-how-it-works .section-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.viozzo-how-it-works .section-particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: #007bff;
    border-radius: 50%;
    animation: sectionFloat 8s infinite linear;
    opacity: 0.4;
}

@keyframes sectionFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

.viozzo-how-it-works > * {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   SECTION HEADER
   ============================================================================ */

.viozzo-how-it-works .section-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.viozzo-how-it-works .section-title {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #222222 0%, #007bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   STEPS CONTAINER
   ============================================================================ */

.viozzo-how-it-works .steps-container {
    max-width: 1200px;  /* Reduced from 1600px */
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;  /* Reduced from 50px */
    align-items: stretch;
    justify-items: stretch;
}

.viozzo-how-it-works .step-card {
    background: #E3F2FD;
    backdrop-filter: blur(15px);
    border: 2px solid #90CAF9;
    border-radius: 25px;
    padding: 45px 20px 35px 20px;  /* More top padding for step number */
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 300px;
    max-width: 350px;  /* Maximum width for each card */
    margin: 0 auto;  /* Center the cards */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3), 0 0 40px rgba(33, 150, 243, 0.1);
}

.viozzo-how-it-works .step-card:hover {
    transform: translateY(-8px);
    background: #E3F2FD;
    border-color: #42A5F5;
    box-shadow: 0 8px 30px rgba(33, 150, 243, 0.4), 0 0 60px rgba(33, 150, 243, 0.2);
}

.viozzo-how-it-works .step-number {
    position: absolute;
    top: 15px;  /* Inside the card, not outside */
    left: 50%;
    transform: translateX(-50%);
    width: 45px;  /* Slightly smaller */
    height: 45px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;  /* Slightly smaller font */
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
    line-height: 1;  /* Ensure number is centered vertically */
}

.viozzo-how-it-works .step-visual {
    margin: 15px 0 15px;  /* Reduced top margin since number is inside */
}

.viozzo-how-it-works .step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 12px;
    line-height: 1.3;
}

.viozzo-how-it-works .step-description {
    font-size: 0.9rem;
    color: #4A4A4A;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================================
   PHONE MOCKUP
   ============================================================================ */

.viozzo-how-it-works .step-phone {
    width: 180px;
    height: 300px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 25px;
    padding: 12px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.viozzo-how-it-works .step-screen {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ============================================================================
   STEP 1: PLAN SELECTOR (FLAGS GRID)
   ============================================================================ */

.plan-selector {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    overflow: hidden;
    position: relative;
}

.plan-header {
    text-align: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 123, 255, 0.3);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.plan-title {
    color: #222222;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-flags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 2px;
    overflow: hidden;
    flex: 1;
    align-content: start;
    max-height: 100%;
}

.flag-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: #F4F7FF;
    border: 1px solid #E0E6F5;
    border-radius: 6px;
    cursor: default;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
}

.flag-option .fi {
    font-size: 14px;
    width: 20px;
    height: 15px;
}

/* ============================================================================
   STEP 2: QR CODE SCANNER
   ============================================================================ */

.qr-code-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    position: relative;
}

.qr-code-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.qr-scan-corners {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: 2;
}

.scan-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #007bff;
    animation: scanCornerPulse 2s ease-in-out infinite;
}

.scan-corner-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 4px;
}

.scan-corner-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 4px;
}

.scan-corner-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 4px;
}

.scan-corner-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 4px;
}

@keyframes scanCornerPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.qr-code {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
    position: relative;
    z-index: 1;
}

.qr-pattern {
    width: 100%;
    height: 100%;
    position: relative;
    background:
        linear-gradient(90deg, #000 2px, transparent 2px),
        linear-gradient(0deg, #000 2px, transparent 2px);
    background-size: 8px 8px;
    background-position: 0 0;
}

.qr-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid #000;
}

.qr-corner-tl {
    top: 3px;
    left: 3px;
    border-right: none;
    border-bottom: none;
}

.qr-corner-tr {
    top: 3px;
    right: 3px;
    border-left: none;
    border-bottom: none;
}

.qr-corner-bl {
    bottom: 3px;
    left: 3px;
    border-right: none;
    border-top: none;
}

.qr-modules {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 50px;
    height: 50px;
}

.qr-module {
    background: #000;
    border-radius: 1px;
    animation: qrModuleFlicker 3s ease-in-out infinite;
}

.qr-module:nth-child(1) { animation-delay: 0s; }
.qr-module:nth-child(2) { animation-delay: 0.2s; }
.qr-module:nth-child(3) { animation-delay: 0.4s; }
.qr-module:nth-child(4) { animation-delay: 0.6s; }
.qr-module:nth-child(5) { animation-delay: 0.8s; }
.qr-module:nth-child(6) { animation-delay: 1s; }
.qr-module:nth-child(7) { animation-delay: 1.2s; }
.qr-module:nth-child(8) { animation-delay: 1.4s; }
.qr-module:nth-child(9) { animation-delay: 1.6s; }

@keyframes qrModuleFlicker {
    0%, 90%, 100% {
        opacity: 1;
    }
    93%, 97% {
        opacity: 0.3;
    }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
    animation: scanLineMove 2s linear infinite;
    z-index: 3;
    box-shadow: 0 0 10px #007bff;
}

@keyframes scanLineMove {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.scan-text {
    color: #007bff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ============================================================================
   STEP 3: SIGNAL BARS
   ============================================================================ */

.signal-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    overflow: hidden;
    position: relative;
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
}

.signal-bar {
    width: 10px;
    background: #007bff;
    border-radius: 2px;
    animation: signalPulse 1.5s ease-in-out infinite;
}

.signal-bar:nth-child(1) {
    height: 20%;
    animation-delay: 0s;
}

.signal-bar:nth-child(2) {
    height: 40%;
    animation-delay: 0.1s;
}

.signal-bar:nth-child(3) {
    height: 60%;
    animation-delay: 0.2s;
}

.signal-bar:nth-child(4) {
    height: 80%;
    animation-delay: 0.3s;
}

.signal-bar:nth-child(5) {
    height: 100%;
    animation-delay: 0.4s;
}

@keyframes signalPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.network-info {
    text-align: center;
}

.network-name {
    color: #222222;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.network-speed {
    color: #4A4A4A;
    font-size: 10px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00ff88;
    font-size: 11px;
    font-weight: 600;
}

.connection-status i {
    font-size: 14px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
    .viozzo-how-it-works .steps-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .viozzo-how-it-works {
        min-height: 35vh;
        padding: 15px 0;
    }

    .viozzo-how-it-works .steps-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        padding: 0 20px !important;
        max-width: 500px !important;
        margin: 0 auto !important;
    }

    .viozzo-how-it-works .step-card {
        padding: 30px 25px !important;
        min-height: 280px !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }

    .viozzo-how-it-works .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: -20px;
    }

    .viozzo-how-it-works .step-phone {
        width: 140px;
        height: 230px;
        border-radius: 20px;
        padding: 10px;
    }

    .viozzo-how-it-works .step-screen {
        border-radius: 15px;
        padding: 12px;
    }

    .viozzo-how-it-works .step-title {
        font-size: 1.3rem;
    }

    .viozzo-how-it-works .step-description {
        font-size: 0.85rem;
    }

    .viozzo-how-it-works .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .viozzo-how-it-works .steps-container {
        gap: 25px !important;
        padding: 0 15px !important;
    }

    .viozzo-how-it-works .step-card {
        padding: 25px 20px !important;
        min-height: 260px !important;
    }

    .viozzo-how-it-works .step-phone {
        width: 120px;
        height: 200px;
    }

    .qr-code {
        width: 90px;
        height: 90px;
    }

    .viozzo-how-it-works .section-title {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS - Prevent Scroll Micro-movements
   ============================================================================ */

.viozzo-how-it-works.how-it-works-section {
    contain: layout;  /* Isolate layout calculations */
    transform: translateZ(0);  /* Hardware acceleration */
    will-change: auto;  /* Prevent constant repaint */
}

.viozzo-how-it-works .step-card {
    contain: layout paint;  /* Isolate each card */
    transform: translateZ(0);  /* Hardware acceleration */
}

.viozzo-how-it-works .step-visual {
    contain: layout;  /* Isolate visual elements */
}

/* Disable section particle animations - can cause scroll issues */
.viozzo-how-it-works .section-particle {
    display: none !important;  /* Hide particles completely */
}

.viozzo-how-it-works .section-particles {
    display: none !important;  /* Hide particle container */
}
