/* Local font-face declarations */
@font-face {
    font-family: 'Rubik';
    src: url('../fonts/Rubik-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Maxwell';
    src: url('../fonts/MAXWELL-REGULAR.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Maxwell';
    src: url('../fonts/MAXWELL-BOLD.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Maxwell';
    src: url('../fonts/MAXWELL-LIGHT.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Chilet';
    src: url('../fonts/Chilet.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    background: #FFFcf3;
    margin: 0;
    font-family: 'Maxwell', Arial, sans-serif;
    color: #7F5752;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: #D7E54A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    border-bottom: none !important;
}

/* Wavy bottom for navbar */
nav::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 18px;
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="18" viewBox="0 0 1440 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 9C120 18 360 18 480 9C600 0 840 0 960 9C1080 18 1320 18 1440 9V18H0V9Z" fill="%23FFFcf3"/></svg>') repeat-x;
    background-size: 100% 18px;
    z-index: 1;
    border: none !important;
    box-shadow: none !important;
}

.logo {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #4B2018;
}

.official-btn {
    background: #FF6978;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    text-decoration: none;
    font-family: 'Rubik', Arial, sans-serif;
    transition: background 0.2s;
    text-align: center;
    display: inline-block;
}

.official-btn:hover {
    background: #e85c6b;
}

main {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
    background: transparent;
    border: none;
    position: relative;
    z-index: 2;
}

.title {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #4B2018;
}

.subtitle {
    font-family: 'Maxwell', Arial, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #7F5752;
}

#searchBar {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1.1rem;
    border: 1.5px solid #ddd;
    border-radius: 30px;
    margin-bottom: 2.5rem;
    outline: none;
    transition: border 0.2s;
    font-family: 'Maxwell', Arial, sans-serif;
    color: #7F5752;
}

#searchBar:focus {
    border-color: #FF6978;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
    max-height: 350px;
    position: relative;
}

.card:hover {
    border-color: #FF6978;
    box-shadow: 0 8px 32px rgba(255, 105, 120, 0.10);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.card-title {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 1.5rem;
    margin: 0;
    color: #4B2018;
}

.expand-icon {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.card.expanded .expand-icon {
    transform: rotate(180deg);
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0 0;
    font-family: 'Maxwell', Arial, sans-serif;
    font-size: 1.1rem;
    color: #333;
    transition: max-height 0.3s;
}

.card-list li {
    margin-bottom: 1rem;
}

.card-list a {
    color: #FF6978;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.card-list a:hover {
    text-decoration: underline;
}

/* Card expand/collapse */
.card:not(.expanded) .card-list {
    max-height: 180px;
    overflow: hidden;
}

.card.expanded .card-list {
    max-height: 1000px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.98rem;
    color: #888;
    margin: 1.5rem 0 1rem 0;
    font-family: 'Maxwell', Arial, sans-serif;
}

.breadcrumb a {
    color: #FF6978;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-title {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #4B2018;
}

.article-meta {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 1.5rem;
    font-family: 'Maxwell', Arial, sans-serif;
}

.article-content {
    font-family: 'Maxwell', Arial, sans-serif;
    font-size: 1.13rem;
    color: #222;
    line-height: 1.7;
}


/* Responsive */
@media (max-width: 600px) {
    main {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .card {
        padding: 1rem 0.7rem;
    }

    .logo {
        font-size: 1.3rem;
    }
}

/* Responsive for tablets */
@media (max-width: 900px) {
    nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1rem;
    }

    .logo {
        margin-bottom: 0;
        font-size: 1.7rem;
    }

    .logo img {
        height: 2.7rem !important;
        vertical-align: middle;
    }

    main {
        max-width: 98vw;
        padding: 0 0.5rem;
    }

    .card {
        padding: 1.2rem 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .official-btn {
        width: auto;
        min-width: 90px;
        align-self: flex-end;
        margin-top: 0;
        margin-left: 1rem;
    }
}

/* Responsive for phones */
@media (max-width: 600px) {
    nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .logo img {
        height: 1.7rem !important;
        vertical-align: middle;
    }

    .official-btn {
        font-size: 0.95rem;
        /* padding: 0.5rem 0.9rem; */
        width: auto;
        min-width: 80px;
        align-self: flex-end;
        margin-top: 0;
        margin-left: 1rem;
    }

    main {
        max-width: 100vw;
        padding: 0 0.2rem;
    }

    .card {
        padding: 0.7rem 0.3rem;
    }

    .title {
        font-size: 1.3rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    #searchBar {
        font-size: 1rem;
        padding: 0.7rem 0.7rem;
    }

    .card-list {
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .logo img {
        height: 1.3rem !important;
        vertical-align: middle;
    }

    .title {
        font-size: 1.1rem;
    }

    .official-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        min-width: 70px;
        margin-left: 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .card {
        padding: 0.5rem 0.1rem;
    }

    nav::after {
        height: 3px;
        background: #FFFcf3;
        background-image: none !important;
        background-size: auto;
        bottom: 0;
    }
}

@media (max-width: 1100px) {
    nav::after {
        height: 3px;
        background: #FFFcf3;
        background-image: none !important;
        background-size: auto;
        bottom: 0;
    }
}

@media (max-width: 600px) {
    nav::after {
        height: 3px;
        background: #FFFcf3;
        background-image: none !important;
        background-size: auto;
        bottom: 0;
    }
}