/* ==========================================
   ORGANIGRAMA STYLES
   ========================================== */

.organigrama-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero Section */
.organigrama-hero {
    position: relative;
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.organigrama-hero::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 1000 100" preserveAspectRatio="none"><polygon fill="rgba(255,255,255,0.1)" points="1000,0 1000,100 0,100"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-background {
    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"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

/* Main Section */
.organigrama-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin-bottom: 30px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-description {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Organigrama Wrapper */
.organigrama-wrapper {
    margin-bottom: 60px;
}

.organigrama-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.organigrama-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.organigrama-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.organigrama-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.organigrama-title i {
    color: #667eea;
    font-size: 1.5rem;
}

.organigrama-actions {
    display: flex;
    gap: 10px;
}

.organigrama-actions button,
.organigrama-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: white;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.organigrama-actions button:hover,
.organigrama-actions a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Image Container */
.organigrama-content {
    position: relative;
    padding: 20px;
    background: white;
    min-height: auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
}

.organigrama-content.zoomed {
    cursor: zoom-out;
    overflow: auto;
    max-height: 80vh;
}

/* Image Error Styles */
.image-error {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
}

.error-content {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.error-content i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 20px;
}

.error-content h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.error-content code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #d63384;
}

.error-content .btn {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.organigrama-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.organigrama-image.zoomed {
    transform: scale(1.8);
    cursor: zoom-out;
    position: relative;
    z-index: 10;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    cursor: pointer;
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    pointer-events: none;
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.overlay-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Info Cards */
.info-cards {
    margin-top: 60px;
}

.info-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    height: 100%;
}

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

.info-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-card p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Modal Styles */
.modal-fullscreen .modal-content {
    background: #000;
    border: none;
}

.modal-fullscreen .modal-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
}

.modal-fullscreen .modal-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-fullscreen .modal-title i {
    color: #667eea;
}

.modal-fullscreen .modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.fullscreen-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .organigrama-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .organigrama-title {
        justify-content: center;
    }
    
    .info-cards .col-md-4 {
        margin-bottom: 30px;
    }
    
    .organigrama-section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .organigrama-hero {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .organigrama-header {
        padding: 20px;
    }
    
    .organigrama-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-card {
        padding: 30px 20px;
    }
}