/* Learning Page Fixes - Sign Charts and Modals */

/* Basic Signs Section */
.basic-signs {
    padding: 80px 0;
    background: var(--white);
}

.basic-signs .section-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
}

.basic-signs .section-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Sign Charts Grid */
.sign-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch;
}

/* Sign Chart Cards */
.sign-chart-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.sign-chart-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.sign-chart-card:active {
    transform: translateY(-4px) scale(1.01);
}

/* Chart Preview Image */
.chart-preview {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sign-chart-card:hover .chart-preview img {
    transform: scale(1.05);
}

/* Chart Info */
.chart-info {
    padding: 25px;
}

.chart-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.chart-info p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* View Chart Button */
.view-chart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-chart-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.sign-chart-card:hover .view-chart-btn {
    color: var(--secondary-color);
}

.sign-chart-card:hover .view-chart-btn i {
    transform: scale(1.2);
}

/* Signs Note */
.signs-note {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.signs-note p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Sign Modals */
.sign-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.sign-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal Content */
.modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: min(90vw, 1000px);
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: var(--light-gray);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 30px;
    text-align: center;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.modal-body img {
    max-width: 100%;
    max-height: calc(90vh - 200px);
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background: var(--white);
    cursor: zoom-in;
}

.modal-body img:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.modal-body p {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Modal Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .basic-signs {
        padding: 60px 0;
    }
    
    .basic-signs .section-title {
        font-size: 2rem;
    }
    
    .sign-charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sign-chart-card {
        margin: 0 10px;
    }
    
    .chart-preview {
        height: 200px;
    }
    
    .chart-info {
        padding: 20px;
    }
    
    .chart-info h3 {
        font-size: 1.2rem;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 100px);
    }
    
    .modal-body img {
        max-height: calc(95vh - 180px);
    }
    
    .modal-body p {
        font-size: 1rem;
    }
    
    .signs-note {
        margin: 20px 10px 0;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .basic-signs .section-title {
        font-size: 1.8rem;
    }
    
    .sign-charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chart-preview {
        height: 180px;
    }
    
    .chart-info {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(95vh - 80px);
    }
    
    .modal-body img {
        max-height: calc(95vh - 160px);
    }
}