*,
*::before,
*::after {
    box-sizing: border-box;
}

.index-body {
    font-family: Arial, sans-serif;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    overflow-x: hidden !important;
}

body:not(.index-body) {
        font-family: "Helvetica Neue", Arial, sans-serif;
        line-height: 1.6;
        max-width: 36em;
        margin: 2em auto;
        padding: 0 1em;
        color: #1a1a1a;
        background-color: #fdfdfd;
        /* border: 3px solid red !important; Linea comentada es solo para ver el tamaño real de la pagina*/
      }

header, footer {
    text-align: center;
    margin: 2em 0;
}

h1 {
    text-align: left;
    color: #222;
}

h2, h3 {
    text-align: left;
    color: #222;
    margin-top: 1.5em;
}

ol, ul {
    margin: 1em 0;
    padding-left: 1.5em;
}

.nav-footer {
    text-align: center;
    margin: 3em 0 1em 0;
    padding: 20px 0;
    border-top: 2px solid #007b23;
}

.nav-footer .nav-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    background: #007b23;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-footer .nav-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .nav-footer {
        margin: 2em 0;
    }
    .nav-footer .nav-btn {
        display: block;
        margin: 10px auto;
        width: 90%;
        max-width: 300px;
    }
}

.container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

.sidebar {
    flex: 0 0 280px;
    background: white;/*linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); /*o white*/
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #007b23;
    height: fit-content;
    position: sticky;
    top: 30px;
}

.sidebar-title {
    color: #007b23;
    border-bottom: 2px solid #007b23;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.sidebar-links li {
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.sidebar-links li:hover {
    transform: translateX(5px);
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;/*white; /* o ##f8f9fa */
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-links a:hover {
    background: #007b23;
    color: white;
    border-left-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0,123,35,0.2);
}

.sidebar-links i {
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.sidebar-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-top: 20px;
}

.sidebar-info h3 {
    color: #007b23;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-info p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.main-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.main-content .index-title {
    margin-top: 0;
    color: #222;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.main-content .html-container a.nav-btn {
    display: block;
    padding: 12px 16px;
    background: #007b23;
    margin: 8px 0;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.main-content .html-container a.nav-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-content .html-container {
    margin-top: 20px;
}

.content-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 4px solid #007b23;
}

.content-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    color: #555;
}

/* ===== FOOTER ESPECÍFICO PARA INDEX ===== */
.index-footer {
    background: linear-gradient(135deg, #2c3e50, #1a1a2e);
    color: white;
    padding: 40px 0 20px;
    border-top: 5px solid #007b23;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-left, .footer-right {
    flex: 1;
}

.footer-center {
    flex: 2;
    text-align: center;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
}

.footer-logo:hover {
    background: rgba(0,123,35,0.3);
    transform: translateY(-5px);
}

.footer-logo i {
    margin-bottom: 10px;
}

.footer-logo span {
    font-size: 0.9em;
    opacity: 0.9;
}

.main-logo {
    text-align: center;
}

.main-logo i {
    color: #007b23;
    margin-bottom: 15px;
}

.main-logo h3 {
    margin: 10px 0 5px;
    font-size: 1.8em;
}

.main-logo p {
    opacity: 0.8;
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.footer-sub {
    font-size: 0.8em;
    margin-top: 5px;
    opacity: 0.6;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: #007b23;
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.close-menu {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #007b23;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    background: #0056b3;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== RESPONSIVE PARA INDEX ===== */
@media (max-width: 1024px) {
    .menu-toggle {
    display: flex;
}
    
    .container {
        flex-direction: column;
        gap: 20px;
        padding: 80px 20px 20px;
        margin-top: 0;
    }
    
    .sidebar {
        flex: none;
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: calc(-100% - 40px); 
        z-index: 1001;
        transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        border-radius: 0 15px 15px 0;
        border-left: none;
        border-top: none;
        border-bottom: none;
        box-shadow: 5px 0 25px rgba(0,0,0,0.15);
        padding-top: 25px;
    }

    .sidebar.active {
        left: 0;
    }
    
    .sidebar.active .close-menu {
        display: flex;
    }
    
    .menu-overlay {
        display: block;
        pointer-events: none;
    }
    
    .menu-overlay.active {
        display: block;
        pointer-events: auto;
    }
    
    .main-content {
        padding: 20px;
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }

    .sidebar.active ~ .main-content {
        position: relative;
        z-index: 1;
    }
    
    .footer-content {
        flex-direction: row !important;
        gap: 20px;
        text-align: center;
        flex-wrap: wrap;
        justify-content: space-around;
        overflow-x: hidden;
    }
    
    .footer-left, .footer-right {
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }
    
    .footer-center {
        flex: 2;
        min-width: 200px;
        order: 0; 
    }
    
    .footer-logo {
        padding: 12px;
    }
    
    .footer-logo i {
        font-size: 1.5em;
    }
    
    .main-logo i {
        font-size: 2em;
    }
    
    .main-logo h3 {
        font-size: 1.4em;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: row !important;
        gap: 15px;
        justify-content: space-around;
    }
    
    .footer-left, .footer-right {
        flex: 1;
        min-width: 110px;
    }
    
    .footer-center {
        flex: 2;
        min-width: 180px;
        margin-bottom: 0;
        
    }
}

@media (max-width: 600px) {
    .menu-toggle {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }

    .sidebar {
        width: 260px;
        left: calc(-100% - 40px); 
    }
    
    .sidebar-title {
        font-size: 1.2em;
        margin-top: 10px;
        padding-right: 40px;
    }
    
    .main-content .index-title {
        font-size: 1.5em;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
    
    .footer-content {
        flex-direction: row !important;
        gap: 12px;
    }
    
    .footer-logo {
        padding: 10px;
    }
    
    .footer-logo i {
        font-size: 1.4em;
        margin-bottom: 5px;
    }
    
    .footer-logo span {
        font-size: 0.8em;
    }
    
    .main-logo i {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .main-logo h3 {
        font-size: 1.2em;
        margin: 5px 0 3px;
    }
    
    .main-logo p {
        font-size: 0.9em;
    }
    
    .footer-bottom {
        font-size: 0.8em;
        padding: 15px 10px 0;
    }
    
    .footer-sub {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 250px;
        left: calc(-100% - 40px);
    }
    
    .footer-content {
        flex-direction: column !important;
        gap: 10px;
    }
    
    .footer-left, .footer-right {
        min-width: 100px;
    }
    
    .footer-center {
        min-width: 150px;
        order: 0;
        margin-bottom: 10px;
    }

    .footer-logo {
        pointer-events: auto !important;
        position: relative;
        z-index: 100;
    }

    .footer-logo span {
        font-size: 0.8em;
    }
    
    .main-logo h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 380px) {
    .footer-content {
        flex-direction: column !important;
        gap: 15px;
        align-items: center;
    }
    
    .footer-left, .footer-right, .footer-center {
        width: 100%;
        max-width: none;
        display: flex;
        justify-content: center;
    }
}

.index-footer a {
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 50;
}

/* Evitar que otros elementos interfieran */
.footer-content {
    position: relative;
    z-index: 10;
    overflow-x: hidden;
}
.footer-logo:active {
    background-color: rgba(0, 123, 35, 0.5) !important;
}
/* Debug: resaltar enlaces para probar */
.footer-logo:active {
    background-color: rgba(0, 123, 35, 0.5) !important;
}
