/* ==========================================================================
   AUTOMATIC IA - IPAD SYSTEM & MINERAL GRID (UNIFIED CORE V1)
   ========================================================================== */

/* --- PARTE 1: LAS TARJETAS DE LA WEB (MINERAL GRID) --- */
.mineral-section {
    position: relative;
    padding: 100px 2rem;
    background: #050505;
    background-image: radial-gradient(circle at 50% 0%, rgba(205, 127, 50, 0.05) 0%, transparent 70%);
    z-index: 1;
}

.section-title {
    color: #fff;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #aaa;
    text-align: center;
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.mineral-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    /* Las pega mucho más entre sí */
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    align-items: end !important;
}

.mineral-box {
    position: relative;
    border-radius: 0 !important;
    /* Totalmente cuadradas */
    width: 100% !important;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0a0a;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Tarjeta 1 (Atención) y Tarjeta 3 (Marketing) -> ALTAS */
.mineral-box:nth-child(1),
.mineral-box:nth-child(3) {
    height: 550px !important;
}

/* Tarjeta 2 (Visibilidad) y Tarjeta 4 (Procesos) -> BAJAS */
.mineral-box:nth-child(2),
.mineral-box:nth-child(4) {
    height: 500px !important;
}

.mineral-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    z-index: 10;
}

.mineral-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    z-index: 2;
    pointer-events: none;
}

.mineral-box:hover::before {
    left: 125%;
}

.mineral-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.5);
    /* Tinte oscuro al 50% */
    z-index: 1;
    pointer-events: none;
    transition: all 0.4s ease;
}

.mineral-box:hover::after {
    background: rgba(5, 5, 5, 0.2);
}

.mineral-box.amethyst {
    background: url('../assets/img/marble-purple.jpg') center/cover;
}

.mineral-box.gold {
    background: url('../assets/img/marble-yellow.jpg') center/cover;
}

.mineral-box.ruby {
    background: url('../assets/img/marble-red.jpg') center/cover;
}

.mineral-box.emerald {
    background: url('../assets/img/marble-green.jpg') center/cover;
}

.mineral-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.mineral-box:hover .mineral-content {
    transform: translateY(0);
}

.mineral-content i {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.mineral-content h3 {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mineral-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.4s ease;
}

.mineral-box:hover .mineral-overlay {
    background: rgba(0, 0, 0, 0);
}


/* --- PARTE 2: EL MOTOR DEL IPAD LUXURY (ANTI-PIZZA) --- */

.ipad-wrapper-v2 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90vw;
    max-width: 1100px;
    height: 80vh;
    min-height: 600px;
    z-index: 9999;
    overflow: visible !important;
}

.luxury-ipad-pro {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0d0d0d;
    border-radius: 34px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
    border: 6px solid #1f1f1f;
    display: flex;
    overflow: hidden;
}

.ipad-screen {
    flex: 1;
    display: flex;
    position: relative;
    background: linear-gradient(135deg, #1a0b2e, #110f1c);
    width: 100%;
    height: 100%;
}

.hw-btn {
    position: absolute;
    right: -8px;
    width: 8px;
    background: #bdc3c7;
    border-radius: 0 4px 4px 0;
    box-shadow: inset 1px 0 2px rgba(255, 255, 255, 0.4), 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 10000 !important;
    cursor: pointer;
}

.power-btn {
    top: 60px;
    height: 50px;
    background: #e74c3c;
}

.volume-rocker {
    position: absolute;
    top: 130px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vol-btn {
    position: relative;
    right: -8px;
    width: 6px;
    height: 50px;
    background: #bdc3c7;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    z-index: 10000;
}

.ipad-sidebar {
    width: 90px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 20;
}

.nav-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.nav-icon.active {
    color: #a855f7;
    transform: scale(1.2);
}

.screen-off-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

/* CLASE MAESTRA DE EXPANSIÓN (ANTI-PIZZA) */
.universal-pane-full,
.atencion-pane-full {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    display: none;
}

[id^="modal-"] {
    z-index: 99999 !important;
}

/* FONDOS MÁRMOL DE CADA TARJETA */
.ipad-screen.theme-gold {
    background: radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 40%), radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.4) 0%, transparent 40%), linear-gradient(135deg, #2c2005 0%, #5a400a 100%) !important;
    background-size: cover !important;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9) !important;
}

.ipad-screen.theme-ruby {
    background: radial-gradient(circle at 30% 30%, rgba(255, 50, 50, 0.1) 0%, transparent 40%), radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5) 0%, transparent 50%), linear-gradient(135deg, #1f0505 0%, #4a0a0a 100%) !important;
    background-size: cover !important;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9) !important;
}

.ipad-screen.theme-emerald {
    background: radial-gradient(circle at 10% 50%, rgba(46, 204, 113, 0.1) 0%, transparent 40%), radial-gradient(circle at 90% 10%, rgba(0, 0, 0, 0.4) 0%, transparent 40%), linear-gradient(135deg, #021a0f 0%, #0e3b26 100%) !important;
    background-size: cover !important;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9) !important;
}