/* ========== MINIMALISTIC TECH BACKGROUND ========== */
/* AGGIORNATO: iPad Landscape Force Fix - Cache refresh 09/07/2025 14:45 */

/* Main background container */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 284vh;
    z-index: -1;
    background: 
        linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%),
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.06) 0%, transparent 50%);
    overflow: hidden;
}

.animated-background::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-drift 25s linear infinite;
    opacity: 1;
}

/* Moving subtle wave */
.animated-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255,255,255,0.03) 48%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0.03) 52%,
        transparent 100%
    );
    animation: wave-sweep 20s ease-in-out infinite;
}

/* ========== ENHANCED TECH ELEMENTS ========== */

/* Tech circuit lines with animation */
.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.5) 30%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.5) 70%,
        transparent 100%
    );
    height: 1px;
    border-radius: 0.5px;
    animation: circuit-pulse 10s ease-in-out infinite;
}

.circuit-line:nth-child(1) { top: 15%; left: 8%; width: 35%; animation-delay: 0s; }
.circuit-line:nth-child(2) { top: 35%; left: 55%; width: 30%; animation-delay: -3s; }
.circuit-line:nth-child(3) { top: 55%; left: 20%; width: 25%; animation-delay: -6s; }
.circuit-line:nth-child(4) { top: 75%; left: 60%; width: 35%; animation-delay: -9s; }

/* Vertical circuit lines */
.circuit-line.vertical {
    width: 1px;
    height: 25%;
    background: linear-gradient(
        0deg,
        transparent 0%,
        rgba(255,255,255,0.5) 30%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.5) 70%,
        transparent 100%
    );
}

.circuit-line.vertical:nth-child(5) { top: 20%; left: 25%; animation-delay: -2s; }
.circuit-line.vertical:nth-child(6) { top: 45%; left: 70%; animation-delay: -5s; }

/* Enhanced tech nodes */
.tech-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

.tech-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
    border-radius: 50%;
    animation: node-breathe 6s ease-in-out infinite;
    box-shadow: 
        0 0 10px rgba(255,255,255,0.6),
        0 0 20px rgba(255,255,255,0.25);
}

.tech-node::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    animation: node-ring 8s linear infinite;
}

.tech-node::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    animation: node-ring 12s linear infinite reverse;
}

.tech-node:nth-child(1) { top: 18%; left: 22%; animation-delay: 0s; }
.tech-node:nth-child(2) { top: 35%; left: 75%; animation-delay: -1.5s; }
.tech-node:nth-child(3) { top: 52%; left: 15%; animation-delay: -3s; }
.tech-node:nth-child(4) { top: 68%; left: 85%; animation-delay: -4.5s; }
.tech-node:nth-child(5) { top: 82%; left: 40%; animation-delay: -6s; }
.tech-node:nth-child(6) { top: 25%; left: 60%; animation-delay: -7.5s; }

/* Enhanced floating particles */
.tech-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

.tech-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: particle-drift 15s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
}

.tech-particle:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.tech-particle:nth-child(2) { top: 25%; left: 45%; animation-delay: -3s; }
.tech-particle:nth-child(3) { top: 40%; left: 75%; animation-delay: -6s; }
.tech-particle:nth-child(4) { top: 55%; left: 25%; animation-delay: -9s; }
.tech-particle:nth-child(5) { top: 70%; left: 65%; animation-delay: -12s; }
.tech-particle:nth-child(6) { top: 85%; left: 35%; animation-delay: -15s; }
.tech-particle:nth-child(7) { top: 30%; left: 90%; animation-delay: -2s; }
.tech-particle:nth-child(8) { top: 60%; left: 10%; animation-delay: -8s; }

/* Enhanced data streams */
.data-streams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

.data-stream {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(
        0deg,
        transparent 0%,
        rgba(255,255,255,0.6) 30%,
        rgba(255,255,255,0.9) 50%,
        rgba(255,255,255,0.6) 70%,
        transparent 100%
    );
    border-radius: 1px;
    animation: data-flow 6s linear infinite;
    box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

.data-stream:nth-child(1) { left: 12%; animation-delay: 0s; }
.data-stream:nth-child(2) { left: 35%; animation-delay: -2s; }
.data-stream:nth-child(3) { left: 58%; animation-delay: -4s; }
.data-stream:nth-child(4) { left: 78%; animation-delay: -1s; }
.data-stream:nth-child(5) { left: 88%; animation-delay: -3s; }
.data-stream:nth-child(6) { left: 25%; animation-delay: -5s; }
.data-stream:nth-child(7) { left: 65%; animation-delay: -1.5s; }
.data-stream:nth-child(8) { left: 5%; animation-delay: -6s; }
.data-stream:nth-child(9) { left: 45%; animation-delay: -2.5s; }
.data-stream:nth-child(10) { left: 95%; animation-delay: -4.5s; }

/* Enhanced holographic elements */
.holo-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

.holo-hex {
    position: absolute;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255,255,255,0.4);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: holo-float 12s linear infinite;
}

.holo-hex::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255,255,255,0.25);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: holo-float 8s linear infinite reverse;
}

.holo-hex:nth-child(1) { top: 40%; left: 45%; animation-delay: 0s; }
.holo-hex:nth-child(2) { top: 65%; left: 75%; animation-delay: -4s; }

/* ========== ANIMATIONS ========== */

@keyframes grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes wave-sweep {
    0% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    10% { 
        transform: translateX(-80%);
        opacity: 0.5;
    }
    90% { 
        transform: translateX(-20%);
        opacity: 0.5;
    }
    100% { 
        transform: translateX(0%);
        opacity: 0;
    }
}

@keyframes circuit-pulse {
    0% { 
        opacity: 0;
        box-shadow: 0 0 2px rgba(255,255,255,0.1);
    }
    10% { 
        opacity: 0.4;
        box-shadow: 0 0 2px rgba(255,255,255,0.1);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 6px rgba(255,255,255,0.3);
    }
    90% { 
        opacity: 0.4;
        box-shadow: 0 0 2px rgba(255,255,255,0.1);
    }
    100% { 
        opacity: 0;
        box-shadow: 0 0 2px rgba(255,255,255,0.1);
    }
}

@keyframes node-breathe {
    0% { 
        opacity: 0;
        transform: scale(0.8);
    }
    10% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.15);
    }
    90% { 
        opacity: 0.6;
        transform: scale(1);
    }
    100% { 
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes node-ring {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 0;
    }
    15% { 
        transform: scale(1.2) rotate(54deg);
        opacity: 0.15;
    }
    50% { 
        transform: scale(1.5) rotate(180deg);
        opacity: 0.05;
    }
    85% { 
        transform: scale(1.8) rotate(306deg);
        opacity: 0.02;
    }
    100% { 
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

@keyframes particle-drift {
    0% { 
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { 
        transform: translateY(-10px) translateX(2px);
        opacity: 0.5;
    }
    25% { 
        transform: translateY(-25px) translateX(8px);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-50px) translateX(-5px);
        opacity: 1;
    }
    75% { 
        transform: translateY(-75px) translateX(12px);
        opacity: 0.6;
    }
    90% { 
        transform: translateY(-90px) translateX(-6px);
        opacity: 0.2;
    }
    100% { 
        transform: translateY(-100px) translateX(-8px);
        opacity: 0;
    }
}

@keyframes data-flow {
    0% { 
        transform: translateY(-100px);
        opacity: 0;
    }
    10% { 
        transform: translateY(-50px);
        opacity: 0;
    }
    20% { 
        transform: translateY(0px);
        opacity: 0.6;
    }
    80% { 
        transform: translateY(280vh);
        opacity: 0.6;
    }
    90% { 
        transform: translateY(290vh);
        opacity: 0.2;
    }
    100% { 
        transform: translateY(300vh);
        opacity: 0;
    }
}

@keyframes holo-float {
    0% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    15% { 
        transform: translateY(-3px) rotate(54deg);
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg);
        opacity: 0.25;
    }
    85% { 
        transform: translateY(-3px) rotate(306deg);
        opacity: 0.1;
    }
    100% { 
        transform: translateY(0) rotate(360deg);
        opacity: 0;
    }
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */

/* iPad specifico - Portrait e Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) {
    .animated-background {
        min-height: 305vh !important; /* Aumentato di 20vh */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 305vh !important;
    }
    
    /* Disabilita blur extra su CTA section per iPad */
    .cta-section,
    .cta-section *,
    .hero-cta,
    .hero-cta * {
        backdrop-filter: none !important;
        filter: none !important;
        -webkit-backdrop-filter: none !important;
        -webkit-filter: none !important;
    }
}

/* iPad Portrait */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: portrait) {
    .animated-background {
        min-height: 357vh !important; /* Aumentato a 357vh per iPad portrait */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
    }
}

/* iPad Portrait - Media query alternativa per Safari */
@media screen 
  and (device-width: 768px) 
  and (device-height: 1024px) 
  and (orientation: portrait) {
    .animated-background {
        min-height: 357vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
    }
}

/* iPad Portrait - Media query semplificata */
@media (max-width: 768px) and (orientation: portrait) {
    .animated-background {
        min-height: 357vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
    }
}

/* iPad Portrait - Media query ultra-specifica che deve funzionare */
@media screen and (max-width: 1024px) and (min-width: 768px) and (orientation: portrait),
       screen and (max-device-width: 1024px) and (min-device-width: 768px) and (orientation: portrait),
       screen and (device-width: 768px) and (device-height: 1024px) and (orientation: portrait) {
    
    .animated-background {
        min-height: 357vh !important; /* Aumentato a 357vh per iPad portrait */
        height: 357vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
        height: 357vh !important;
    }
    
    /* Navbar come per telefono su iPad Portrait */
    header,
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    nav,
    .nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem !important;
    }
    
    /* Menu mobile per iPad Portrait */
    .nav-toggle {
        display: block !important;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    .nav-menu.active {
        transform: translateY(0) !important;
    }
}

/* iPad Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: landscape) {
    .animated-background {
        min-height: 330vh !important; /* Aumentato a 330vh per landscape */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 330vh !important;
    }
}

/* ========== IPAD LANDSCAPE FORCE FIX ========== */
/* Media query ultra-prioritaria per iPad Landscape - deve sovrascrivere tutto */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape),
       screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape),
       screen and (device-width: 768px) and (device-height: 1024px) and (orientation: landscape),
       screen and (device-width: 1024px) and (device-height: 768px) and (orientation: landscape) {
    
    .animated-background {
        min-height: 310vh !important; /* Valore ancora più alto per iPad landscape */
        height: 310vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 340vh !important;
        height: 340vh !important;
    }
}

/* Tablet e dispositivi medi (768px e sotto) */
@media (max-width: 768px) {
    .animated-background {
        min-height: 800vh; /* Aumentato significativamente per copertura totale */
    }
    
    .animated-background::before {
        background-size: 45px 45px; /* Grid più piccola */
        animation-duration: 30s; /* Animazione più lenta per prestazioni */
    }
    
    .animated-background::after {
        animation-duration: 25s; /* Wave più lenta */
    }
    
    /* Circuit lines ottimizzate per tablet */
    .circuit-lines {
        min-height: 800vh;
    }
    
    .circuit-line {
        height: 1px;
        animation-duration: 12s; /* Più lente per prestazioni */
    }
    
    .circuit-line:nth-child(1) { width: 40%; }
    .circuit-line:nth-child(2) { width: 35%; }
    .circuit-line:nth-child(3) { width: 30%; }
    .circuit-line:nth-child(4) { width: 38%; }
    
    .circuit-line.vertical {
        height: 20%; /* Ridotte per tablet */
    }
    
    /* Tech nodes ridimensionati */
    .tech-nodes {
        min-height: 800vh;
    }
    
    .tech-node {
        width: 5px;
        height: 5px;
        animation-duration: 8s;
    }
    
    .tech-node::before {
        top: -3px;
        left: -3px;
        width: 11px;
        height: 11px;
    }
    
    .tech-node::after {
        top: -6px;
        left: -6px;
        width: 17px;
        height: 17px;
    }
    
    /* Particelle ottimizzate */
    .tech-particles {
        min-height: 800vh;
    }
    
    .tech-particle {
        width: 1.5px;
        height: 1.5px;
        animation-duration: 18s;
    }
    
    /* Data streams per tablet */
    .data-streams {
        min-height: 800vh;
    }
    
    .data-stream {
        width: 1.5px;
        height: 60px;
        animation-duration: 8s;
    }
    
    /* Elementi olografici ridotti */
    .holo-elements {
        min-height: 800vh;
    }
    
    .holo-hex {
        width: 28px;
        height: 28px;
        animation-duration: 15s;
    }
}

/* Smartphone e dispositivi piccoli (480px e sotto) */
@media (max-width: 480px) {
    .animated-background {
        min-height: 520vh !important; /* Aumentato per compensare la centratura */
    }
    
    .animated-background::before {
        background-size: 35px 35px; /* Grid ancora più piccola */
        animation-duration: 40s; /* Molto più lenta per batteria */
        opacity: 0.5; /* Ridotta per prestazioni */
    }
    
    .animated-background::after {
        animation-duration: 35s;
        opacity: 0.8;
    }
    
    /* Circuit lines minimali per mobile */
    .circuit-lines {
        min-height: 525vh !important;
    }
    
    .circuit-line {
        height: 0.8px;
        animation-duration: 15s;
    }
    
    .circuit-line:nth-child(1) { width: 45%; left: 5%; }
    .circuit-line:nth-child(2) { width: 40%; left: 50%; }
    .circuit-line:nth-child(3) { width: 35%; left: 15%; }
    .circuit-line:nth-child(4) { width: 42%; left: 55%; }
    
    .circuit-line.vertical {
        height: 15%;
        width: 0.8px;
    }
    
    /* Tech nodes per mobile */
    .tech-nodes {
        min-height: 525vh !important;
    }
    
    .tech-node {
        width: 4px;
        height: 4px;
        animation-duration: 10s;
    }
    
    .tech-node::before {
        top: -2px;
        left: -2px;
        width: 8px;
        height: 8px;
        animation-duration: 12s;
    }
    
    .tech-node::after {
        top: -4px;
        left: -4px;
        width: 12px;
        height: 12px;
        animation-duration: 16s;
    }
    
    /* Ridotte particelle per prestazioni */
    .tech-particles {
        min-height: 525vh !important;
    }
    
    .tech-particle {
        width: 1px;
        height: 1px;
        animation-duration: 20s;
        box-shadow: 0 0 3px rgba(255,255,255,0.2);
    }
    
    /* Nascondi alcune particelle per prestazioni */
    .tech-particle:nth-child(n+6) {
        display: none;
    }
    
    /* Data streams ottimizzati */
    .data-streams {
        min-height: 525vh !important;
    }
    
    .data-stream {
        width: 1px;
        height: 45px;
        animation-duration: 10s;
        box-shadow: 0 0 2px rgba(255,255,255,0.15);
    }
    
    /* Nascondi alcuni stream per prestazioni */
    .data-stream:nth-child(n+7) {
        display: none;
    }
    
    /* Elementi olografici minimali */
    .holo-elements {
        min-height: 510vh !important;
    }
    
    .holo-hex {
        width: 20px;
        height: 20px;
        animation-duration: 20s;
        border-width: 0.8px;
    }
    
    .holo-hex::before {
        top: 3px;
        left: 3px;
        right: 3px;
        bottom: 3px;
        border-width: 0.8px;
    }
}

/* Dispositivi molto piccoli (320px e sotto) */
@media (max-width: 320px) {
    .animated-background {
        min-height: 465vh; /* Aumentato per compensare la centratura */
    }
    
    .animated-background::before {
        background-size: 30px 30px;
        animation-duration: 50s;
        opacity: 0.4;
    }
    
    .animated-background::after {
        animation-duration: 45s;
        opacity: 0.6;
    }
    
    /* Elementi ultra-minimali */
    .circuit-lines {
        min-height: 465vh;
    }
    
    .circuit-line {
        height: 0.5px;
        animation-duration: 20s;
    }
    
    .circuit-line.vertical {
        width: 0.5px;
        height: 12%;
    }
    
    .tech-nodes {
        min-height: 465vh;
    }
    
    .tech-node {
        width: 3px;
        height: 3px;
        animation-duration: 12s;
    }
    
    .tech-node::before,
    .tech-node::after {
        display: none; /* Rimuovi anelli per prestazioni */
    }
    
    .tech-particles {
        min-height: 465vh;
    }
    
    .tech-particle {
        animation-duration: 25s;
    }
    
    .data-streams {
        min-height: 465vh;
    }
    
    .data-stream {
        height: 35px;
        animation-duration: 12s;
    }
    
    .holo-elements {
        min-height: 465vh;
    }
    
    .holo-hex {
        width: 15px;
        height: 15px;
        animation-duration: 25s;
    }
    
    .holo-hex::before {
        display: none; /* Rimuovi elemento interno */
    }
}

/* Landscape mode per mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .animated-background {
        min-height: 600vh; /* Aumentato significativamente per iPad landscape */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 600vh;
    }
    
    /* Ottimizza le animazioni per landscape */
    .animated-background::before {
        animation-duration: 35s;
    }
    
    .circuit-line {
        animation-duration: 18s;
    }
    
    .data-stream {
        animation-duration: 12s;
    }
}

/* Tablet generici - fallback ottimizzato */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .animated-background {
        min-height: 270vh !important; /* Aumentato di 20vh */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 270vh !important;
    }
    
    /* Rimuovi blur aggiuntivi su elementi CTA per tablet */
    .cta-section,
    .hero-cta,
    .button,
    .btn {
        backdrop-filter: none !important;
        filter: none !important;
        -webkit-backdrop-filter: none !important;
        -webkit-filter: none !important;
    }
}

/* ========== IPAD SPECIFIC FIXES ========== */

/* iPad Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: landscape) {
    .animated-background {
        min-height: 330vh !important; /* Aumentato a 330vh per landscape */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 330vh !important;
    }
}

/* iPad Portrait - navbar come mobile */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: portrait) {
    .animated-background {
        min-height: 357vh !important; /* Aumentato a 357vh per iPad portrait */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
    }
    
    /* Header comportamento mobile su iPad portrait */
    header,
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Navbar comportamento mobile su iPad portrait */
    .navbar,
    nav {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        z-index: 1000;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem !important;
    }
    
    .nav-links {
        display: none !important;
    }
    
    .mobile-menu-toggle,
    .nav-toggle {
        display: block !important;
    }
    
    .navbar.mobile-open .nav-links,
    .nav-menu.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
    }
}

/* iPad Ultra-Specific Portrait (Safari compatibility) */
@media only screen 
  and (device-width: 768px) 
  and (device-height: 1024px) 
  and (orientation: portrait) 
  and (-webkit-device-pixel-ratio: 2) {
    .animated-background {
        min-height: 357vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 357vh !important;
    }
}

/* iPad Ultra-Specific Landscape (Safari compatibility) */
@media only screen 
  and (device-width: 768px) 
  and (device-height: 1024px) 
  and (orientation: landscape) 
  and (-webkit-device-pixel-ratio: 2) {
    .animated-background {
        min-height: 330vh !important;
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 330vh !important;
    }
}

/* ========== LAPTOP & DESKTOP SPECIFIC ADJUSTMENTS ========== */

/* Laptop standard (1024px - 1366px) - Risoluzione più comune per laptop */
@media screen and (min-width: 1025px) and (max-width: 1366px) {
    .animated-background {
        min-height: 290vh !important; /* Ottimizzata copertura per laptop */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 290vh !important;
    }
}

/* Laptop widescreen (1367px - 1600px) - Solo laptop widescreen */
@media screen and (min-width: 1367px) and (max-width: 1600px) {
    .animated-background {
        min-height: 300vh !important; /* Copertura moderata solo per laptop widescreen */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 300vh !important;
    }
}

/* Monitor 4K e ultra-wide (oltre 2560px) - Solo per monitor molto grandi */
@media screen and (min-width: 2561px) {
    .animated-background {
        min-height: 320vh !important; /* Copertura estesa solo per monitor ultra-grandi */
    }
    
    .circuit-lines,
    .tech-nodes,
    .tech-particles,
    .data-streams,
    .holo-elements {
        min-height: 320vh !important;
    }
}

/* ========== RIMOZIONE BLUR CTA SECTION ========== */
/* Rimuovi tutti gli effetti blur dalla CTA section su tutti i dispositivi */
.cta-section,
.cta-section *,
.hero-cta,
.hero-cta *,
.cta-container,
.cta-container *,
.cta-content,
.cta-content *,
.cta-button,
.cta-button *,
.button,
.btn,
.hero-button,
.hero-button * {
    backdrop-filter: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -ms-filter: none !important;
    -o-filter: none !important;
}

/* Assicurati che non ci siano effetti blur su tutti i pulsanti e CTA */
*[class*="cta"],
*[class*="button"],
*[class*="btn"] {
    backdrop-filter: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-filter: none !important;
}