/* Panel centrado */
#center-info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6000;
    overflow-y: auto;
    /* Safety fallback */
    overflow-x: hidden;
    max-height: 80vh;
    /* Reduced height */
    max-width: 85vw;
}

#center-info-panel.hidden {
    display: none;
}


/* Contenido interno adaptado al panel */
#center-info-content {
    width: clamp(400px, 65vw, 750px);
    /* Nano width */
    min-width: 0;
    max-width: 85vw;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    padding: 20px 25px;
    /* Increased padding */
    border-radius: 6px;
    background: linear-gradient(135deg,
            rgba(15, 32, 39, 0.99),
            rgba(32, 58, 67, 0.99),
            rgba(44, 83, 100, 0.99));
    border: 1px solid #00eaff;
    color: white;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

/* Título del panel */
.tech-panel-title {
    text-align: left;
    font-size: clamp(0.9rem, 1.4vw, 1.15rem);
    /* Nano title */
    color: #00eaff;
    font-weight: bold;
    margin: 15px 0 20px 0;
    /* Aligned with close button */
}

/* Botón de cierre */
#close-center-panel {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 22px;
    color: #00eaff;
}

/* Imagen principal */
#center-info-content .tech-main-image {
    width: 100%;
    height: 320px;
    /* Fixed height for standardization */
    max-height: none;
    max-width: 100%;
    border-radius: 3px;
    object-fit: cover;
    margin: 0;
}

/* Contenedor de imagen + puntos */
.tech-image-wrapper {
    flex: 0 0 35%;
    max-width: 35%;
}

.tech-content-with-image {
    display: flex;
    align-items: flex-start;
    /* Align top so image height is independent */
    gap: 20px;
    width: 100%;
    flex: 1;
}



/* Media query para pantallas más pequeñas */
@media (max-width: 768px) {
    .tech-content-with-image {
        flex-direction: column;
        align-items: stretch;
    }

    #center-info-content .tech-main-image {
        max-width: 300px;
        /* Reducir el tamaño de la imagen en móviles */
    }

    .tech-image-wrapper {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }
}

/* Contenedor de puntos */
.tech-description-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

/* New Responsive Grid for internal content blocks (AI, AR) */
.tech-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Reduced gap */
    width: 100%;
}

.tech-grid-2col h4 {
    color: #FFC000;
    font-size: 0.82rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.tech-grid-2col p {
    color: #ffffff;
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    line-height: 1.2;
    margin-bottom: 6px;
}

.tech-grid-2col ul {
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    padding-left: 0;
    list-style: none;
    /* Custom bullets via Flexbox */
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.tech-grid-2col ul li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.25;
}

.tech-grid-2col ul li::before {
    content: "•";
    color: #FFC000;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1.25;
}

.tech-description-container {
    color: #e2f5f5;
    line-height: 1.3;
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    /* Equalized */
    text-align: justify;
    width: 100%;
}

.tech-points-list-small {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    /* Equalized */
    gap: 4px;
    display: flex;
    flex-direction: column;
}

.tech-points-list-small li {
    line-height: 1.25;
    font-size: inherit;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.tech-points-list-small li::before {
    content: "•";
    color: #FFC000;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1.25;
}

/* GLOBAL RESET FOR INFO PANEL LISTS */
#center-info-content li {
    font-size: clamp(0.68rem, 0.85vw, 0.82rem) !important;
}

.tech-description-wrapper p {
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    /* Nano text */
    margin-bottom: 6px;
    line-height: 1.25;
}

.tech-description-wrapper .column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.tech-description-wrapper .column li {
    margin-bottom: 14px;
}

.tech-description-wrapper .column li:last-child {
    margin-bottom: 0;
}

/* Cuando solo hay una columna */
.tech-description-wrapper.single-column {
    flex-direction: column;
    align-items: flex-start;
}

/* Normalize bare h4 tags rendered from DB HTML (DetailedContentHtml) */
.tech-description-wrapper h4 {
    color: #FFC000 !important;
    font-size: 0.82rem !important;
    font-weight: bold !important;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
}

.tech-description-wrapper p {
    color: #ffffff !important;
    font-size: clamp(0.68rem, 0.85vw, 0.82rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
}

.tech-description-wrapper ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 0 6px 0 !important;
}

.tech-description-wrapper ul li {
    font-size: clamp(0.68rem, 0.85vw, 0.82rem) !important;
    color: #ffffff !important;
    margin-bottom: 5px !important;
    line-height: 1.25 !important;
}

.tech-description-wrapper strong {
    font-weight: bold !important;
    color: #ffffff !important;
}


/* Lista de puntos */
.tech-description-wrapper ul {
    list-style: disc;
    padding-left: 10px;
    margin: 0;
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    /* Equalized with p */
    list-style-position: inside;
}

.tech-description-wrapper ul li {
    margin-bottom: 3px;
    line-height: 1.15;
}

/* Items de la lista */
.tech-description-wrapper ul li {
    white-space: normal;
    /* Permitir wrapping */
    overflow: visible;
    /* Mostrar todo texto */
    text-overflow: clip;
}

/* --- Seccion de Proyectos (Buttons) --- */

.tech-projects-section {
    width: 100%;
    margin-top: 25px;
    /* Increased spacing */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tech-projects-section h3 {
    width: 100%;
    margin-bottom: 15px;
    color: #FFC000 !important;
    /* Gold/Yellow color */
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    /* Mismo tamaño que el texto */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.project-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Aligned to left */
    gap: 10px;
    width: 100%;
}

.tech-project-btn {
    flex: 0 1 auto;
    min-width: 110px;
    max-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid #00eaff;
    background-color: transparent;
    color: #00eaff;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    height: auto;
    min-height: 24px;
}

.tech-project-btn:hover {
    background-color: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}

.tech-project-btn.active-btn {
    background-color: rgba(0, 234, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
    transform: scale(1.02);
}

/* --- Grillas Simetricas Especificas --- */

/* Digital Twin: De 3 en 3 (Simetria perfecto 3x3 para 9) */
.tech-digital-twin .project-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: start;
    /* Aligned to left */
}

/* AI y Live Site: De 5 en 5 (Alineado a la izquierda) */
.tech-scaffolding .project-buttons,
.tech-live-site .project-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: start;
    /* Aligned to left */
}

/* Drones: Flex a la izquierda (Alineacion dinamica) */
.tech-drones .project-buttons {
    display: flex;
    justify-content: flex-start;
}

/* Extended Reality: De 4 en 4 (Simetria perfecta para 8) */
.tech-ar .project-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: start;
    gap: 10px;
}

.tech-digital-twin .tech-project-btn,
.tech-ar .tech-project-btn,
.tech-scaffolding .tech-project-btn,
.tech-live-site .tech-project-btn {
    width: 100%;
    max-width: none;
    flex: none;
}

/* Styled Card with Border */
.styled-card-with-border {
    border: 2px solid #00eaff;
    border-radius: 15px;
    padding: 5px;
    /* Reduced padding for smaller card height */
    background: rgba(15, 32, 39, 0.8);
    transition: all 0.3s ease;
}


/* Card Content Wrapper: Flex container for image and text */
.card-content-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    /* Remove underline from the link */
    gap: 10px;
    /* Space between image and text */
    padding: 3px;
    /* Reduced internal padding for smaller card content */
}

/* Image Container */
.card-image-container {
    flex-shrink: 0;
    /* Prevent image from shrinking */
    width: 60px;
    /* Nano image width */
    height: 60px;
    /* Nano image height */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* Match card border-radius */
    overflow: hidden;
    /* Ensure image doesn't overflow container */
}

/* --- Iconos Animados (Hologramas) --- */

.hologram-icon-container {
    width: 100%;
    height: 100%;
    background: rgba(0, 234, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Radar Sonar (Live Site) */
.hologram-sonar {
    width: 32px;
    height: 32px;
    position: relative;
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sonar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(0, 234, 255, 0.4), transparent 90deg);
    animation: sonar-rotate 2s infinite linear;
}

.sonar-blip {
    width: 4px;
    height: 4px;
    background: #00eaff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00eaff;
    position: absolute;
    top: 20%;
    right: 30%;
    animation: blip-fade 2s infinite;
}

@keyframes sonar-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes blip-fade {

    0%,
    20% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Cyber Helmet (Construction / TRIA) */
.hologram-cyber-helmet {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 100px;
}

.helmet-shell {
    width: 20px;
    height: 16px;
    background: #00eaff;
    border-radius: 10px 10px 4px 4px;
    position: relative;
    box-shadow: 0 0 12px rgba(0, 234, 255, 0.6);
}

.helmet-visor {
    width: 22px;
    height: 4px;
    background: rgba(15, 32, 39, 0.8);
    position: absolute;
    bottom: 4px;
    left: -1px;
    border: 1px solid #00eaff;
}

.helmet-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.2), transparent 70%);
    animation: helmet-beat 2s infinite ease-in-out;
}

@keyframes helmet-beat {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Scanning Digital Twin Animation */
.digital-twin-scan {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-core {
    width: 8px;
    height: 8px;
    background: #00eaff;
    border-radius: 50%;
    box-shadow: 0 0 15px #00eaff;
    animation: core-pulse 2s infinite ease-in-out;
}

.scan-wireframe {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 234, 255, 0.4);
    transform: rotate(45deg);
    animation: wireframe-rotate 4s infinite linear;
}

.scan-wireframe::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid rgba(0, 234, 255, 0.6);
    transform: rotate(45deg);
}

.scan-line {
    position: absolute;
    width: 120%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00eaff, transparent);
    box-shadow: 0 0 8px #00eaff;
    animation: scan-move 2.5s infinite ease-in-out;
}

@keyframes core-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes wireframe-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes scan-move {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Drone Animation */
.hologram-drone {
    width: 32px;
    height: 32px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateX(45deg);
}

.drone-body {
    width: 6px;
    height: 6px;
    background: #00eaff;
    border-radius: 1px;
    box-shadow: 0 0 10px #00eaff;
}

.drone-arm {
    position: absolute;
    width: 12px;
    height: 1px;
    background: #00eaff;
    top: 50%;
    left: 50%;
    transform-origin: left;
}

.arm-1 {
    transform: rotate(45deg);
}

.arm-2 {
    transform: rotate(135deg);
}

.arm-3 {
    transform: rotate(225deg);
}

.arm-4 {
    transform: rotate(315deg);
}

.drone-arm::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 1px;
    background: rgba(0, 234, 255, 0.8);
    right: -5px;
    top: 0;
    animation: prop-spin 0.2s infinite linear;
}

@keyframes prop-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.card-image-container img {
    width: 100%;
    /* Make image fill its container */
    height: 100%;
    object-fit: cover;
    /* Cover the area, cropping if necessary */
}

/* Text Container */
.card-text-container {
    flex-grow: 1;
    /* Allow text container to take remaining space */
}

.card-text-container h3 {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    /* Compact title */
    color: #00eaff;
    margin: 0 0 3px 0;
    /* Space below title */
}

.card-text-container p {
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    color: #B0B0B0;
    margin: 0;
    line-height: 1.2;
}