/**
 * Speed Test - Modern Design
 */

/* Hero Section */
.speedtest-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0 4rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: #64748b;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-dark);
}

.breadcrumb i {
    font-size: 0.6rem;
}

.breadcrumb span {
    color: var(--text-dark);
    font-weight: 600;
}

/* Two Column Layout */
.speedtest-layout {
    display: grid;
    grid-template-columns: auto 380px;
    gap: 2rem;
    align-items: start;
}

/* NEW Layout: Speed Test + PromUp AI side by side */
.speedtest-layout-new {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Left Column - Speed Test */
.speedtest-left {
    display: flex;
    flex-direction: column;
    max-width: 450px;
}

/* Right Column - PromUp AI Wide */
.speedtest-promup-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* PromUp AI Card Wide */
.promup-speedtest-card-wide {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.promup-speedtest-card-wide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #a78bfa);
    background-size: 200% 100%;
    animation: promup-gradient 3s ease infinite;
}

.promup-speedtest-card-wide .promup-speedtest-header {
    margin-bottom: 1rem;
}

.promup-speedtest-card-wide .promup-speedtest-body {
    min-height: 60px;
}

.promup-speedtest-card-wide .promup-typewriter {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin: 0;
}

.promup-speedtest-card-wide .promup-insight-bg-icon {
    width: 180px;
    height: 180px;
    right: -20px;
    opacity: 0.06;
}

/* Offers Wide Section (below PromUp AI) */
.speedtest-offers-wide {
    margin-top: 1.5rem;
    padding: 0;
}

.speedtest-offers-wide .offers-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.speedtest-offers-wide .offers-title i {
    color: var(--primary-green);
    font-size: 1.1rem;
}

/* Offers Grid - 3 columns like fisso section */
.offers-grid-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Wide Offer Card */
.offers-grid-wide .offer-mini-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.offers-grid-wide .offer-mini-card:hover {
    border-color: var(--text-dark);
    box-shadow: 0 8px 25px rgba(0, 66, 116, 0.12);
    transform: translateY(-3px);
}

.offers-grid-wide .offer-mini-operator {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offers-grid-wide .offer-mini-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2px;
}

.offers-grid-wide .offer-mini-tech {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

.offers-grid-wide .offer-mini-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-green);
}

.offers-grid-wide .offer-mini-price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.speedtest-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.speedtest-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.speedtest-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Right Column - PromUp AI */
.speedtest-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* PromUp Tips Card */
.promup-tips-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.promup-tips-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #a78bfa);
}

.promup-tips-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.promup-tips-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promup-tips-icon img {
    width: 24px;
    height: 24px;
    filter: invert(1) brightness(1.3);
}

.promup-tips-label {
    font-size: 0.65rem;
    font-weight: 800;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.promup-tips-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
}

.promup-tips-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.promup-tip-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tip-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.tip-content strong {
    font-size: 0.9rem;
    color: #374151;
    display: block;
    margin-bottom: 2px;
}

.tip-content p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Speed Rating Card */
.speed-rating-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.speed-rating-card h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-rating-card h4 i {
    color: var(--primary-green);
}

.rating-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.rating-mini .rating-range {
    font-weight: 700;
}

.rating-mini .rating-label {
    font-weight: 600;
}

.rating-mini.poor { background: #fef2f2; color: #dc2626; }
.rating-mini.fair { background: #fff7ed; color: #ea580c; }
.rating-mini.good { background: #fefce8; color: #ca8a04; }
.rating-mini.great { background: #f0fdf4; color: #16a34a; }
.rating-mini.excellent { background: #ecfeff; color: #0891b2; }

.rating-unit {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0.75rem 0 0 0;
}

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0369a1 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.cta-card h4 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: white;
}

.cta-card p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--text-dark);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Gauge Wrapper */
.gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.gauge-container {
    position: relative;
    width: 220px;
    height: 220px;
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 50%;
    box-shadow:
        0 10px 25px -8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.02),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.gauge-progress {
    transition: stroke-dashoffset 0.15s ease-out;
}

/* Center Content */
.gauge-center {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-idle,
.gauge-running,
.gauge-done {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-idle {
    display: flex;
}

/* Start Button */
.btn-start {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-green) 0%, #059669 100%);
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 8px 25px rgba(0, 168, 89, 0.4),
        0 3px 5px rgba(0, 168, 89, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow:
        0 12px 30px rgba(0, 168, 89, 0.5),
        0 5px 7px rgba(0, 168, 89, 0.3);
}

.btn-start:active {
    transform: scale(0.98);
}

.start-hint {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Running State */
.gauge-running {
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.current-speed {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    display: block;
}

.current-unit {
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
}

.current-phase {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--primary-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

/* Done State */
.done-label {
    font-size: 1.1rem;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 1rem;
}

.btn-restart {
    padding: 12px 24px;
    border-radius: 30px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-restart:hover {
    background: var(--primary-blue);
    color: white;
}

/* Phase Indicator */
.phase-indicator {
    display: flex;
    gap: 2rem;
}

.phase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #cbd5e1;
    transition: all 0.3s;
}

.phase-item i {
    font-size: 1.2rem;
}

.phase-item span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-item.active {
    color: var(--text-dark);
}

.phase-item.active i {
    animation: pulse 1s ease-in-out infinite;
}

.phase-item.done {
    color: var(--primary-green);
}

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

/* Results Panel */
.results-panel {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
    margin-top: 1rem;
}

.results-panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.result-card {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    flex: 1;
}

.result-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.result-icon.download {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0369a1 100%);
}

.result-icon.upload {
    background: linear-gradient(135deg, var(--primary-green) 0%, #059669 100%);
}

.result-icon.ping {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.result-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.result-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.result-value span {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.result-value small {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Connection Info */
.connection-info {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #64748b;
}

.info-item i {
    color: #94a3b8;
    font-size: 0.8rem;
}

.info-item strong {
    color: var(--text-dark);
}

/* Info Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.info-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.info-card h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.info-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* Tips Box */
.tips-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #fcd34d;
}

.tips-box h3 {
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-box h3 i {
    color: #f59e0b;
}

.tips-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.tips-box li {
    font-size: 0.95rem;
    color: #78350f;
    padding-left: 1.5rem;
    position: relative;
}

.tips-box li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #059669;
    font-size: 0.8rem;
}

/* Speed Rating Table */
.speed-rating-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.rating-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 2fr;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.rating-row:last-child {
    border-bottom: none;
}

.rating-row.header {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speed-range {
    font-weight: 600;
    color: var(--text-dark);
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.rating i {
    font-size: 0.6rem;
}

.rating.poor { color: #ef4444; }
.rating.fair { color: #f97316; }
.rating.good { color: #eab308; }
.rating.great { color: #22c55e; }
.rating.excellent { color: #06b6d4; }

.rating-row span:last-child {
    color: #64748b;
    font-size: 0.9rem;
}

/* PromUp AI Card - Speed Test */
.promup-speedtest-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.promup-speedtest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #a78bfa);
    background-size: 200% 100%;
    animation: promup-gradient 3s ease infinite;
}

@keyframes promup-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.promup-speedtest-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.promup-speedtest-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.promup-icon-animated {
    width: 28px;
    height: 28px;
    filter: invert(1) brightness(1.2) drop-shadow(0 0 2px rgba(255,255,255,0.8)) drop-shadow(0 0 4px rgba(255,255,255,0.5));
    will-change: transform;
    animation: promup-thinking 12s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes promup-thinking {
    0%, 12% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(15deg) scale(1.1); }
    22% { transform: rotate(-10deg) scale(1); }
    30% { transform: rotate(360deg) scale(1.1); }
    35% { transform: rotate(360deg) scale(1.1); }
    45% { transform: rotate(900deg) scale(1.2); }
    50% { transform: rotate(880deg) scale(1.15); }
    58%, 70% { transform: rotate(720deg) scale(1); }
    78% { transform: rotate(740deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

.promup-speedtest-label {
    font-size: 0.65rem;
    font-weight: 800;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.promup-speedtest-header h3 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 0;
}

.promup-speedtest-body {
    min-height: 60px;
    z-index: 1;
}

.promup-typewriter {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

.promup-text-content {
    display: inline;
}

.promup-cursor {
    display: inline;
    animation: blink 1s step-end infinite;
    color: #8b5cf6;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Badge di sfondo PromUp */
.promup-insight-bg-icon {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
    background-image: url('/assets/loghi/brand/promup-badge.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Offerte Suggerite - Sezione */
.speedtest-offers {
    margin-top: 1rem;
}

.speedtest-offers .offers-title {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speedtest-offers .offers-title i {
    color: var(--primary-green);
}

.offers-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Mini Card Offerta */
.offer-mini-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.offer-mini-card:hover {
    border-color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 66, 116, 0.12);
    transform: translateY(-2px);
}

.offer-mini-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.offer-mini-logo {
    height: 24px;
    max-width: 80px;
    object-fit: contain;
}

.offer-mini-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.offer-mini-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.offer-mini-tech {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.offer-mini-tech.tech-ftth {
    background: #dcfce7;
    color: #166534;
}

.offer-mini-tech.tech-fttc {
    background: #dbeafe;
    color: #1e40af;
}

.offer-mini-tech.tech-fwa {
    background: #fef3c7;
    color: #92400e;
}

.offer-mini-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-green);
}

.offer-mini-price small {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

/* Two Column Content */
.content-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.content-text h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.content-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 1rem;
}

.content-text a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content-text a:hover {
    color: var(--primary-green);
}

.content-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-box {
    background: white;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.metric-box:nth-child(1) .metric-icon {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0369a1 100%);
}

.metric-box:nth-child(2) .metric-icon {
    background: linear-gradient(135deg, var(--primary-green) 0%, #059669 100%);
}

.metric-box:nth-child(3) .metric-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.metric-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.metric-box h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.metric-box p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Tips Grid - Site Colors */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 66, 116, 0.1);
    border-color: var(--text-dark);
}

.tip-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.tip-card:nth-child(odd) .tip-card-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--text-dark);
}

.tip-card:nth-child(even) .tip-card-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: var(--primary-green);
}

.tip-card h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tip-card p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Stats Grid - Italy Averages */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--primary-green);
    font-weight: 600;
    margin-top: 0.25rem;
}

.stat-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.italy-ranking {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.italy-ranking p {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
}

.italy-ranking i {
    color: var(--text-dark);
    margin-right: 8px;
}

.italy-ranking strong {
    color: var(--text-dark);
}

/* Offers Table */
.offers-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.offers-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.offers-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0369a1 100%);
}

.offers-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offers-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.offers-table tbody tr:last-child {
    border-bottom: none;
}

.offers-table tbody tr:hover {
    background: #f8fafc;
}

.offers-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.td-operator img {
    height: 32px;
    max-width: 120px;
    object-fit: contain;
}

.td-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.td-speed {
    font-weight: 600;
    color: #374151;
}

.td-tech .tech-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tech-badge.tech-ftth {
    background: #dcfce7;
    color: #166534;
}

.tech-badge.tech-fttc {
    background: #dbeafe;
    color: #1e40af;
}

.tech-badge.tech-fwa {
    background: #fef3c7;
    color: #92400e;
}

.td-price {
    font-size: 0.95rem;
    color: #374151;
}

.td-price strong {
    font-size: 1.15rem;
    color: var(--primary-green);
}

.btn-details {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-details:hover {
    background: var(--primary-green);
    transform: translateY(-1px);
}

.offers-cta {
    text-align: center;
}

.offers-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-white {
    background: white;
}

.section-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .speedtest-layout {
        grid-template-columns: 1fr;
    }

    .speedtest-layout-new {
        grid-template-columns: 1fr;
    }

    .speedtest-promup-right {
        margin-top: 1rem;
    }

    .offers-grid-wide {
        grid-template-columns: repeat(2, 1fr);
    }

    .speedtest-right {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .promup-speedtest-card {
        width: 100%;
    }

    .promup-insight-bg-icon {
        width: 100px;
        right: -10px;
    }
}

@media (max-width: 768px) {
    .speedtest-card {
        padding: 1.25rem;
    }

    .gauge-container {
        width: 200px;
        height: 200px;
    }

    .btn-start {
        width: 80px;
        height: 80px;
        font-size: 1.1rem;
    }

    .current-speed {
        font-size: 2.5rem;
    }

    .current-unit {
        font-size: 0.9rem;
    }

    .current-phase {
        font-size: 0.7rem;
    }

    .phase-indicator {
        gap: 1.5rem;
    }

    .results-panel {
        flex-direction: column;
        width: 100%;
    }

    .result-card {
        width: 100%;
        justify-content: center;
    }

    .connection-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .speedtest-right {
        flex-direction: column;
    }

    .offers-grid-wide {
        grid-template-columns: 1fr;
    }

    .offers-grid-wide .offer-mini-card {
        padding: 1rem 1.25rem;
    }

    .offers-grid-wide .offer-mini-name {
        font-size: 0.9rem;
    }

    .offers-grid-wide .offer-mini-price {
        font-size: 1rem;
    }

    .promup-speedtest-card-wide {
        padding: 1.5rem;
    }

    .promup-speedtest-card-wide .promup-typewriter {
        font-size: 0.95rem;
    }

    .offer-mini-card {
        padding: 10px 12px;
    }

    .offer-mini-name {
        font-size: 0.8rem;
    }

    .offer-mini-price {
        font-size: 0.9rem;
    }

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

    .tips-box ul {
        grid-template-columns: 1fr;
    }

    .rating-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .rating-row.header {
        display: none;
    }

    /* New Sections Responsive */
    .content-two-cols {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-text h2 {
        font-size: 1.5rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tip-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 1.25rem;
        gap: 1rem;
    }

    .tip-card-icon {
        margin: 0;
        min-width: 50px;
        width: 50px;
        height: 50px;
    }

    .tip-card h4 {
        margin-bottom: 0.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .offers-table th:nth-child(3),
    .offers-table td:nth-child(3),
    .offers-table th:nth-child(4),
    .offers-table td:nth-child(4) {
        display: none;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

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

    .offers-table th:nth-child(2),
    .offers-table td:nth-child(2) {
        display: none;
    }

    .td-operator img {
        height: 24px;
        max-width: 80px;
    }

    .td-price strong {
        font-size: 1rem;
    }
}
