/* Global Styles for Liberty Critter */

/* Common Body Styles */
html, body {
    font-family: 'Noto Serif', serif;
    margin: 0;
    padding: 0;
    background-color: #faf0e6; /* Light beige */
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures minimum height is the full viewport height */
}

/* Navbar Styles */
.navbar {
    background-color: #87CEEB; /* Steel blue */
    padding: 15px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 0 15px;
    font-weight: bold;
    font-size: 18px;
}

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

/* Common Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1 0 auto; /* Allows the container to grow and push the footer down */
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px;
    background-color: #87CEEB; /* Steel blue */
    color: white;
    font-size: 16px;
    flex-shrink: 0; /* Prevents the footer from shrinking */
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

/* Common Title Styles */
.title {
    text-align: center;
    font-size: 48px;
    color: #333;
    margin-top: 50px;
    margin-bottom: 20px;
}

/* Common Heading Styles */
h2 {
    font-size: 28px;
    color: #87CEEB; /* Sky blue */
    margin-bottom: 10px;
}

/* Common Paragraph Styles */
p {
    font-size: 18px;
    line-height: 1.5;
    color: #555;
    text-align: justify;
}

/* Global Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
    max-width: 100%;
    box-sizing: border-box;
}

.responsive-table {
    border: 1px solid #ddd;
    max-width: 100%;
    box-sizing: border-box;
    table-layout: fixed;
}

td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    background-color: #ffffff;
    width: 50%;
}

/* Text cell styling */
td:last-child h2 {
    margin-top: 0;
}

/* Global Image Styles for Tables */
td img {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Add spacing between table rows */
.responsive-table tr {
    margin-bottom: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 10px 5px;
    }

    .navbar a {
        padding: 0 8px;
        font-size: 16px;
    }

    .title {
        font-size: 40px;
        margin-top: 30px;
    }

    footer {
        padding: 15px 10px;
        font-size: 14px;
    }

    /* Container adjustments for tablet */
    .container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Table takes full width on tablet */
    .responsive-table {
        width: 100%;
        margin: 0;
        padding: 0;
        border-collapse: collapse;
    }

    /* Start making tables more responsive */
    .responsive-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        width: 100%;
    }

    td {
        width: 100%;
        display: block;
        border: none;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        padding: 10px 0;
    }

    td:last-child {
        border-bottom: none;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 8px 2px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar a {
        padding: 5px 6px;
        font-size: 14px;
        display: inline-block;
    }

    .title {
        font-size: 32px;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    footer {
        padding: 10px 5px;
        font-size: 12px;
    }

    /* Container takes full width on mobile */
    .container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Table takes full width on mobile */
    .responsive-table {
        width: 100%;
        margin: 0;
        border: none;
        padding: 0;
        border-collapse: collapse;
    }

    td {
        padding: 10px 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Full responsive table for mobile */
    .responsive-table tr {
        margin-bottom: 30px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        width: 100%;
    }

    /* Reverse the order of cells in each row for mobile */
    .responsive-table tr {
        display: flex;
        flex-direction: column-reverse;
    }

    /* Style for the image cell */
    td:first-child {
        padding-top: 15px;
        background-color: #f9f9f9;
        width: 100%;
    }

    /* Style for the text cell */
    td:last-child {
        text-align: left;
        width: 100%;
        padding: 15px 10px;
    }

    p {
        font-size: 16px;
    }

    /* Adjust image size for mobile */
    td img {
        max-width: 200px;
        width: 80%;
        margin: 0 auto;
        padding: 10px 0;
    }
}
