/* /css/portal-ios.css */

/* Ocultar elementos del tema global en el portal */
.page-template-default .site-header, 
.page-id-app .site-header, 
.page-id-app header.header-wrapper, 
.page-id-app #masthead, 
.page-id-app footer.site-footer, 
.page-id-app #colophon { 
    display: none !important; 
}

/* ELIMINACIÓN DEFINITIVA DE PADDING EN EL CONTENEDOR CONTENEDOR PADRE E HIJOS */
body.page-id-1034,
.page-id-1034 #page,
.page-id-1034 #content,
.page-id-1034 .elementor-1034,
.page-id-1034 .elementor-element-e181de1,
.page-id-1034 .e-con-boxed,
.page-id-1034 .e-con-inner,
.page-id-1034 .elementor-widget-shortcode,
.page-id-1034 .elementor-shortcode {
    
    padding: 0 !important;
}


/* Envoltorio Principal iOS */
.ios-wrapper {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-color: #0f172a;
    --border-color: #e2e8f0;
    --topbar-bg: rgba(255, 255, 255, 0.92);

    background-color: var(--bg-main);
    background-image: url("https://biosafrasgroup.com.py/wp-content/uploads/2025/09/logo_transparente-scaled.png");
    background-repeat: no-repeat;
    background-position: center 40%;
    background-attachment: fixed;
    background-size: 500px;
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 50px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

body.modo-oscuro-active .ios-wrapper {
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.92);
    --text-color: #f8fafc;
    --border-color: rgba(255, 255, 255, 0.08);
    --topbar-bg: rgba(15, 23, 42, 0.88);
}

/* Top Bar */
.ios-top-bar {
    position: sticky; top: 0; z-index: 9999;
    background: var(--topbar-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color); padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
}

.ios-profile-trigger { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.ios-avatar-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #7ea842; }
.ios-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.ios-user-greeting { font-size: 0.72rem; color: #64748b; font-weight: 500; }
.ios-user-name { font-size: 0.88rem; font-weight: 700; color: var(--text-color) !important; }

.ios-actions-right { display: flex; align-items: center; gap: 10px; }
.ios-icon-btn {
    position: relative; width: 38px; height: 38px; border-radius: 50%;
    background: rgba(0,0,0,0.04); border: 1px solid var(--border-color);
    color: var(--text-color); display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer;
}
body.modo-oscuro-active .ios-icon-btn { background: rgba(255,255,255,0.06); }
.ios-badge-count { position: absolute; top: -2px; right: -2px; background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 800; padding: 1px 6px; border-radius: 10px; }

/* Dropdowns */
.ios-profile-dropdown {
    display: none; position: absolute; top: 52px; left: 0; width: 230px;
    background: var(--bg-card); backdrop-filter: blur(25px);
    border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 8px 0; z-index: 10000;
}
.ios-profile-dropdown.active { display: block; }
.ios-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-color) !important; text-decoration: none !important; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.ios-dropdown-divider { height: 1px; background: var(--border-color); margin: 6px 0; }

/* Grid de Apps */
.ios-container { max-width: 1000px; margin: 0 auto; padding: 10px; }
.ios-section-title { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: #64748b; margin: 20px 0 10px 4px; }
.ios-apps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .ios-apps-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

.ios-app-item {
    background: var(--bg-card); border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    border-radius: 18px; padding: 14px 8px; text-align: center; color: var(--text-color) !important;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.ios-app-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(126, 168, 66, 0.15); color: #7ea842; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.ios-app-item span { font-size: 0.75rem; font-weight: 600; line-height: 1.1; }

.ios-welcome-box, .ios-spa-box-card { background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; color: var(--text-color) !important; backdrop-filter: blur(10px); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }

/* Modal Fullscreen SPA */
.ios-spa-view { 
    display: none; background: var(--bg-main); 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    z-index: 999999; overflow-y: auto; box-sizing: border-box; 
}
.ios-spa-view.active { display: block; }
.ios-spa-header { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 12px 20px; background: var(--bg-card); 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; top: 0; z-index: 9000; backdrop-filter: blur(20px); 
}
.ios-back-btn { 
    background: rgba(0,0,0,0.06); border: none; color: #7ea842; 
    padding: 8px 16px; border-radius: 10px; font-size: 0.85rem; 
    font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; 
}

/* Switch Dark Mode */
.bs-theme-toggle-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 12px 18px; border-radius: 16px; margin-top: 25px;
}
.ios-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 34px; }
.ios-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .ios-slider { background-color: #7ea842; }
input:checked + .ios-slider:before { transform: translateX(22px); }