/* Global Styles in map/static/style.css */
/* Ensure page fills viewport and footer sits at bottom */
html, body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #2b5f47;
    background: linear-gradient(#a1f6f7, #c35ff2);
    min-height: 100vh; /* full viewport height */
    display: flex;
    flex-direction: column; /* header -> main -> footer */
}

/* --- append these global header layout rules --- */
:root {
    /* adjust to match your header visual height */
    --site-header-height: 64px;
    --site-header2-height: 56px; /* height of secondary notebook toolbar */
}

header, footer {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
}

/* Make main expand to consume available space so footer is pushed down */
main {
    flex: 1 0 auto; /* grow and take remaining space */
    padding-top: calc(var(--site-header-height) + var(--site-header2-height));
    padding: 2rem;
    max-width: 900px;
    margin: auto;
    background: linear-gradient(#a1f6f7, #c35ff2);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* Push page content below fixed header */
}


main.fullwidth {
    max-width: none;
    width: 100%;
    margin: 0 auto; 
}


/* Global site header: make it fixed and on top */
.site-header {
    display: flex;
    align-items: center;
    justify-content: center; /* horizontal centering of children */
    gap: 1rem;
    height: var(--site-header-height);
    flex-shrink: 0; /* never collapse below content size */
    padding: 0px 16px; /* increase vertical height */
    background: #333; /* Dark header background */
    border-bottom: 1px solid #e0e0e0;
    color: #fff;
    line-height: 1; /* prevents extra height from line spacing */
    z-index: 1200; /* higher than any page toolbars */
}
/* Ensure header links remain visible */
.site-header a {
    color: inherit;
    text-decoration: none;
}
/* Notebook toolbars should sit below the main header (use lower z-index) */

/* Authoritative .site-header2 (secondary toolbar used by notebook pages)
   All presentation rules for .site-header2 must live here. */
.site-header2 {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--site-header-height)); /* placed immediately below global header */
    height: var(--site-header2-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px; /* horizontal padding only to keep it compact */
    background: #333; /* match global header */
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1100; /* below global header */
}

/* button-group inside the secondary header should stay compact */
.site-header2 .button-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    flex-wrap: nowrap; /* prevent wrapping which increases header height */
}

/* small adjustments to buttons inside secondary header to avoid tall buttons */
.site-header2 .button-group .btn {
    white-space: nowrap;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1;
}


/* Compact footer styling */
.site-footer {
    flex-shrink: 0; /* never collapse below content size */
    padding: 6px 12px; /* reduce vertical height */
    font-size: 0.875rem; /* slightly smaller text */
    line-height: 1; /* prevents extra height from line spacing */
    background: #c35ff2; /* Same as base background at the bottom */
    border-top: 1px solid #e0e0e0;
    color: #333;
}

/* Remove default paragraph margin inside footer */
.site-footer p {
    margin: 0;
}


h1 {
    color: red;
    font-size: 3rem;
    margin-top: 1rem; /* space before */
    margin-bottom: 1rem; /* space after */
}

h2 {
    color: green;
    font-size: 2.5rem;
    margin-top: 1rem; /* space before */
    margin-bottom: 1rem; /* space after */
}
h3 {
    color: blue;
    font-size: 2rem;
    margin-top: 1rem; /* space before */
    margin-bottom: 1rem; /* space after */
}

h4 {
    color: black;
    font-size: 1.5rem;
    margin-top: 1rem; /* space before */
    margin-bottom: 1rem; /* space after */
}

a {
    color: #007bff;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

.zoo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: start;
    background: linear-gradient(#00fbff, #0473b9);
    margin: 1rem 0;
    padding: 0;
}

.animal-card {
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.animal-card:hover {
        transform: scale(1.03);
    }

    .animal-card img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

.animal-text {
    font-size: 0.95rem;
    color: #222;
    line-height: 1.3;
}

/* Small screens: tighten spacing if needed */
@media (max-width: 420px) {
    .zoo-grid {
        gap: 0.5rem;
    }

    .animal-card {
        padding: 0.5rem;
    }
}

@media print {
    button {
        display: none;
    }

    .hide-paragraph {
        display: none;
    }

    /* Hide elements with the class "print-hide" */
    .print-hide {
        display: none;
    }

    /* Hide header and footer when printing */
    .site-header,
    .site-footer {
        display: none !important;
        visibility: hidden;
    }

    /* Optional: make printed content use full height */
    main {
        margin: 0;
        padding: 0;
    }
    .page-break {
        break-before: page; /* Modern standard */
    }
}
