
/* =========================================
   GLOBAL STYLING
   ========================================= */

:root {
    --primary-color: #002E6D;
    --accent-color: #FBB040;
    --accent-hover: #e09e38;
    --border-color: #dddddd;
    --text-color: #222222;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 20px;
    font-family: Arial, sans-serif;
    color: var(--text-color);
    background-color: #ffffff;

    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}


/* =========================================
   MAIN PAGE
   ========================================= */

.pagewrapper {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-width: 1100px;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
}

h1 {
    font-family: Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin: 35px 0 40px;
}


/* =========================================
   LIFEHACK CARD GRID
   ========================================= */

.card-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, 220px);
    justify-content: center;

    gap: 25px;

    width: 100%;
    margin-bottom: 45px;
}


/* =========================================
   LIFEHACK CARD
   ========================================= */

.card {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 220px;
    min-height: 310px;

    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);

    transition: transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}


/* =========================================
   CARD IMAGE
   ========================================= */

.card-image {
    display: block;

    width: 100%;
    height: 190px;

    object-fit: cover;
}


/* =========================================
   CARD TITLE
   ========================================= */

.card-title {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: bold;

    text-align: center;
    line-height: 1.4;

    padding: 15px 10px;
}


/* =========================================
   CARD BUTTON / LINK
   ========================================= */

.card-cta {
    display: block;

    width: 90%;
    margin: auto 0 15px;
    padding: 12px 15px;

    background-color: var(--accent-color);
    color: var(--primary-color);

    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    border: none;
    border-radius: 8px;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);

    transition: background-color 0.2s ease,
    transform 0.2s ease;
}

.card-cta:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.card-cta:active {
    transform: translateY(0);
}


/* =========================================
   LOGIN SECTION
   ========================================= */

h3 {
    font-family: Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;

    margin: 0 0 20px;
}

.generic-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;

    gap: 12px;

    width: 100%;
    max-width: 700px;

    margin-bottom: 40px;
}

.generic-form input {
    flex: 1 1 180px;
    min-width: 0;

    padding: 12px;

    font-family: Arial, sans-serif;
    font-size: 1rem;

    border: 1px solid #cccccc;
    border-radius: 6px;

    background-color: white;
}

.generic-form input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}


/* =========================================
   LOGIN BUTTON
   ========================================= */

.btn {
    padding: 12px 22px;

    font-size: 1rem;
    font-weight: 600;

    border: none;
    border-radius: 6px;

    cursor: pointer;

    transition: background-color 0.2s ease;
}

.btn-ok {
    background-color: var(--primary-color);
    color: white;
}

.btn-ok:hover {
    background-color: #004b9b;
}


/* =========================================
   ERROR MESSAGE
   ========================================= */

.generic-form > div {
    flex-basis: 100%;
}

.error {
    color: #b00020;
    font-size: 0.9rem;
    text-align: center;
    margin: 5px 0;
}


/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablets */
@media screen and (max-width: 800px) {

    .pagewrapper {
        max-width: 100%;
    }

    .logo {
        max-width: 420px;
    }

    .card-grid {
        gap: 20px;
    }
}

/* Mobile */
@media screen and (max-width: 600px) {

    body {
        padding: 20px 15px;
    }

    .logo {
        max-width: 320px;
    }

    h1 {
        margin: 25px 0 30px;
    }

    .card-grid {
        grid-template-columns: repeat(
            auto-fit,
            minmax(0, 220px)
        );
        gap: 20px;
    }

    .card {
        width: 100%;
    }

    .generic-form {
        flex-direction: column;
        align-items: stretch;
    }

    .generic-form input {
        flex: 0 0 auto;
        width: 100%;
    }

    .btn-ok {
        width: 100%;
    }
}
