body {
    font-family: "Funnel Sans", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 5rem;
}

header.top-bar {
    text-align: center;
    text-transform: uppercase;
    font-family: "Roboto Serif", serif;
    margin: 3rem 0rem;
    letter-spacing: 7px;
}

header.top-bar a {
    text-decoration: none;
    color: inherit;
}

header > h1 {
    font-family: "Yellowtail", cursive;
    font-size: 3rem;
    color: #2c3e50;
}

h2 {
    font-family: "Yellowtail", cursive;
    font-size: 2rem;
    color: #2c3e50;
}

em {
    font-family: "Yellowtail", cursive;
    font-size: 1.5rem;
    font-style: normal;
    color: #2c3e50;
}

p {
    font-size: 1.2rem;
}

.auth-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    margin: 0 auto;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2.5rem;
    box-shadow: 0 18px 50px rgba(44, 62, 80, 0.08);
    text-align: center;
}

.auth-card header {
    display: inline-flex;
    flex-direction: column;
    gap: .2rem;
    margin-bottom: 1.3rem;
}

.auth-card header > h1 {
    display: inline-block;
    margin: 0;
    color: #2c3e50;
    font-family: "Roboto Serif", serif !important;
    letter-spacing: 7px;
    font-weight: 400;
    font-size: 2rem;
    margin-right: -7px;
}

.auth-card p {
    margin: 0;
    color: #4b5563;
}

.auth-alert {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: #ffe4e6;
    color: #b91c1c;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    text-align: left;
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.75rem;
}

.auth-form label {
    font-weight: 700;
    color: #2c3e50;
    text-align: left;
}

.auth-form input[type="password"] {
    padding: 0.9rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input[type="password"]:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.auth-form button {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 0.95rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.auth-form button:hover {
    background: #1f2d3a;
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.14);
}

.auth-form button:active {
    transform: translateY(1px);
}

.emirates-color {
    display: flex;
    gap: .7rem;
    width: 100%;
}

.emirates-color span {
    display: inline-block;
    height: 2px;
    flex-grow: 1;
    flex-shrink: 1;
    border-radius: 2px;
}

.emirates-color .red {
    background-color: #c20f2d;
}

.emirates-color .green {
    background-color: #318f50;
}

.emirates-color .black {
    background-color: #000000;
}

hr {
    border: none;
    border-top: 1px solid #C9D4E3;
    margin: 2rem 0;
}

.article-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background-color: #fff;
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.article-preview header h3,
.article-preview p {
    margin: 0;
}

.article-preview__link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-preview__content {
    position: relative;
    z-index: 2;
}

.article-preview:focus-within,
.article-preview:hover {
    border-color: #cbd5e1;
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.08);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Base Grid Styles */
.bento-grid > p {
    display: grid;
    gap: 1rem;
    /* On Desktop: 3 Columns */
    grid-template-columns: repeat(3, 1fr);
    /* By default, images fill the area named after their index */
    & > :nth-child(1) { grid-area: a; }
    & > :nth-child(2) { grid-area: b; }
    & > :nth-child(3) { grid-area: c; }
    & > :nth-child(4) { grid-area: d; }
    & > :nth-child(5) { grid-area: e; }
    & > :nth-child(6) { grid-area: f; }
}

/* The Pattern Class */
.bento-grid__abb-ccc > p {
    grid-template-areas: 
        "a b b"
        "c c c";

    & > :nth-child(1) { aspect-ratio: 1 / 1; }
    & > :nth-child(2) { aspect-ratio: 2 / 1; }
    & > :nth-child(3) { aspect-ratio: 3 / 2; }
}

.bento-grid__aab-aac-ddc-eff > p {
    grid-template-areas: 
        "a a b"
        "a a c"
        "d d c"
        "e f f";

    & > :nth-child(1) { aspect-ratio: 3 / 2; }
    & > :nth-child(2) { aspect-ratio: 1 / 1; }
    & > :nth-child(3) { aspect-ratio: 1 / 2; }
    & > :nth-child(4) { aspect-ratio: 2.5 / 1; }
    & > :nth-child(5) { aspect-ratio: 1 / 1; }
    & > :nth-child(6) { aspect-ratio: 2 / 1; }
}

.bento-grid__abb-abb-cdd > p {
    grid-template-areas: 
        "a b b"
        "a b b"
        "c c d";

    & > :nth-child(1) { aspect-ratio: 2 / 1; }
    & > :nth-child(2) { aspect-ratio: 1 / 1; }
    & > :nth-child(3) { aspect-ratio: 2 / 1; }
    & > :nth-child(4) { aspect-ratio: 1 / 1; }
}

img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.image-thumb {
    cursor: zoom-in;
    transition: transform 0.15s ease;
}

.image-thumb:hover {
    transform: scale(1.01);
}

.image-modal {
    padding: 0;
    border: none;
    background: transparent;
    max-width: min(90vw, 1200px);
}

.image-modal::backdrop {
    background: rgba(18, 27, 38, 0.7);
    backdrop-filter: blur(2px);
}

.image-modal__frame {
    margin: 0;
    padding: 0;
}

.image-modal__frame img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

time {
    font-weight: bold;
}

@media screen and (max-width: 600px) {
    main {
        padding: 0 2rem;
    }

    .bento-grid > p {
        gap: .5rem;
    }
}