/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1a3a5c;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2d5a87;
}

.hero {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 50%, #4a7ab0 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.hero-logo {
    width: 140px;
    height: auto;
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    opacity: 0.95;
    max-width: 640px;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: #1a3a5c;
}

.info-banner {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.steps-list {
    margin: 1rem 0 1rem 1.25rem;
}

.steps-list a {
    color: #2d5a87;
}

.info-note {
    color: #555;
    font-size: 0.95rem;
}

.section {
    padding: 2rem 0;
}

.section-alt {
    background: #eef2f6;
    max-width: 100%;
    padding-left: calc((100% - 1200px) / 2 + 20px);
    padding-right: calc((100% - 1200px) / 2 + 20px);
}

.section-desc {
    color: #666;
    margin-bottom: 1.5rem;
}

.mandatory-banner {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.mandatory-banner .card-content {
    padding: 1.5rem;
}

.card-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e8f0f8;
    color: #1a3a5c;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.contacts-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.contacts-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contacts-role {
    color: #666;
    margin-bottom: 1rem;
}

.contacts-list {
    list-style: none;
    margin-bottom: 1rem;
}

.contacts-list li {
    margin-bottom: 0.5rem;
}

.contacts-list a {
    color: #2d5a87;
}

.contacts-note {
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.site-footer {
    background: #1a3a5c;
    color: #ccc;
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.blocks-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.block-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-weight: normal;
}

.block-check:hover {
    background: #e8f0f8;
}

.form-hint {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.form-hint.success {
    color: #198754;
}

.form-hint.error {
    color: #dc3545;
}

.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.cart-note {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
}

.cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a3a5c;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 2000;
    max-width: 320px;
}

.cart-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-qty-fixed {
    min-width: 24px;
    text-align: center;
    color: #666;
}

.course-info h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a3a5c;
}

.course-info ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-left: 1rem;
    text-decoration: none;
}

.cart-icon {
    cursor: pointer;
    background: #2d5a87;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.cart-icon:hover {
    background: #1a3a5c;
}

.cart-count {
    background: #ffc107;
    color: #333;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Main */
main {
    min-height: 80vh;
    padding: 2rem 0;
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image-wrap,
.course-detail-image-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(145deg, #dce6f0 0%, #b8c9db 100%);
}

.course-detail-image-wrap {
    max-height: 360px;
    height: 280px;
}

.card-image-wrap img,
.course-detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.card-image-wrap::after,
.course-detail-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 58, 92, 0.35) 0%, transparent 55%);
    pointer-events: none;
}

.card-image-wrap[data-fallback="1"],
.course-detail-image-wrap[data-fallback="1"] {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.card-image-wrap[data-fallback="1"]::after,
.course-detail-image-wrap[data-fallback="1"]::after {
    display: none;
}

.img-fallback-label {
    position: relative;
    z-index: 1;
    color: #1a3a5c;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    max-width: 90%;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: #666;
    margin-bottom: 1rem;
}

.card-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d5a87;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary {
    background: #2d5a87;
    color: white;
}

.btn-primary:hover {
    background: #1a3a5c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2d5a87;
    color: #2d5a87;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: #2d5a87;
    color: white;
}

/* Modal Cart */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 2;
}

.cart-item-title {
    font-weight: bold;
}

.cart-item-price {
    color: #2d5a87;
}

.cart-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-item-quantity {
    width: 50px;
    text-align: center;
}

.cart-total {
    text-align: right;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Questionnaire */
.question-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-group label {
    font-weight: normal;
    margin-left: 0.25rem;
}

.recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Course detail */
.course-detail {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}


.course-info {
    padding: 2rem;
}

.course-price {
    font-size: 2rem;
    color: #2d5a87;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .section-alt {
        padding-left: 20px;
        padding-right: 20px;
    }
    .logo-text {
        display: none;
    }
}