/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores cálidos basados en paleta institucional */
    --primary-color: #1a4d7a;
    --secondary-color: #c9a961;
    --accent-color: #d4af37;
    --warm-blue: #2d5f8f;
    --warm-gold: #e6c86e;
    --light-bg: #f5f3eb;
    --warm-white: #faf8f2;
    --smoke-white: #f5f5f0;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--smoke-white);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Page Wrapper */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    width: 450px;
    background: white;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-right: 3px solid var(--primary-color);
}

.sidebar-content {
    width: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    flex: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.sidebar-footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-top: 2px solid var(--primary-color);
    margin-top: 20px;
}

.sidebar-footer p {
    margin: 0;
    color: var(--text-dark);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 450px;
    width: calc(100vw - 450px);
    background-color: var(--smoke-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow-x: hidden;
}

.main-content.slide-left {
    width: calc(100vw - 450px - 400px);
}

.content-wrapper {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px 60px 40px;
    align-self: stretch;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.slide-left .content-wrapper {
    max-width: 100%;
}

/* Decorative Borders */
.decorative-border-top,
.decorative-border-middle,
.decorative-border-bottom {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.border-line {
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

.blue-line {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--warm-blue) 100%);
    box-shadow: 0 2px 4px rgba(26, 77, 122, 0.2);
}

.gold-line {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    box-shadow: 0 2px 4px rgba(201, 169, 97, 0.2);
}

/* Navigation Bar */
.nav-bar {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid var(--primary-color);
    border-radius: 0 0 8px 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.nav-container {
    position: relative;
    display: inline-block;
    overflow: visible;
}

.nav-container:not(:last-child) .nav-item {
    border-right: 1px solid rgba(26, 77, 122, 0.15);
}

.nav-item {
    padding: 14px 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover::before {
    transform: scaleX(1);
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(26, 77, 122, 0.08) 0%, rgba(201, 169, 97, 0.08) 100%);
}

.nav-item[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(26, 77, 122, 0.12) 0%, rgba(201, 169, 97, 0.12) 100%);
}

.nav-item[aria-expanded="true"]::before {
    transform: scaleX(1);
}

.nav-link {
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.nav-item:hover .nav-link {
    color: var(--warm-blue);
}

.nav-item[aria-expanded="true"] .nav-link {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-icon {
    color: var(--secondary-color);
    font-size: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    margin-left: 2px;
}

.nav-item:hover .nav-icon {
    color: var(--accent-color);
}

.nav-item[aria-expanded="true"] .nav-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.nav-item-documents .nav-icon {
    display: none;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    min-width: calc(100vw - 450px);
    margin-left: 0;
    display: block;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(201, 169, 97, 0.2);
    border-top: 2px solid var(--secondary-color);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.5s;
    visibility: hidden;
}

.nav-dropdown.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.nav-content {
    padding: 35px 40px;
    min-width: 400px;
    max-width: 600px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.nav-content p {
    color: #1a1a1a;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.25rem;
    line-height: 2;
    text-align: justify;
    margin: 0;
    padding: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    display: block;
    visibility: visible;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* Banner Section */
.banner-section {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    max-height: 500px;
    align-self: stretch;
    position: relative;
}

.banner-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* Council Section */
.council-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.council-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 30px;
}

.council-group {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(26, 77, 122, 0.12);
    border-top: 5px solid var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
}

.council-group-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.council-group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.council-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.council-member {
    width: 100%;
}

.member-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--warm-white) 100%);
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(26, 77, 122, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-top: 3px solid var(--primary-color);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(26, 77, 122, 0.2);
    border-color: var(--secondary-color);
}

.member-name {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.member-role {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 12px;
    border-top: 2px solid rgba(201, 169, 97, 0.3);
}

/* Documents Section */
.services-section {
    margin-top: 40px;
    margin-bottom: 60px;
}

.section-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    border-radius: 2px;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.service-card {
    background: var(--primary-color);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.service-card.service-blue {
    background: var(--primary-color);
}

.service-card.service-gold {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    fill: none;
}

.service-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* Service Modal */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-modal.active {
    display: flex;
    opacity: 1;
}

.service-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.service-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    z-index: 1;
}

.service-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.service-modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.service-detail-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.service-detail-left {
    flex: 0 0 40%;
    padding: 0;
    background: #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.service-detail-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    line-height: 1.2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.service-detail-text {
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    text-align: left;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.service-detail-right {
    flex: 0 0 60%;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #e8e8e8;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.6s ease 0.6s, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.service-modal.active .service-detail-right {
    opacity: 1;
    transform: translateX(0);
}

.service-detail-right.service-gold {
    background: #e8e8e8;
}

.service-detail-right .service-detail-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    line-height: 1.2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

.service-detail-right .service-detail-text {
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    text-align: left;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.service-detail-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-detail-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    fill: none;
}

.service-detail-name {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.document-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
    border-top: 2px solid var(--primary-color);
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-hover);
    border-left-color: var(--accent-color);
    border-top-color: var(--warm-blue);
}

.document-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-document {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-open:hover {
    background: var(--warm-blue);
    transform: translateY(-2px);
}

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

.btn-download:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 350px;
    }

    .main-content {
        margin-left: 350px;
    }

    .logo {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 200px;
        border-right: none;
        border-bottom: 3px solid var(--primary-color);
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 40px 20px;
    }
    
    .services-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .service-card {
        padding: 30px 20px;
        min-height: 160px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .service-title {
        font-size: 1.1rem;
    }

    .council-members {
        grid-template-columns: 1fr;
    }

    .council-group {
        padding: 25px;
    }

    .services-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .service-card {
        padding: 30px 20px;
        min-height: 180px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .service-title {
        font-size: 1rem;
    }

    .logo {
        max-height: 150px;
    }

    .section-title {
        font-size: 2rem;
    }

    .accordion-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Documents Panel */
.documents-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.documents-panel.active {
    transform: translateX(0);
}

.documents-panel-header {
    padding: 20px 25px;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    position: sticky;
    top: 0;
    z-index: 10;
}

.documents-panel-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.close-documents-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-documents-btn:hover {
    background: rgba(26, 77, 122, 0.1);
    transform: rotate(90deg);
}

.documents-panel-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.module-button {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(26, 77, 122, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.module-button:hover {
    background: rgba(26, 77, 122, 0.05);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.module-button.active {
    background: linear-gradient(135deg, rgba(26, 77, 122, 0.1) 0%, rgba(201, 169, 97, 0.1) 100%);
    border-color: var(--secondary-color);
}

.module-button::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.module-button.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.module-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    margin-bottom: 12px;
}

.module-links.active {
    max-height: 500px;
    opacity: 1;
}

.module-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: var(--text-dark);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-bottom: 4px;
}

.module-link:hover {
    background: rgba(26, 77, 122, 0.05);
    border-left-color: var(--primary-color);
    padding-left: 45px;
}

.module-link:last-child {
    margin-bottom: 0;
}
