/* Copyright (c) 2025-2026 Jericho Crosby (Chalwk) */

.guides-section {
    background-color: #f8fafc;
    padding: 80px 0;
}

.guides-group {
    margin-top: 40px;
}

.guides-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.guides-group-title i {
    color: var(--secondary-color);
}

.guides-count {
    margin-left: auto;
    background: var(--secondary-color);
    color: white;
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 3px 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    border-radius: var(--border-radius);
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.guide-card-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.guide-card-body {
    min-width: 0;
}

.guide-card-icao {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.guide-card-body h4 {
    font-size: 1rem;
    margin: 0 0 4px 0;
    color: var(--dark-color);
    line-height: 1.25;
}

.guide-card-body p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--gray-color);
    line-height: 1.35;
}

/* ---------------------------------------------------------------- */
/* Individual guide page                                            */
/* ---------------------------------------------------------------- */

.guide-container {
    padding: 110px 0 70px;
    background-color: #f8fafc;
    min-height: 70vh;
}

.guide-header {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    background: white;
    border-radius: var(--border-radius);
    padding: 28px 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    border-left: 6px solid var(--secondary-color);
}

.guide-header-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.guide-header-text h1 {
    margin: 0 0 6px 0;
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.guide-icao {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.guide-icao i {
    opacity: 0.6;
    margin-right: 4px;
}

.guide-description {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* ---------------------------------------------------------------- */
/* Markdown content styling                                         */
/* ---------------------------------------------------------------- */

.guide-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 45px 50px;
    box-shadow: var(--box-shadow);
    line-height: 1.75;
    color: var(--dark-color);
    font-size: 1rem;
}

/* Headings --------------------------------------------------------- */

.guide-content h2 {
    color: var(--primary-color);
    font-size: 1.45rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-top: 42px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    line-height: 1.25;
}

.guide-content h2:first-child {
    margin-top: 0;
}

.guide-content h3 {
    color: var(--secondary-color);
    font-size: 1.18rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.guide-content h4 {
    color: var(--dark-color);
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 22px;
    margin-bottom: 8px;
}

/* Paragraphs & lists ---------------------------------------------- */

.guide-content p {
    margin-bottom: 14px;
}

.guide-content p:last-child {
    margin-bottom: 0;
}

.guide-content ul,
.guide-content ol {
    margin: 0 0 18px 24px;
    padding-left: 4px;
}

.guide-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.guide-content li::marker {
    color: var(--secondary-color);
}

/* Links ----------------------------------------------------------- */

.guide-content a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--secondary-color);
    transition: var(--transition);
}

.guide-content a:hover {
    color: var(--primary-color);
    border-bottom-style: solid;
    border-bottom-color: var(--primary-color);
}

/* Tables ---------------------------------------------------------- */

.guide-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 18px 0 26px;
    font-size: 0.93rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    overflow: hidden;
}

.guide-content table th,
.guide-content table td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--light-gray);
}

.guide-content table th {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--secondary-color);
}

.guide-content table tbody tr:nth-child(even) td {
    background: #fafcff;
}

.guide-content table tbody tr:hover td {
    background: #f0f9ff;
}

.guide-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Inline code & code blocks -------------------------------------- */

.guide-content code {
    background: #eef2f7;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: var(--primary-color);
    border: 1px solid #dde5ee;
}

.guide-content pre {
    background: var(--code-bg-color);
    color: var(--code-color);
    padding: 18px 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 18px 0 22px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.guide-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

/* Blockquotes ----------------------------------------------------- */

.guide-content blockquote {
    background: #f0f9ff;
    border-left: 4px solid var(--secondary-color);
    padding: 14px 20px;
    border-radius: 0 6px 6px 0;
    margin: 20px 0;
    color: var(--dark-color);
    font-style: normal;
}

.guide-content blockquote p {
    margin-bottom: 8px;
}

.guide-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Horizontal rules & emphasis ------------------------------------ */

.guide-content hr {
    border: none;
    border-top: 1px dashed var(--light-gray);
    margin: 34px 0;
}

.guide-content strong {
    color: var(--dark-color);
    font-weight: 600;
}

.guide-content em {
    color: var(--gray-color);
    font-style: italic;
}

/* Images ------------------------------ */

.guide-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 12px 0;
}

/* Region map ------------------------------------------------------ */

.region-map-block {
    margin: 26px 0;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.region-map-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.region-map-header i {
    opacity: 0.9;
    font-size: 0.95rem;
}

.region-map-canvas {
    width: 100%;
    height: 420px;
    background: #e6f0ff;
}

.region-map-block .leaflet-container {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
}

/* Back links ------------------------------------------------------ */

.back-link-top {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-3px);
}

.back-link-bottom {
    margin-top: 30px;
    text-align: center;
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 768px) {
    .guide-container {
        padding: 95px 0 40px;
    }

    .guide-content {
        padding: 26px 22px 32px;
    }

    .guide-header {
        flex-direction: column;
        padding: 22px;
    }

    .guide-header-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .guide-header-text h1 {
        font-size: 1.6rem;
    }

    .guides-grid {
        grid-template-columns: 1fr;
    }

    .guide-content table {
        font-size: 0.85rem;
    }

    .guide-content table th,
    .guide-content table td {
        padding: 8px 10px;
    }

    .region-map-canvas {
        height: 320px;
    }

    .region-map-header {
        font-size: 0.88rem;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .guide-content {
        padding: 20px 16px 26px;
    }

    .guide-content h2 {
        font-size: 1.25rem;
    }

    .guide-content h3 {
        font-size: 1.05rem;
    }
}