/* ============================================================================
   ESTILOS GENERALES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* ============================================================================
   NAVEGACIÓN
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-menu {
        justify-content: center;
        width: 100%;
    }
}

/* ============================================================================
   SECCIONES GENERALES
   ============================================================================ */

.section {
    padding: 3rem 0;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.section:nth-child(even) {
    background-color: #f5f5f5;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #0066cc;
    text-align: center;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 1rem;
}

.section h3 {
    font-size: 1.8rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #004999;
}

.section h4 {
    font-size: 1.3rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #006633;
}

/* ============================================================================
   SECCIÓN INICIO (HERO)
   ============================================================================ */

.inicio-section {
    padding-top: 0;
}

.hero-image {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    overflow: hidden;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #f0f0f0 100%);
}

.hero-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
}

.intro-text {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 2rem;
    border-left: 5px solid #0066cc;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.intro-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.intro-text a {
    display: inline-block;
}

.project-overview {
    background: white;
    padding: 2rem;
    border: 2px solid #0066cc;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.project-overview p {
    margin-bottom: 1rem;
    text-align: justify;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.highlight-item {
    background: linear-gradient(135deg, #f0f7ff 0%, #f7f0ff 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.highlight-item h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    font-size: 0.95rem;
}

/* ============================================================================
   SECCIÓN PARTICIPANTES
   ============================================================================ */

.subsection {
    margin-bottom: 2.5rem;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.participant-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #0066cc;
}

.participant-card img {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.participant-card p {
    font-weight: 600;
    color: #004999;
}

.collaborator-section {
    margin-top: 1.5rem;
}

.collaborator-card {
    display: flex;
    gap: 2rem;
    background: linear-gradient(135deg, #fffaf0 0%, #f5f5f5 100%);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid #daa520;
    align-items: center;
    flex-wrap: wrap;
}

.collaborator-card img {
    max-width: 150px;
    height: auto;
    flex-shrink: 0;
}

.collaborator-info {
    flex: 1;
    min-width: 250px;
}

.collaborator-info h4 {
    color: #b8860b;
    margin-bottom: 0.5rem;
}

.collaborator-info p {
    color: #555;
}

/* ============================================================================
   SECCIÓN DESARROLLO - TIMELINE
   ============================================================================ */

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: #0066cc;
}

.timeline-item {
    margin-bottom: 2rem;
    width: 48%;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    text-align: right;
    padding-right: 3%;
}

.timeline-item:nth-child(even) {
    margin-left: 52%;
    text-align: left;
    padding-left: 3%;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #0066cc;
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -49%;
    left: auto;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #0066cc;
}

.timeline-content h3 {
    margin-top: 0;
    color: #0066cc;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        margin-left: 0 !important;
        padding-left: 50px !important;
        text-align: left !important;
        padding-right: 0 !important;
    }

    .timeline-item:nth-child(odd) .timeline-marker {
        right: auto;
        left: -5px;
    }

    .timeline-marker {
        left: 0;
        transform: none;
    }
}

/* ============================================================================
   SECCIÓN DOCUMENTACIÓN
   ============================================================================ */

.documentation-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.doc-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.doc-item:hover {
    border-color: #0066cc;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.doc-item.eplan-item {
    border-color: #daa520;
    background: linear-gradient(135deg, #fffaf0 0%, #fff9e6 100%);
}

.doc-header {
    margin-bottom: 1rem;
}

.doc-header h3 {
    margin-top: 0;
    color: #0066cc;
}

.doc-item.eplan-item .doc-header h3 {
    color: #b8860b;
}

.doc-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.materials-summary {
    background: linear-gradient(135deg, #f0f7ff 0%, #f7f0ff 100%);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid #0066cc;
    margin-top: 2rem;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.material-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.material-card h4 {
    color: #0066cc;
    margin-bottom: 1rem;
}

.material-card ul {
    list-style-position: inside;
    color: #555;
}

.material-card li {
    margin-bottom: 0.5rem;
    text-align: justify;
}

/* ============================================================================
   COMPARATIVA DE CÁMARAS
   ============================================================================ */

.camera-comparison {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    border: 2px solid #e0e0e0;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.comparison-table thead {
    background: #0066cc;
    color: white;
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ddd;
}

.comparison-table td {
    padding: 1rem;
    border: 1px solid #ddd;
    text-align: left;
}

.comparison-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.comparison-table tbody tr:hover {
    background: #f0f7ff;
}

.comparison-notes {
    background: #fffaf0;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #daa520;
}

.comparison-notes h4 {
    color: #b8860b;
    margin-bottom: 1rem;
}

.comparison-notes ul {
    list-style-position: inside;
}

.comparison-notes li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* ============================================================================
   SECCIÓN APLICACIÓN
   ============================================================================ */

.application-intro {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 1.5rem;
    border-left: 5px solid #0066cc;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
}

.app-section {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.architecture-diagram {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.component {
    background: white;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.component-title {
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.arrow {
    font-size: 2rem;
    color: #0066cc;
    margin: 0.5rem 0;
}

.flow-list {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    list-style-position: inside;
    margin-top: 1rem;
}

.flow-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.standard-features {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    list-style-position: inside;
    margin-top: 1rem;
    columns: 2;
}

.standard-features li {
    margin-bottom: 0.8rem;
    color: #555;
    break-inside: avoid;
}

.application-benefits {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    list-style-position: inside;
    margin-top: 1rem;
}

.application-benefits li {
    margin-bottom: 0.8rem;
    color: #555;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.advantage-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f5f5 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.advantage-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.advantage-card h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.integration-list {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    list-style-position: inside;
    margin-top: 1rem;
}

.integration-list li {
    margin-bottom: 0.8rem;
    color: #555;
}

/* ============================================================================
   SECCIÓN GALERÍA
   ============================================================================ */

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    background: #f0f0f0;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ============================================================================
   MODAL DE IMÁGENES
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#modalImage {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 8px 8px 0 0;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f5f5f5;
    border-radius: 0 0 8px 8px;
    gap: 1rem;
    flex-wrap: wrap;
}

.prev-btn,
.next-btn {
    background: #0066cc;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
    background: #004999;
}

.image-counter {
    font-weight: 600;
    color: #333;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

/* ============================================================================
   SECCIÓN MANUAL DE USUARIOS
   ============================================================================ */

.manual-intro {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 1.5rem;
    border-left: 5px solid #0066cc;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-size: 1.05rem;
}

.manual-section {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.important-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.important-box p {
    color: #856404;
    font-weight: 500;
}

.criteria-list {
    list-style-position: inside;
    margin-top: 1rem;
}

.criteria-list li {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

.criteria-list strong {
    color: #0066cc;
}

.setup-steps {
    list-style-position: inside;
    margin-top: 1rem;
}

.setup-steps li {
    margin-bottom: 0.8rem;
    color: #555;
    line-height: 1.6;
}

.maintenance-list {
    list-style-position: inside;
    margin-top: 1rem;
}

.maintenance-list li {
    margin-bottom: 0.8rem;
    color: #555;
}

.troubleshooting-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.troubleshooting-item {
    background: #fff9e6;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #daa520;
}

.troubleshooting-item h5 {
    color: #b8860b;
    margin-bottom: 0.5rem;
}

.troubleshooting-item p {
    margin-bottom: 0.5rem;
    color: #555;
}

.resources-list {
    list-style-position: inside;
    margin-top: 1rem;
}

.resources-list li {
    margin-bottom: 0.5rem;
    color: #555;
}

.support-list {
    list-style-position: inside;
    margin-top: 1rem;
}

.support-list li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: #333;
    color: #ccc;
    padding: 3rem 0 1rem;
    text-align: center;
    border-top: 3px solid #0066cc;
}

.footer h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.logos-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.logo-img {
    max-height: 80px;
    max-width: 150px;
    object-fit: contain;
    transition: transform 0.3s, filter 0.3s;
    filter: brightness(0.9);
}

.logo-img:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.footer-text {
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #555;
    padding-top: 1rem;
}

/* ============================================================================
   BOTONES
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #004999;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-doc {
    background: #0066cc;
    color: white;
}

.btn-doc:hover {
    background: #004999;
}

.btn-download {
    background: #daa520;
    color: white;
}

.btn-download:hover {
    background: #b8860b;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.4rem;
    }

    .section-content {
        padding: 0 1rem;
    }

    .hero-image {
        height: 250px;
    }

    .collaborator-card {
        flex-direction: column;
        text-align: center;
    }

    .collaborator-card img {
        max-width: 120px;
    }

    .highlights {
        grid-template-columns: 1fr;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.7rem;
    }

    .advantage-card {
        padding: 1rem;
    }

    .advantage-card h4 {
        font-size: 1.1rem;
    }

    .troubleshooting-table {
        grid-template-columns: 1fr;
    }

    .logos-footer {
        gap: 1rem;
    }

    .logo-img {
        max-height: 60px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.5rem 0;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .section h3 {
        font-size: 1.2rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }

    #modalImage {
        max-height: calc(95vh - 80px);
    }

    .modal-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }

    .prev-btn,
    .next-btn {
        width: 100%;
    }

    .subsection {
        margin-bottom: 1.5rem;
    }

    .participant-card,
    .material-card {
        padding: 1rem;
    }
}
