﻿body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #fff;
}

header, footer {
    background: #f3efec;
    color: #fff;
    padding: 1.2rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    z-index: 1001;
}

    .hamburger span {
        height: 4px;
        width: 28px;
        background: #333;
        margin: 4px 0;
        border-radius: 2px;
        transition: 0.3s;
        display: block;
    }

.logo {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

    .logo img,
    .footer-logo img {
        height: 61px;
        width: auto;
        display: block;
    }

@media (max-width: 600px) {
    .logo img,
    .footer-logo img {
        height: 58px;
    }

    .footer-aap-logo img {
        max-width: 274px !important;
    }

    .footer-nav a {
        font-size: 0.92rem;
    }
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 1.7rem;
    font-weight: bold;
    color: #333;
}

/* Dropdown menu styles for all screen sizes */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #f3efec;
    box-shadow: 0 8px 24px 0 rgba(0,0,0,0.18), 0 1.5px 6px 0 rgba(0,0,0,0.10);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    padding: 1.0rem 0;
    font-family: 'Fira Sans', Arial, sans-serif;
    text-align: center;
}

    .dropdown-menu.show {
        display: block;
    }

    .dropdown-menu a {
        display: block;
        position: relative;
        color: #430F38;
        text-decoration: none;
        font-size: 1rem;
        transition: background 0.2s;
        font-family: 'Fira Sans', Arial, sans-serif;
        text-align: center;
        padding: 0.7rem 1.5rem 0.5rem 1.5rem; /* Increased top padding for more space above */
        margin: 0;
        background: none;
        z-index: 1;
    }

        .dropdown-menu a:not(:last-child)::after {
            content: "";
            display: block;
            width: 80%;
            height: 8px;
            margin: 0 auto;
            background: url('images/line.png') center center no-repeat;
            background-size: contain;
            position: absolute;
            left: 10%;
            bottom: -8px;
            z-index: 2;
            pointer-events: none;
        }

        .dropdown-menu a:hover,
        .dropdown-menu a:focus {
            background: #e0dbd6;
            z-index: 1;
        }

.fliphorizontal {
    transform: scaleX(-1);
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .header-title {
        text-align: left;
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }

    .logo img,
    .logo img#cycling-logo {
        height: 61px;
        width: auto;
        max-width: 100%;
        display: block;
        object-fit: contain;
    }

    @media (max-width: 600px) {
        .logo img,
        .logo img#cycling-logo {
            height: 58px;
        }
    }

    .dropdown-menu {
        position: static;
        min-width: 100%;
        border-radius: 0 0 8px 8px;
        box-shadow: none;
    }
}

@media (max-width: 319px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.page_title {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 2.6rem;
    color: #222;
    font-weight: 700;
    margin-top: 2.2rem !important;
    margin-bottom: 1.2rem;
    text-align: left;
}

@media (max-width: 900px) {
    .page_title {
        font-size: 2.0rem;
    }
}

@media (max-width: 600px) {
    .page_title {
        font-size: 1.8rem;
    }
}

.page_header_2 {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 1.5rem;
    color: #430F38;
    font-weight: 700;
    margin-top: 1.1rem;
    margin-bottom: 0.4rem;
    text-align: left;
}

@media (max-width: 900px) {
    .page_header_2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .page_header_2 {
        font-size: 0.95rem;
    }
}

.page_header_5 {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 0.98rem; /* Slightly smaller than .page-content-text (1.13rem) */
    color: #222;
    font-weight: 600;
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
    text-align: left !important;
}

@media (max-width: 900px) {
    .page_header_5 {
        font-size: 0.92rem;
    }
}

@media (max-width: 600px) {
    .page_header_5 {
        font-size: 0.86rem;
    }
}

.page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 1.2rem 1rem;
    box-sizing: border-box;
}

    /* Left-align page_title and page_header_2 within .page-content */
    .page-content .page_title,
    .page-content .page_header_2,
    .page-content .page_header_5 {
        text-align: left;
        align-self: flex-start;
        width: 100%;
    }

@media (max-width: 900px) {
    .page-content {
        max-width: 98vw;
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .page-content {
        padding: 0.7rem 0.2rem;
    }
}

.page-content-text {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 1.13rem;
    color: #222;
    line-height: 1.7;
    margin: 1.1rem 0 1.3rem 0;
    text-align: left;
    word-break: break-word;
}

@media (max-width: 900px) {
    .page-content-text {
        font-size: 1rem;
        margin: 0.9rem 0 1.1rem 0;
    }
}

@media (max-width: 600px) {
    .page-content-text {
        font-size: 0.95rem;
        margin: 0.7rem 0 0.9rem 0;
    }
}

.page-content-image {
    display: block;
    margin: 1.2rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    border: 2px solid #000;
    object-fit: cover;
    box-sizing: border-box;
}

.page-content--author-name {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #222;
    margin-top: 0.3em;
    display: block;
    text-align: left;
    align-self: flex-start;
    width: 100%;
}

.latest-label {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 1.8rem;
    color: #430F38;
    font-weight: 700;
    margin: 0 0 0.3rem 0; /* No top margin, small bottom margin */
    text-align: left;
    letter-spacing: 0.02em;
    background: none;
    border: none;
    padding: 0 0 0.2rem 0;
    display: block;
    min-height: 1.2em; /* Ensures consistent height even if empty */
}

@media (max-width: 600px) {
    .latest-label {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }
}

.more-stories-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 1.18rem;
    font-weight: 600;
    color: #222;
    background: #9AFE8A;
    border: 2px solid #000;
    border-radius: 18px;
    padding: 1.1rem 1.5rem;
    margin: 1.2rem auto 0.7rem auto;
    max-width: 420px;
    min-width: 180px;
    width: 90%;
    box-sizing: border-box;
    text-align: center;
    transition: background 0.2s, font-size 0.2s;
    cursor: pointer;
    word-break: break-word;
}

@media (max-width: 900px) {
    .more-stories-text {
        font-size: 1rem;
        padding: 0.9rem 1.1rem;
    }
}

@media (max-width: 600px) {
    .more-stories-text {
        font-size: 0.92rem;
        padding: 0.7rem 0.7rem;
    }
}

    .more-stories-text:hover {
        background: #81C6FF;
    }

.back_arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 1rem; /* matches .hamburger's margin-right */
}

    .back_arrow img {
        width: 28px;
        height: 28px;
        display: block;
        object-fit: contain;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: 'Fira Sans', Arial, sans-serif;
}

.card {
    background: #fff;
    border-radius: 8px;
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.07);*/
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Fira Sans', Arial, sans-serif;
    text-decoration: none;
    color: #222;
    transition: background 0.18s, box-shadow 0.18s;
}

    .card:link,
    .card:visited,
    .card:active {
        color: #222;
        text-decoration: none;
    }

    .card:hover,
    .card:focus {
        background: #f3efec;
        /*box-shadow: 0 4px 24px 0 rgba(0,0,0,0.13);*/
        text-decoration: none;
        color: #222;
        outline: none;
}

/* Exempt the "More Stories" card from the default card hover style */
a.card:has(.more-stories-text):hover,
a.card:has(.more-stories-text):focus {
    background: none;
    /* box-shadow: none; */
    /* color: inherit; */
}

    .card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border: 2px solid #000;
        box-sizing: border-box;
        display: block;
        max-width: 100%;
        max-height: 100%;
        border-radius: 8px;
    }

.card-main-image {
    width: 100%;
    height: auto !important;
    max-height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
    border: 2px solid #000;
    box-sizing: border-box;
    /* Remove any fixed height or max-height here */
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.card-summary {
    font-size: 0.97rem;
    color: #444;
}

.card-author-name {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #222;
    margin-top: 0.3em;
    display: block;
}

.card-article-go-to {
    border: none;
    display: inline-block;
    vertical-align: middle;
    margin-top: 0.3em;
    margin-left: 0.5em;
}

    .card-article-go-to img {
        width: 29px;
        height: 25px;
        border: none;
        display: block;
    }

.card-image-overlay-container {
    position: relative;
    width: 100%;
    height: 180px;
    display: block;
    border-radius: 8px; /* All four corners */
    overflow: hidden; /* Ensures children are clipped to the border radius */
}

    .card-image-overlay-container > img:first-child {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 8px; /* Match the container */
        box-sizing: border-box;
        display: block;
    }

.page-content-overlay-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* or whatever fits your layout */
    margin: 1.2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-content-overlay-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 2px solid #000;
    object-fit: cover;
    box-sizing: border-box;
}

.youtube-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px !important;
    height: 39px !important;
    transform: translate(-50%, -50%);
    z-index: 2;
    border: none;
    background: none;
    pointer-events: none;
    opacity: 1;
    max-width: 56px;
    max-height: 39px;
    min-width: 56px;
    min-height: 39px;
    box-sizing: border-box;
}

.happycloud-overlay {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 111px !important;
    height: 75px !important;
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

.happycloud-bottom-overlay {
    position: absolute;
    left: 15%; /* Use % instead of px for consistency */
    bottom: -5%;
    width: 111px !important;
    height: 75px !important;
    /*width: 18%;*/ /* Responsive width */
    /*height: auto;*/
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

.sadcloud-overlay {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 124px !important;
    height: auto !important;
    max-height: calc(100% - 20px) !important; /* ensures it fits within the parent minus margins */
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

.alert-overlay {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 109px !important;
    height: 97px !important;
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

.speechbubble-overlay {
    position: absolute;
    right: 10px !important;
    bottom: 10px;
    width: 125px !important;
    height: 86px !important;
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

.checkmark-overlay {
    position: absolute;
    right: -3%; /* Use % instead of px for consistency */
    bottom: -10%;
    width: 93px !important;
    height: 78px !important;
    /*width: 18%;*/ /* Responsive width */
    /*height: auto;*/
    z-index: 2;
    pointer-events: none;
    border: none;
    background: none;
    display: block;
    object-fit: contain;
}

@media (min-width: 768px) {
    .cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .card {
        max-width: 100%;
    }
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.5rem 0;
}

.footer-logo,
.footer-icons,
.footer-nav,
.footer-aap-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-nav {
    font-family: 'Fira Sans', Arial, sans-serif;
    gap: 2.2rem;
    display: flex;
    flex-direction: row;
}

    .footer-nav a {
        color: #222;
        text-decoration: none;
        font-size: 1.08rem;
        font-family: 'Fira Sans', Arial, sans-serif;
        font-weight: 500;
        letter-spacing: 0.03em;
        transition: color 0.2s;
        padding: 0.2em 0;
        display: inline-block;
    }

        .footer-nav a:hover {
            color: #1976d2;
            text-decoration: underline;
        }

.footer-icons {
    gap: 1.7rem;
    display: flex;
    flex-direction: row;
}

    .footer-icons a img {
        width: 32px;
        height: 32px;
        display: block;
    }

@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
    }

    .footer-logo,
    .footer-icons,
    .footer-nav,
    .footer-aap-logo {
        justify-content: center;
        flex-direction: row;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .footer-nav {
        justify-content: center;
        gap: 1.2rem;
        flex-wrap: wrap;
    }

    .footer-icons {
        gap: 2rem;
    }
}

.footer-aap-logo img {
    max-width: 274px;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 600px) {
    .footer-aap-logo img {
        max-width: 274px !important;
    }
}

@media (max-width: 600px) {
    .footer-nav a {
        font-size: 0.76rem;
    }
}

/* Center the dropdown overlay on small screens only */
@media (max-width: 600px) {
    .dropdown-menu {
        position: fixed;
        top: 140px; /* Adjust as needed for your header height */
        left: 50%;
        transform: translateX(-50%);
        min-width: 220px;
        max-width: 95vw;
        width: 320px;
        border-radius: 18px;
        box-shadow: 0 8px 24px 0 rgba(0,0,0,0.18), 0 1.5px 6px 0 rgba(0,0,0,0.10);
    }
}

/*Contact Form styles*/
.contact-form-container {
    max-width: 480px;
    margin: 0 auto 0 auto;
    padding-bottom: 0;
    padding-top: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.contact-form {
    background: #FFBC36;
    padding: 2rem 1.2rem;
    /*border-radius: 18px;*/
    max-width: 480px;
    margin: 2rem auto 2.5rem auto;
    margin-bottom: 0;
    box-sizing: border-box;
    width: 100%;
}

    .contact-form .page_title,
    .contact-form .page-content {
        background: #fff;
        border-radius: 12px;
        padding: 0.7em 1em;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
    }

.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.1rem;
    width: 100%;
}

    .form-group label {
        font-family: 'Fira Sans', Arial, sans-serif;
        font-weight: bold;
        font-size: 1.08rem;
        text-align: left;
        width: 100%;
        margin-bottom: 0.1rem;
        letter-spacing: 0.01em;
    }

.required {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: normal;
    color: #000;
    margin-left: 0.3em;
    vertical-align: middle;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 1rem;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 0.55em 0.9em;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.05rem;
    background: #fff;
    color: #222;
    resize: vertical;
    display: block;
}

.form-group textarea {
    min-height: 90px;
    max-width: 100%;
}

.form-error {
    color: #d32f2f;
    font-size: 0.95em;
    margin-top: 0.18em;
    width: 100%;
    text-align: left;
}

.form-success {
    color: #388e3c;
    margin-top: 1em;
    font-family: 'Fira Sans', Arial, sans-serif;
    font-weight: bold;
    text-align: center;
}

.submit-btn {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-weight: bold;
    background: #fff;
    color: #222;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 0.7em 2.2em;
    font-size: 1.13em;
    cursor: pointer;
    margin-top: 0.7rem;
    transition: background 0.18s, color 0.18s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

    .submit-btn:hover {
        background: #CE99FF;
        color: #fff;
    }

.consent-group {
    /*display: flex;*/
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 1.1rem;
   /* justify-content: flex-start;*/
}

    .consent-group input[type="checkbox"] {
        margin-right: 0.7em;
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        max-width: 28px;
        max-height: 28px;
        accent-color: #CE99FF;
        box-sizing: border-box;
        vertical-align: middle;
    }

.consent-label {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-weight: bold;
    font-size: 1.08rem;
    text-align: left;
    /*flex: 1 1 0%;*/
    min-width: 300px;
    line-height: 1.3;
    word-break: break-word;
    margin: 0;
    width: 100%
    /* Remove width, display, and background properties */
}

    .consent-label a {
        color: #222;
        text-decoration: underline;
        font-weight: bold;
        transition: color 0.2s;
    }

        .consent-label a:hover,
        .consent-label a:focus {
            color: #1976d2;
            text-decoration: underline;
        }

@media (max-width: 600px) {
    .contact-form {
        padding: 1.1rem 0.4rem;
        max-width: 98vw;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        font-size: 0.98rem;
        padding: 0.5em 0.7em;
    }

    .submit-btn {
        font-size: 1rem;
        padding: 0.6em 1.2em;
    }

    .form-group label,
    .consent-label {
        font-size: 0.98rem;
    }
}
