/* ===================================
   DIAGRAMAS CSS
   Styles for evolution, lifecycle and principle diagrams
   =================================== */

/* ===================================
   EVOLUTION DIAGRAM (evolucion.html)
   =================================== */

.evolution-diagram {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.evolution-stage {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--border-color);
}

.evolution-stage .stage-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.evolution-stage h3 {
    text-align: center;
    color: var(--gold);
    margin-bottom: 1rem;
}

.stage-bars {
    max-width: 400px;
    margin: 1rem auto;
}

.bar-container {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
    gap: 1rem;
}

.bar-label {
    width: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bar {
    height: 20px;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.bar-ego {
    background: linear-gradient(90deg, var(--principio-noser), #e74c3c);
}

.bar-consciencia {
    background: linear-gradient(90deg, var(--principio-ser), var(--gold));
}

.stage-desc {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

.evolution-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--gold);
    margin: 0.5rem 0;
    opacity: 0.6;
}

/* Three Paths Section */
.three-paths {
    margin-top: 2rem;
}

.paths-title {
    text-align: center;
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.path-option {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.path-option:hover {
    transform: translateY(-4px);
}

.path-ego {
    border-color: var(--principio-noser);
}

.path-ego:hover {
    border-color: #e74c3c;
}

.path-consciencia {
    border-color: var(--cyan);
}

.path-consciencia:hover {
    border-color: var(--accent);
}

.path-ser {
    border-color: var(--gold);
}

.path-ser:hover {
    border-color: #f1c40f;
}

.path-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.path-icon {
    font-size: 1.75rem;
}

.path-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.path-traits {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.path-traits li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.path-traits li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gold);
}

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

/* Path Detailed Cards */
.path-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Isomorphism Table */
.isomorphism-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.isomorphism-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.isomorphism-table th,
.isomorphism-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.isomorphism-table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 600;
}

.isomorphism-table tr:last-child td {
    border-bottom: none;
}

.isomorphism-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}


/* ===================================
   LIFECYCLE DIAGRAM (experiencia-humana.html)
   =================================== */

.lifecycle-diagram {
    display: flex;
    justify-content: center;
    padding: 2rem;
    margin: 2rem 0;
}

.lifecycle-circle {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,0.4) 30%, rgba(212,175,55,0.1) 100%);
    border: 2px solid var(--border-color);
}

.lifecycle-stage {
    position: absolute;
    width: 80px;
    height: 80px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-160px) rotate(calc(-1 * var(--angle)));
}

.stage-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stage-marker .stage-icon {
    font-size: 2rem;
}

.stage-marker .stage-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lifecycle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.center-icon {
    font-size: 2.5rem;
    display: block;
}

.center-name {
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
}

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

.dimension-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.dimension-card:hover {
    transform: translateY(-4px);
}

.dimension-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.dimension-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dimension-card > p {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.dimension-card ul {
    list-style: none;
    padding: 0;
}

.dimension-card li {
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dimension-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold);
}

.dimension-physical {
    border-color: #e74c3c;
}

.dimension-emotional {
    border-color: #e91e63;
}

.dimension-mental {
    border-color: var(--principio-pensar);
}

.dimension-spiritual {
    border-color: var(--gold);
}

/* Timeline */
.stages-timeline {
    position: relative;
    padding-left: 2rem;
}

.stages-timeline::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--cyan), var(--principio-nopensar));
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.25rem;
    margin-left: 1.5rem;
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.stage-focus {
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.stage-focus strong {
    color: var(--gold);
}

/* Núcleo Aspects */
.nucleo-aspects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.aspect-card {
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.aspect-card h4 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.aspect-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

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

.practice-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.practice-card h4 {
    color: var(--cyan);
    margin-bottom: 0.75rem;
}

.practice-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.practice-card li {
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.practice-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
}


/* ===================================
   DIAGRAMS INDEX PAGE
   =================================== */

.diagram-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.diagram-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.diagram-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.diagram-preview {
    width: 150px;
    height: 120px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-icon {
    font-size: 2rem;
    color: var(--gold);
}

.preview-quadrants {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.preview-quadrants span {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-align: center;
}

.q-ser {
    background: rgba(52, 152, 219, 0.3);
    color: var(--principio-ser);
}

.q-noser {
    background: rgba(155, 89, 182, 0.3);
    color: var(--principio-noser);
}

.q-pensar {
    background: rgba(46, 204, 113, 0.3);
    color: var(--principio-pensar);
}

.q-nopensar {
    background: rgba(241, 196, 15, 0.3);
    color: var(--principio-nopensar);
}

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

.diagram-info h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.diagram-info p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.diagram-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-tag {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Isomorphism Mini */
.isomorphism-mini {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.iso-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.iso-human {
    color: var(--cyan);
    text-align: right;
    min-width: 180px;
}

.iso-arrow {
    color: var(--gold);
    font-size: 1.25rem;
}

.iso-cosmos {
    color: var(--gold);
    min-width: 180px;
}


/* ===================================
   FOUR PRINCIPLES DIAGRAM
   =================================== */

.principles-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 2rem auto;
}

.principle-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.principle-card:hover {
    transform: scale(1.02);
}

.principle-card.ser {
    border-color: var(--principio-ser);
}

.principle-card.noser {
    border-color: var(--principio-noser);
}

.principle-card.pensar {
    border-color: var(--principio-pensar);
}

.principle-card.nopensar {
    border-color: var(--principio-nopensar);
}

.principle-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.principle-icon {
    font-size: 2rem;
}

.principle-header h3 {
    margin: 0;
}

.principle-card.ser h3 { color: var(--principio-ser); }
.principle-card.noser h3 { color: var(--principio-noser); }
.principle-card.pensar h3 { color: var(--principio-pensar); }
.principle-card.nopensar h3 { color: var(--principio-nopensar); }

.principle-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.principle-levels {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.level-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Levels Detail */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.level-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.level-number {
    font-size: 2rem;
    font-weight: 700;
    opacity: 0.3;
    margin-bottom: 0.5rem;
}

.level-card h4 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.level-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Principle Page Specific */
.principle-hero {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.principle-hero .hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.principle-hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.principle-hero.ser h2 { color: var(--principio-ser); }
.principle-hero.noser h2 { color: var(--principio-noser); }
.principle-hero.pensar h2 { color: var(--principio-pensar); }
.principle-hero.nopensar h2 { color: var(--principio-nopensar); }

.principle-hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}


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

@media (max-width: 768px) {
    .lifecycle-circle {
        width: 300px;
        height: 300px;
    }

    .lifecycle-stage {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-120px) rotate(calc(-1 * var(--angle)));
    }

    .stage-marker .stage-icon {
        font-size: 1.5rem;
    }

    .stage-marker .stage-name {
        font-size: 0.65rem;
    }

    .principles-overview {
        grid-template-columns: 1fr;
    }

    .diagram-card {
        flex-direction: column;
    }

    .diagram-preview {
        width: 100%;
    }

    .iso-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .iso-human,
    .iso-cosmos {
        text-align: center;
        min-width: auto;
    }

    .iso-arrow {
        transform: rotate(90deg);
    }
}
