/* INFORMACE O MATERIÁLECH - PROFESIONÁLNÍ DESIGN */
.mat-info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* HLAVNÍ NADPIS */
.mat-info-header {
    text-align: center;
    margin-bottom: 50px;
}

.mat-info-title {
    font-size: 42px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 25px;
    border-bottom: 4px solid transparent;
    background: linear-gradient(to right, #FF6B00, #ff8533) bottom left no-repeat;
    background-size: 200px 4px;
    background-position: center bottom;
}

.mat-info-subtitle {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* HLAVNÍ KATEGORIE */
.mat-main-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mat-category {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    overflow: visible; /* Změněno z hidden na visible */
    transition: all 0.3s;
}

.mat-category.active {
    border-color: #FF6B00;
    box-shadow: 0 10px 40px rgba(255,107,0,0.15);
}

/* HLAVIČKA KATEGORIE */
.mat-category-header {
    padding: 25px 30px;
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border-radius: 14px 14px 0 0;
}

.mat-category.active .mat-category-header {
    background: linear-gradient(135deg, #FF6B00, #ff8533);
}

.mat-category-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.mat-category.active .mat-category-icon {
    background: rgba(255,255,255,0.2);
}

.mat-category-icon svg {
    width: 30px;
    height: 30px;
    stroke: #FF6B00;
    stroke-width: 2.5;
}

.mat-category.active .mat-category-icon svg {
    stroke: #fff;
}

.mat-category-info {
    flex: 1;
    min-width: 0; /* Zajistí správné zalomení textu */
}

.mat-category-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.mat-category.active .mat-category-title {
    color: #fff;
}

.mat-category-desc {
    font-size: 14px;
    color: #666;
    word-break: break-word;
    overflow-wrap: break-word;
}

.mat-category.active .mat-category-desc {
    color: rgba(255,255,255,0.9);
}

.mat-category-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.mat-category-arrow svg {
    width: 20px;
    height: 20px;
    stroke: #999;
    stroke-width: 2.5;
}

.mat-category.active .mat-category-arrow {
    transform: rotate(180deg);
}

.mat-category.active .mat-category-arrow svg {
    stroke: #fff;
}

/* ROZBALENÝ OBSAH - OPRAVENO PRO MOBILNÍ ZOBRAZENÍ */
.mat-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    border-radius: 0 0 14px 14px;
}

.mat-category.active .mat-category-content {
    max-height: none; /* Důležité - zajistí viditelnost veškerého obsahu */
    overflow: visible; /* Zajistí viditelnost na mobilu */
}

/* MATERIÁL BOX */
.mat-material-box {
    border-top: 1px solid #e0e0e0;
    padding: 30px;
    background: #fafafa;
}

.mat-material-box:last-child {
    border-radius: 0 0 14px 14px;
}

.mat-material-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mat-material-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mat-material-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mat-material-image.no-image svg {
    width: 50px;
    height: 50px;
    stroke: #ccc;
    stroke-width: 2;
}

.mat-material-info {
    flex: 1;
    min-width: 0;
}

.mat-material-title {
    font-size: 22px;
    font-weight: 700;
    color: #FF6B00;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.mat-material-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 5px;
    word-break: break-word;
}

.mat-material-class {
    font-size: 14px;
    color: #999;
    word-break: break-word;
}

/* TABULKA NOREM */
.mat-standards-table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.mat-standards-table table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
}

.mat-standards-table th {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.mat-standards-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

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

.mat-standards-table tr:hover {
    background: rgba(255,107,0,0.03);
}

/* SEKCE TEXTU */
.mat-section {
    margin-bottom: 25px;
}

.mat-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 4px solid #FF6B00;
}

.mat-section-text {
    color: #555;
    line-height: 1.7;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    word-break: break-word;
}

.mat-section-list {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
}

.mat-section-list p {
    color: #555;
    margin-bottom: 10px;
}

.mat-section-list ul {
    margin: 0;
    padding-left: 20px;
}

.mat-section-list li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* AKČNÍ TLAČÍTKA */
.mat-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.mat-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-align: center;
}

.mat-btn-primary {
    background: #FF6B00;
    color: #fff;
}

.mat-btn-primary:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,107,0,0.3);
}

.mat-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.mat-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108,117,125,0.3);
}

/* RESPONSIVE - TABLET */
@media (max-width: 1024px) {
    .mat-info-container {
        padding: 35px 20px 50px;
    }
    
    .mat-info-title {
        font-size: 36px;
    }
    
    .mat-category-header {
        padding: 22px 25px;
    }
    
    .mat-category-title {
        font-size: 22px;
    }
}

/* RESPONSIVE - MOBILNÍ ZAŘÍZENÍ */
@media (max-width: 768px) {
    .mat-info-container {
        padding: 30px 15px;
    }
    
    .mat-info-title {
        font-size: 28px;
        margin-bottom: 15px;
        padding-bottom: 20px;
        background-size: 150px 4px;
    }
    
    .mat-info-subtitle {
        font-size: 16px;
        padding: 0 10px;
    }
    
    .mat-main-categories {
        gap: 20px;
    }
    
    .mat-category-header {
        padding: 20px;
        gap: 15px;
    }
    
    .mat-category-icon {
        width: 50px;
        height: 50px;
    }
    
    .mat-category-icon svg {
        width: 25px;
        height: 25px;
    }
    
    .mat-category-title {
        font-size: 20px;
    }
    
    .mat-category-desc {
        font-size: 13px;
    }
    
    .mat-material-box {
        padding: 20px;
    }
    
    .mat-material-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .mat-material-image {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
    
    .mat-material-title {
        font-size: 20px;
    }
    
    .mat-material-subtitle {
        font-size: 14px;
    }
    
    .mat-material-class {
        font-size: 13px;
    }
    
    .mat-section-title {
        font-size: 17px;
        padding-left: 12px;
    }
    
    .mat-section-text,
    .mat-section-list {
        padding: 12px;
        font-size: 14px;
    }
    
    .mat-standards-table {
        margin-bottom: 20px;
    }
    
    .mat-standards-table th,
    .mat-standards-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .mat-actions {
        flex-direction: column;
    }
    
    .mat-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* RESPONSIVE - MALÉ MOBILNÍ ZAŘÍZENÍ */
@media (max-width: 480px) {
    .mat-info-title {
        font-size: 24px;
    }
    
    .mat-info-subtitle {
        font-size: 15px;
    }
    
    .mat-category-header {
        padding: 15px;
        gap: 12px;
    }
    
    .mat-category-icon {
        width: 45px;
        height: 45px;
    }
    
    .mat-category-title {
        font-size: 18px;
    }
    
    .mat-category-desc {
        font-size: 12px;
    }
    
    .mat-material-title {
        font-size: 18px;
    }
    
    .mat-section-title {
        font-size: 16px;
    }
    
    .mat-standards-table th,
    .mat-standards-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ANIMACE PRO PLYNULÉ ZOBRAZENÍ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mat-category.active .mat-category-content > * {
    animation: fadeIn 0.3s ease forwards;
}

/* ZAJIŠTĚNÍ VIDITELNOSTI OBSAHU NA VŠECH ZAŘÍZENÍCH */
.mat-category.active .mat-category-content {
    min-height: auto;
    height: auto;
    padding-bottom: 1px; /* Zabrání collapsingu margins */
}

/* OPRAVA PRO iOS SAFARI */
@supports (-webkit-touch-callout: none) {
    .mat-category-content {
        -webkit-overflow-scrolling: touch;
    }
    
    .mat-category.active .mat-category-content {
        overflow: visible;
        max-height: none;
    }
}