/* Estilos para el sitio de Robótica Kids */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #45B7D1;
    --warning-color: #FFE66D;
    --success-color: #95E1D3;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
    position: relative;
    padding-top: 90px;
}

/* Header ultra compacto */
.compact-header {
    background: var(--gradient-primary);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    width: 100%;
    box-shadow: var(--shadow);
}

.compact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    min-height: 50px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.95;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
}

/* Navegación integrada */
.nav-wrapper {
    position: relative;
    z-index: 1;
    padding: 0 1rem 0.5rem 1rem;
    display: flex;
    justify-content: center;
}

.nav-wrapper .container {
    background: #ffffff !important;
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    border: 3px solid #e0e0e0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    max-width: 1200px;
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 99999;
}

/* Forzar fondo blanco del menú */
.nav-wrapper .container,
.nav-wrapper .container * {
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Estilos específicos para el menú */
.nav-wrapper .container {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Asegurar que el menú se vea sobre el fondo degradado */
.nav-wrapper {
    position: relative;
    z-index: 99999;
}

/* Eliminar cualquier fondo del contenedor del menú */
.nav-wrapper .container {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 3px solid #e0e0e0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Fondo de contraste para elementos del menú */
.nav-wrapper .container .nav-item a {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-wrapper .container .nav-item a:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}



/* Responsive design */
@media (max-width: 768px) {
    .header-top {
        padding: 0.4rem 0.75rem;
        min-height: 45px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.7rem;
        padding: 0.1rem 0.3rem;
    }
    
    .nav-wrapper {
        padding: 0 0.75rem 0.4rem 0.75rem;
    }
    
    .nav-wrapper .container {
        padding: 0.6rem 1rem;
        min-height: 65px;
    }
    
    body {
        padding-top: 75px;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 0.3rem 0.5rem;
        min-height: 40px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .nav-wrapper {
        padding: 0 0.5rem 0.3rem 0.5rem;
    }
    
    body {
        padding-top: 65px;
    }
}



/* Estilos del menú de navegación */
.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
    background: transparent;
}

.nav-item {
    position: relative;
    margin: 0;
    background: transparent;
}

.nav-item a {
    color: #333 !important;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: block;
    font-weight: bold;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.nav-item a:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Estilo especial para el botón Dashboard activo */
.nav-item a.active,
.nav-item a[href*="dashboard"] {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Submenús desplegables */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #333 !important;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
    color: #333;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 15px;
    padding: 0.5rem;
    min-width: 250px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100001;
    border: 2px solid #e0e0e0;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.25rem 0;
}

.dropdown-menu a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

.dropdown-menu .icon {
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 180px;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Formularios */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    z-index: 1;
}

.form-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(69, 183, 209, 0.1);
}

.form-select {
    width: 100%;
    padding: 1rem;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    background: #f8f9fa;
    cursor: pointer;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

/* Mensajes */
.alert {
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.alert-success {
    background: var(--success-color);
    color: #155724;
    border: 2px solid #95E1D3;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.table th {
    background: var(--gradient-primary);
    color: white;
    font-weight: bold;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Botones de acción */
.btn-action {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 0.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: var(--accent-color);
    color: white;
}

.btn-delete {
    background: var(--primary-color);
    color: white;
}

.btn-action:hover {
    transform: scale(1.05);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Tarjetas de planeación sin centrado de texto */
.dashboard-card.planeacion-content {
    text-align: left;
}

.dashboard-card.planeacion-content h3 {
    text-align: center;
}

.dashboard-card.planeacion-content .content-text {
    text-align: left;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.dashboard-card .number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin-top: 220px;
    }
    
    .nav {
        width: 95%;
        top: 120px;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        padding: 1rem;
    }
    
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Iconos */
.icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Estilos específicos para niños */
.kids-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.kids-theme .main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Efectos especiales */
.sparkle {
    position: relative;
}

.sparkle::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.7; }
}

/* Estilos para TinyMCE */
.tinymce-editor {
    min-height: 300px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.tinymce-editor:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Personalización de la barra de herramientas de TinyMCE */
.tox-tinymce {
    border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
}

.tox .tox-toolbar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.tox .tox-tbtn {
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.tox .tox-tbtn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.tox .tox-tbtn--enabled {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Mejoras en el contenido del editor */
.tox .tox-edit-area {
    background: white !important;
}

.tox .tox-edit-area__iframe {
    border-radius: 0 0 8px 8px !important;
}

/* Responsive para TinyMCE */
@media (max-width: 768px) {
    .tinymce-editor {
        min-height: 200px;
    }
    
    .tox .tox-toolbar {
        flex-wrap: wrap !important;
    }
}