/* ========== Estructura general ========== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e0e0e0;
}

/* ========== Encabezado ========== */
header {
    background-color: #6a0dad;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========== Contenido principal ========== */
main {
    flex: 1;
    padding: 20px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    background-color: white;
    border-radius: 8px;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
}

/* ========== Tabs ========== */
.tabs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}
.tabs-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.tabs-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    max-width: 100%;
    box-sizing: border-box;
}

.tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.tabs {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: max-content;
}

.tab-button {
    background-color: #eee;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #555;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px 5px 0 0;
    white-space: nowrap;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #6a0dad;
    color: white;
    border-bottom: 2px solid #6a0dad;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    text-align: center;
    color: #6a0dad;
    margin-bottom: 20px;
}

/* ========== Tablas ========== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #eee;
    font-weight: bold;
    color: #555;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 2px solid #6a0dad;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
    color: #6a0dad;
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    text-decoration: underline;
}

/* ========== Footer ========== */
footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #333;
    color: white;
    font-size: 0.9em;
    width: 100%;
    margin-top: auto;
}

/* ========== Menú lateral ========== */
#menuToggle {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

#sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 220px;
    height: 100%;
    background-color: #6a0dad;
    padding-top: 60px;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}

#sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar nav ul li {
    padding: 15px 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

#sidebar nav ul li:hover {
    background-color: #5a0099;
}

#sidebar.active {
    left: 0;
}

/* ========== Secciones ocultas (About / CEO) ========== */
.hidden-section {
    display: none;
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* ========== Sección: Acerca de Moonly ========== */
.about-logo {
    max-width: 150px;
    display: block;
    margin: 0 auto 20px auto;
}

#aboutMoonly h2,
#aboutMoonly h3 {
    color: #6a0dad;
    text-align: center;
    margin-top: 1.5em;
}

#aboutMoonly p,
#aboutMoonly li {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

#aboutMoonly ul {
    padding-left: 1.5em;
    margin-top: 0.5em;
}

.about-intro {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 1.5em;
    text-align: center;
}

.about-footer {
    margin-top: 2em;
    text-align: center;
    font-style: italic;
    color: #555;
}

.about-footer a {
    color: #6a0dad;
    font-weight: bold;
    text-decoration: none;
}

.about-footer a:hover {
    text-decoration: underline;
}

/* ========== Sección: CEO ========== */
#ceoSection p {
    text-align: justify;
    line-height: 1.6;
}

#ceoSection .social-links {
    margin-top: 10px;
}

.ceo-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ceo-text {
    flex: 1;
    min-width: 250px;
    order: 1;
}

.ceo-image {
    max-width: 300px;
    border-radius: 12px;
    order: 2;
}

@media (max-width: 768px) {
    .ceo-layout {
        flex-direction: column;
    }

    .ceo-text {
        order: 1;
    }

    .ceo-image {
        order: 3;
        margin: 0 auto;
    }

    #ceoSocials {
        order: 2;
        margin-bottom: 10px;
    }
}

/* Tabs reorganizados */
.tabs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.tabs-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tab-button {
    background-color: #eee;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #555;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px 5px 0 0;
    white-space: nowrap;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #6a0dad;
    color: white;
    border-bottom: 2px solid #6a0dad;
}

.social-card {
    display: grid;
    place-items: center;
    text-decoration: none;
    background-color: #f5f5f5;
    border-radius: 12px;
    width: 100px;
    height: 70px;
    margin: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #333;
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

.social-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.social-icon {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    margin-bottom: 6px;
    display: block;
}

.social-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}



/* En móvil, mostrar Representantes arriba en solitario */
@media (max-width: 768px) {
    .tabs-container {
        gap: 5px;
    }

    .tabs-group.top {
        justify-content: center;
    }

    .tabs-group.bottom {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab-button {
        min-width: 110px;
        text-align: center;
    }

    .social-label {
        display: none;
    }

    .social-card {
        max-width: 45px;
        max-height: 45px;
        margin: 1px;
    }
}

