/* Training Section */
#training {
    background: #fefaf5;
    padding: 40px 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* Grid Layout - 2 columns with equal height */
.training-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
    height: 80vh;
    max-height: 700px;
}

/* Left Column - Image */
.training-image {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
}

.training-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.training-image:hover img {
    transform: scale(1.02);
}

/* Right Column - Cards Grid */
.training-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for cards */
.training-cards-grid::-webkit-scrollbar {
    width: 4px;
}

.training-cards-grid::-webkit-scrollbar-track {
    background: #f0e3d6;
    border-radius: 4px;
}

.training-cards-grid::-webkit-scrollbar-thumb {
    background: #c57f1e;
    border-radius: 4px;
}

/* Training Card - Compact size */
.training-card {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #f0e3d6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.training-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.training-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.training-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a2f;
    margin-bottom: 8px;
    line-height: 1.3;
}

.training-desc {
    color: #5a6557;
    line-height: 1.4;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.training-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #c57f1e;
    margin: 6px 0 10px;
}

.training-buttons {
    display: flex;
    gap: 10px;
}

.btn-readmore {
    flex: 1;
    background: transparent;
    border: 1px solid #c57f1e;
    color: #c57f1e;
    padding: 8px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.75rem;
}

.btn-readmore:hover {
    background: #c57f1e;
    color: white;
}

.btn-training {
    flex: 1;
    background: #1e3a2f;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.75rem;
}

.btn-training:hover {
    background: #c57f1e;
    transform: translateY(-2px);
}

/* Modal Styles */
.training-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.training-modal.active {
    display: flex;
    opacity: 1;
}

.training-modal-content {
    background: white;
    border-radius: 32px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.training-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0e3d6;
    background: linear-gradient(135deg, #1e3a2f 0%, #2a4a3c 100%);
    border-radius: 32px 32px 0 0;
}

.training-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    transition: 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #f7c35c;
}

.training-modal-body {
    padding: 24px;
}

.modal-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 16px;
}

.modal-full-desc {
    color: #5a6557;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
    font-size: 0.9rem;
}

.modal-details {
    background: #fefaf5;
    padding: 16px;
    border-radius: 16px;
}

.modal-detail-item {
    margin-bottom: 12px;
}

.modal-detail-item strong {
    color: #1e3a2f;
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.modal-detail-item ul {
    margin: 6px 0 0 20px;
    color: #5a6557;
    line-height: 1.5;
}

.modal-detail-item li {
    margin: 4px 0;
    font-size: 0.85rem;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #c57f1e;
}

.training-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f0e3d6;
    background: #fefaf5;
    border-radius: 0 0 32px 32px;
}

.btn-secondary-modal {
    flex: 1;
    background: transparent;
    border: 1px solid #c57f1e;
    color: #c57f1e;
    padding: 10px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary-modal:hover {
    background: #c57f1e;
    color: white;
}

.btn-primary-modal {
    flex: 1;
    background: #1e3a2f;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary-modal:hover {
    background: #c57f1e;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .training-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        height: auto;
        max-height: none;
    }
    
    .training-image {
        max-width: 500px;
        margin: 0 auto;
        height: 300px;
    }
    
    .training-cards-grid {
        max-height: 500px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    #training {
        padding: 30px 0;
    }
    
    .training-card {
        padding: 14px 16px;
    }
    
    .training-icon {
        font-size: 1.5rem;
    }
    
    .training-card h3 {
        font-size: 1rem;
    }
    
    .training-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
    
    .training-price {
        font-size: 1rem;
        margin: 4px 0 8px;
    }
    
    .btn-readmore,
    .btn-training {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    .training-image {
        height: 250px;
    }
    
    .training-cards-grid {
        gap: 12px;
        max-height: 450px;
    }
}

@media (max-width: 480px) {
    .training-card {
        padding: 12px;
    }
    
    .training-card h3 {
        font-size: 0.95rem;
    }
    
    .training-desc {
        font-size: 0.7rem;
    }
    
    .training-price {
        font-size: 0.9rem;
    }
    
    .training-image {
        height: 200px;
    }
    
    .training-cards-grid {
        max-height: 400px;
    }
}