﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #FF6B35 0%, #FFD23F 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.brand {
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-content i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.brand-content span {
    font-size: 1.2rem;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar.collapsed .brand-content span {
    display: none;
}

.menu {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.menu-collapsible {
    display: none;
}

/* Cuando NO est├í pinned: mostrar men├║ colapsable */
.sidebar:not(.pinned) .menu-fixed {
    display: none;
}

.sidebar:not(.pinned) .menu-collapsible {
    display: block;
}

.sidebar:not(.pinned) {
    width: 280px;
}

.sidebar:not(.pinned).collapsed {
    width: 60px;
}

/* Cuando est├í pinned: mostrar men├║ fijo */
.sidebar.pinned .menu-fixed {
    display: block;
}

.sidebar.pinned .menu-collapsible {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.menu-item i {
    width: 20px;
    margin-right: 0.75rem;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
}

.sidebar.collapsed .menu-header span {
    display: none;
}

.sidebar.collapsed .menu-header {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .menu-header div i {
    margin-right: 0;
}

.sidebar.collapsed .toggle-icon {
    display: none;
}

.menu-group {
    margin-bottom: 0.5rem;
    position: relative;
}

.menu-group.open {
    margin-bottom: 1rem;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.menu-header:hover {
    background-color: rgba(255,255,255,0.1);
}

.menu-header > div {
    display: flex;
    align-items: center;
}

.menu-header div i {
    width: 20px;
    margin-right: 0.75rem;
}

.toggle-icon {
    transition: transform 0.2s;
}

.menu-group.open .toggle-icon {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-top: 0.25rem;
}

.menu-group.open .submenu {
    max-height: 500px;
    overflow-y: auto;
}

.menu-subitem {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 4px;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s;
}

.menu-subitem i {
    width: 16px;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.menu-subitem:hover {
    background-color: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(2px);
}

.sidebar.pinned.collapsed .menu-group .submenu {
    display: none;
}

.sidebar.pinned.collapsed .menu-group .toggle-icon {
    display: none;
}

.sidebar.pinned.collapsed .menu-group .menu-header span {
    display: none;
}

.sidebar:not(.pinned).collapsed .submenu {
    display: none;
}

.user-section {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar.collapsed .user-info span,
.sidebar.collapsed .login-btn span {
    display: none;
}

.sidebar.collapsed .login-btn {
    justify-content: center;
    padding: 0.5rem;
}

.sidebar.collapsed .user-section {
    justify-content: center;
}

.content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background-color: #f8f9fa;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .content {
    margin-left: 60px;
}

/* ===== ESTILOS PARA LA P├üGINA DE INICIO - CANGURO MATEM├üTICO ===== */

/* Colores oficiales del Canguro Matem├ítico */
:root {
    --kangaroo-orange: #FF6B35;
    --kangaroo-yellow: #FFD23F;
    --kangaroo-red: #E63946;
    --kangaroo-blue: #4A90E2;
    --kangaroo-green: #06D6A0;
    --kangaroo-purple: #9D4EDD;
}

/* Hero Section */
.kangaroo-hero {
    background: linear-gradient(135deg, #FF6B35 0%, #FFD23F 50%, #E63946 100%);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
    font-size: 3rem;
    font-weight: bold;
    color: white;
}

.shape-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid white;
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.shape-square {
    width: 70px;
    height: 70px;
    background: white;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
    transform: rotate(45deg);
}

.shape-star {
    top: 60%;
    right: 10%;
    animation-delay: 1.5s;
}

.shape-number {
    bottom: 10%;
    right: 25%;
    animation-delay: 0.5s;
}

.shape-plus {
    top: 30%;
    left: 5%;
    animation-delay: 2.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.kangaroo-mascot {
    animation: bounceIn 1s ease-out;
}

.kangaroo-mascot img {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

@keyframes bounceIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

.bounce-animation {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-title {
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.title-part {
    display: block;
    animation: slideIn 0.8s ease-out;
}

.title-welcome {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.title-main {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #FFD23F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hero-subtitle {
    color: white;
    font-size: 1.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.8;
}

/* Botones estilo Canguro */
.btn-kangaroo {
    display: block;
    width: 100%;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.btn-kangaroo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-kangaroo:hover::before {
    width: 300px;
    height: 300px;
}

.btn-kangaroo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    color: white;
}

.btn-kangaroo i {
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

.btn-kangaroo span {
    position: relative;
    z-index: 1;
}

.btn-kangaroo-orange {
    background: linear-gradient(135deg, #FF6B35, #E63946);
}

.btn-kangaroo-green {
    background: linear-gradient(135deg, #06D6A0, #118AB2);
}

.btn-kangaroo-blue {
    background: linear-gradient(135deg, #4A90E2, #9D4EDD);
}

/* Secci├│n de caracter├¡sticas */
.features-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #fff 100%);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #FF6B35;
    margin-bottom: 3rem;
}

.title-emoji {
    display: inline-block;
    animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    75% { transform: rotate(15deg) scale(1.1); }
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.feature-card-orange::before {
    background: linear-gradient(90deg, #FF6B35, #FFD23F);
}

.feature-card-yellow::before {
    background: linear-gradient(90deg, #FFD23F, #E63946);
}

.feature-card-blue::before {
    background: linear-gradient(90deg, #4A90E2, #06D6A0);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.feature-card-orange:hover {
    border-color: #FF6B35;
}

.feature-card-yellow:hover {
    border-color: #FFD23F;
}

.feature-card-blue:hover {
    border-color: #4A90E2;
}

.feature-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 3rem;
    color: white;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.feature-card-orange .feature-icon {
    background: linear-gradient(135deg, #FF6B35, #E63946);
}

.feature-card-yellow .feature-icon {
    background: linear-gradient(135deg, #FFD23F, #FFA500);
}

.feature-card-blue .feature-icon {
    background: linear-gradient(135deg, #4A90E2, #9D4EDD);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.feature-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.feature-decoration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 3rem;
    opacity: 0.1;
}

/* Secci├│n Acerca de */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #FFD23F 0%, #FF6B35 100%);
    color: white;
}

.about-image-container {
    position: relative;
    padding: 2rem;
}

.image-decoration {
    position: absolute;
    font-size: 4rem;
    opacity: 0.3;
    animation: float 4s ease-in-out infinite;
}

.decoration-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.decoration-2 {
    top: 50%;
    right: 0;
    animation-delay: 1s;
}

.decoration-3 {
    bottom: 0;
    left: 50%;
    animation-delay: 2s;
}

.about-bubble {
    background: white;
    border-radius: 30px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
}

.bubble-title {
    color: #FF6B35;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}

.fun-facts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fun-fact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.fun-fact:hover {
    transform: translateX(10px);
}

.fact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.fact-text {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.about-content {
    padding: 2rem;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.info-boxes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.info-box:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.info-box-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.info-box-content h6 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.info-box-content p {
    margin: 0;
    font-size: 1rem;
}

/* Secci├│n Call to Action */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #fff 0%, #f8f9fa 100%);
}

.cta-card {
    background: linear-gradient(135deg, #4A90E2 0%, #9D4EDD 100%);
    border-radius: 30px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.cta-text {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: white;
    color: #4A90E2;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cta:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    color: #4A90E2;
}

.cta-stars {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.star {
    display: inline-block;
    font-size: 2rem;
    animation: twinkle 1.5s ease-in-out infinite;
}

.star:nth-child(2) {
    animation-delay: 0.3s;
}

.star:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Botones generales (para todas las p├íginas excepto Home) */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 400;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Los botones especiales del Home mantienen sus estilos personalizados */

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .content {
        margin-left: 0;
    }

    /* Ajustes para m├│viles - Home */
    .kangaroo-hero {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .title-main {
        font-size: 2rem !important;
    }

    .title-welcome {
        font-size: 1.3rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .kangaroo-mascot img {
        max-width: 150px !important;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    .feature-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 2rem !important;
    }

    .cta-title {
        font-size: 1.8rem !important;
    }

    .cta-text {
        font-size: 1rem !important;
    }

    .btn-cta {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
    }

    .info-boxes {
        gap: 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .about-section .row {
        flex-direction: column-reverse;
    }
}
