/* ********** */
/* PUBLIC SITE CSS VARIABLES */
/* ********** */
/* Only used by the public-facing (logged-out) pages: home, faq, testimonials, */
/* contact, signup, login, reset-password, forgotten-password, privacy-policy. */
/* Also linked by renew-subscription for shared content-section styles. */

:root {
    --sys-green: #669966;
    --sys-green-grad: #4d7a4d;
    --icon-filter-green: brightness(0) saturate(100%) invert(45%) sepia(20%) saturate(1000%) hue-rotate(70deg) brightness(0.8);
}

/* ********** */
/* PUBLIC NAVIGATION */
/* ********** */
.public-nav {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
    flex: 1 1 auto;
    min-width: 0;
}

.public-nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
}

.public-nav-link, .public-nav-link:visited {
    font-family: var(--font-family-h1);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

    .public-nav-link:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.14);
        text-decoration: none;
    }

    .public-nav-link.public-nav-cta, .public-nav-link.public-nav-cta:visited {
        background: linear-gradient(135deg, var(--sys-green) 0%, var(--sys-green-grad) 100%);
        color: var(--white);
        margin-left: 10px;
    }

        .public-nav-link.public-nav-cta:hover {
            background: var(--white);
            color: var(--sys-green-grad);
            box-shadow: inset 0 0 0 2px var(--sys-green);
        }

.public-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

    .public-nav-toggle:hover {
        border-color: var(--white);
        background: rgba(255, 255, 255, 0.18);
    }

.public-nav-toggle-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.public-nav-toggle .icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}

.public-nav-toggle.open .icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.public-nav-toggle.open .icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

@media (max-width: 1085px) {
    /* Position against header so the open menu matches main's box */
    .public-nav {
        position: static;
        flex: 0 0 auto;
    }

    .public-nav-toggle {
        display: flex;
    }

    .public-nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--white);
        border: 1px solid var(--back-bdr-grey);
        border-radius: 10px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
        padding: 8px;
        z-index: 1000;
    }

        .public-nav-links.open {
            display: flex;
        }

    .public-nav-link, .public-nav-link:visited {
        color: var(--font-color-base);
        padding: 12px 14px;
        text-align: center;
    }

        .public-nav-link:hover {
            color: var(--sys-blue);
            background: rgba(102, 153, 204, 0.08);
        }

        .public-nav-link.public-nav-cta, .public-nav-link.public-nav-cta:visited {
            margin-left: 0;
            margin-top: 6px;
        }
}

/* ********** */
/* BUTTON SIZE UTILITY */
/* ********** */
.button-lg {
    font-size: 1.1rem;
    padding: 14px 28px;
}

/* ********** */
/* GREEN BUTTON (public signup / CTA button) */
/* ********** */
.green-button {
    background: linear-gradient(135deg, var(--sys-green) 0%, var(--sys-green-grad) 100%);
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family-h1);
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

    .green-button:hover {
        background: var(--white);
        border-color: var(--sys-green);
        color: var(--sys-green-grad);
    }

    .green-button .button-icon {
        width: 16px;
        height: 16px;
        filter: brightness(0) invert(1);
        transition: filter 0.3s ease;
    }

    .green-button:hover .button-icon {
        filter: var(--icon-filter-green);
    }

    .green-button:disabled,
    .green-button.disabled {
        background: var(--back-button-disabled) !important;
        border: 2px dotted var(--bdr-button-disabled) !important;
        color: var(--font-color-button-disabled) !important;
        cursor: not-allowed !important;
        opacity: 0.6;
        pointer-events: none;
    }

/* ********** */
/* TESTIMONIAL SPOTLIGHT (shared by home page & testimonials page) */
/* ********** */
.testimonial-spotlight {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    border-radius: 20px;
    padding: 55px 45px;
    color: var(--white);
    box-shadow: 0 20px 45px rgba(74, 123, 184, 0.3);
}

    .testimonial-spotlight::before {
        content: '';
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        top: -140px;
        right: -80px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
        pointer-events: none;
    }

.testimonial-spotlight-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 35px;
    max-width: 850px;
    margin: 0 auto;
    text-align: left;
}

.testimonial-spotlight-photo-wrap {
    flex-shrink: 0;
    position: relative;
}

.testimonial-spotlight-photo {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    display: block;
}

.testimonial-spotlight-quote-icon {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--sys-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.testimonial-spotlight-body {
    flex: 1;
}

.testimonial-spotlight-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 22px;
}

.testimonial-spotlight-stars {
    color: var(--yellow);
    font-size: 1rem;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.testimonial-spotlight-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0 0 20px 0;
    font-style: italic;
}

.testimonial-spotlight-author {
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
    font-weight: var(--font-weight-base);
}

.testimonial-spotlight-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.testimonial-spotlight-more {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.25s ease;
}

    .testimonial-spotlight-more:hover {
        opacity: 1;
        text-decoration: underline;
    }

@media (max-width: 700px) {
    .testimonial-spotlight-inner {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-spotlight-stars {
        justify-content: center;
    }

    .testimonial-spotlight-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .testimonial-spotlight {
        padding: 40px 25px;
    }

    .testimonial-spotlight-text {
        font-size: 1.1rem;
    }
}

/* ********** */
/* PROMO CTA BANNER (shared by home page & testimonials page) */
/* ********** */
.promo-cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 45px 40px;
    border-radius: 20px;
    color: var(--white);
}

    .promo-cta > * {
        position: relative;
        z-index: 1;
    }

    .promo-cta h3 {
        font-size: 1.8rem;
        font-weight: var(--font-weight-base);
        color: var(--white);
        margin: 0 0 14px 0;
        font-family: var(--font-family-base);
    }

    .promo-cta p {
        color: var(--white);
        opacity: 0.92;
        margin: 0 0 28px 0;
        font-size: 1.05rem;
        line-height: 1.6;
    }

.promo-cta-blue {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    box-shadow: 0 20px 45px rgba(74, 123, 184, 0.3);
}

.promo-cta-lg {
    padding: 65px 40px;
}

    .promo-cta-lg h3 {
        font-size: 2.1rem;
        margin-bottom: 15px;
    }

    .promo-cta-lg p {
        font-size: 1.1rem;
        margin-bottom: 35px;
    }

.promo-cta-dotted::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.5;
    pointer-events: none;
}

.promo-cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

    .promo-cta-actions a {
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

        .promo-cta-actions a:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
        }

.promo-cta-foot-link {
    margin-top: 18px;
}

    .promo-cta-foot-link a {
        color: var(--white);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        opacity: 0.85;
        transition: opacity 0.25s ease;
    }

        .promo-cta-foot-link a:hover {
            opacity: 1;
            text-decoration: underline;
        }

.promo-cta-lg.promo-cta-dotted {
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .promo-cta-lg {
        padding: 45px 25px;
    }

        .promo-cta-lg h3 {
            font-size: 1.6rem;
        }
}

/* ********** */
/* SHARED CONTENT SECTIONS (faq, privacy policy, renew subscription, etc.) */
/* ********** */
.content-block {
    padding: 10px 20px 20px;
}

.content-meta {
    margin: 0 0 20px;
    font-size: var(--font-size-small);
    color: var(--font-color-base);
    opacity: 0.7;
}

.content-section {
    padding: 18px 0;
    border-bottom: 1px solid var(--back-bdr-grey);
}

    .content-section:last-child {
        border-bottom: none;
    }

.content-section-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--font-color-base);
    margin-bottom: 8px;
    font-family: var(--font-family-h1);
}

.content-section p {
    margin: 0;
    color: var(--font-color-base);
    opacity: 0.85;
    line-height: 1.7;
    font-size: var(--font-size-base);
}

    .content-section p + p {
        margin-top: 10px;
    }

.content-section ul,
.content-section ol {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--font-color-base);
    opacity: 0.85;
    line-height: 1.7;
    font-size: var(--font-size-base);
}

    .content-section ul li + li,
    .content-section ol li + li {
        margin-top: 6px;
    }

/* ********** */
/* DIRECTORY TILE GRID (public aerodrome & aircraft pages) */
/* ********** */
.directory-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--back-bdr-grey);
}

.directory-jump a {
    display: inline-block;
    font-family: var(--font-family-table);
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--sys-blue-grad);
    background: rgba(102, 153, 204, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .directory-jump a:hover {
        background: var(--sys-blue);
        color: var(--white);
    }

.directory-group {
    margin-bottom: 30px;
    min-width: 0;
}

.directory-group-title {
    font-family: var(--font-family-h1);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sys-blue-grad);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sys-blue2);
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    min-width: 0;
}

.tile-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--back-bdr-grey);
    border-radius: 10px;
    padding: 16px;
    color: var(--font-color-base);
    min-width: 0;
    overflow: hidden;
}

a.tile-card {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    a.tile-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
        text-decoration: none;
        color: var(--font-color-base);
    }

.tile-card-title {
    display: block;
    font-family: var(--font-family-h1);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--font-color-base);
    text-decoration: none;
    margin: 0 0 6px 0;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .tile-card-title:hover {
        color: var(--sys-blue-grad);
        text-decoration: none;
    }

.tile-card-subtitle {
    display: block;
    font-size: var(--font-size-small);
    color: var(--font-color-base);
    opacity: 0.65;
    margin: 0 0 8px 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile-card-codes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tile-card-code {
    display: inline-block;
    font-family: var(--font-family-table);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sys-blue-grad);
    background: rgba(102, 153, 204, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .tile-card-code:hover {
        background: var(--sys-blue);
        color: var(--white);
        text-decoration: none;
    }

    .tile-card-code:hover .tile-card-code-label {
        color: rgba(255, 255, 255, 0.7);
        opacity: 1;
    }

.tile-card-code-label {
    color: var(--font-color-base);
    opacity: 0.5;
    margin-right: 2px;
}

/* ********** */
/* DIRECTORY MAP (public aerodrome pages) */
/* ********** */
#directory-map {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 20px;
}

/* ********** */
/* RECORD DETAIL TABLE (public aerodrome & aircraft detail pages) */
/* ********** */
.record-detail {
    width: 100%;
    border-collapse: collapse;
}

    .record-detail tr {
        border-bottom: 1px solid var(--back-bdr-grey);
    }

    .record-detail tr:last-child {
        border-bottom: none;
    }

    .record-detail td {
        padding: 12px 14px;
        font-size: var(--font-size-base);
        color: var(--font-color-base);
        vertical-align: top;
    }

    .record-detail td:first-child {
        width: 160px;
        font-weight: 600;
        opacity: 0.7;
        font-size: var(--font-size-small);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .record-detail a {
        color: var(--sys-blue-grad);
        text-decoration: none;
    }

    .record-detail a:hover {
        text-decoration: underline;
    }

.record-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-small);
    color: var(--sys-blue-grad);
    text-decoration: none;
    margin-bottom: 16px;
}

    .record-back-link:hover {
        text-decoration: underline;
    }

.record-disclaimer {
    font-size: var(--font-size-small);
    color: var(--font-color-base);
    opacity: 0.5;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .tile-grid {
        grid-template-columns: 1fr;
    }

    .record-detail td:first-child {
        width: 120px;
    }
}
