﻿:root {
    --blue: #003a70;
    --blue-light: #0057b8;
    --gray-bg: #f5f5f5;
    --border: #e0e0e0;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--gray-bg);
    color: #222;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.logo {
    height: 60px;
}

/* Menu Styling */
.navigation {
    margin-top: 5px;
}

/*.menu-items {
    display: flex;
    list-style: none;
    gap: 20px;
    padding: 0;
}*/



.menu-items {
    display: flex;
    list-style: none;
    gap: 30px;
    padding: 0;
    margin: 0;
}

    /* Make links look like plain white text */
    .menu-items li a {
        color: #ffffff; /* Pure white */
        text-decoration: none; /* Removes the underline */
        font-family: sans-serif;
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase; /* Optional: standard for gov/agency sites */
        transition: opacity 0.3s;
        white-space: nowrap;
    }

        /* Add a subtle hover effect so users know they are clickable */
        .menu-items li a:hover {
            opacity: 0.8;
        }




.nav-toggle {
    display: none;
}

/* Right Side Alignment */
.header-controls {
    /*display: flex;*/
    flex-direction: column; /* Stack Translate over Menu */
    align-items: flex-end; /* Align both to the right */
    gap: 5px;
}

header {
    /*background: var(--blue);
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;*/ /* Keeps brand at top left */
    /*border-bottom: 2px solid #003366;
    padding: 10px;
    position: relative;*/



    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Keeps brand at top left */
    padding: 20px;
    background-color: #003366; /* NYPD Navy */
    color: white;
}

    header .brand {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    header img.logo {
        height: 48px;
    }

    header h1 {
        margin: 0;
        font-size: 1.4rem;
    }

    header span {
        font-size: 0.9rem;
        opacity: 0.9;
    }

#google_translate_element {
    margin-left: auto; /* Fallback for right alignment */
    min-width: 150px;
    min-height: 40px;
    display: block !important;
    padding: 5px;
    z-index: 1000; /* Ensures it stays above other elements */
}

.goog-te-gadget {
    font-family: inherit !important;
}

main {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}



.field-group {
    margin-bottom: 1rem;
}

    .field-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .field-group input,
    .field-group select {
        width: 100%;
        padding: 0.45rem 0.5rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 0.95rem;
        box-sizing: border-box;
    }

.actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--blue-light);
    color: #fff;
}

.btn-secondary {
    background: #e0e0e0;
}


/* 1. The Main Card */
.media-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden; /* Ensures header corners match card radius */
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
    /*margin-bottom: 1.5rem;*/
    line-height: 1.7;
}

/* 2. NYPD Blue Card Header */
.media-card-header {
    background-color: #003366; /* NYPD Blue */
    padding: 10px 15px;
    width: 100%;
    display: block;
}

    .media-card-header h3 {
        color: #ffffff;
        margin: 0;
        font-size: 0.9rem; /* Smaller text */
        font-weight: 400; /* Not bold */
        letter-spacing: 0.5px;
        text-transform: none;
    }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    line-height: 1.7;
    /*margin-bottom: 1.5rem;*/
}

    .card a {
        display: inline-block;
        margin-bottom: 0.35rem;
    }

    .card h3 {
        margin-top: 0;
        font-size: 1.2rem;
    }

    .card h4 {
        margin-top: 0.85rem;
        margin-bottom: 0.25rem;
    }

/* 1. The Grid Container */
.media-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 15px 0;
}

/* 2. The Media Card */
.media-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

    .media-item:hover {
        transform: translateY(-5px);
    }

/* 3. Image Wrapper for Badge Positioning */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 160px; /* Uniform height for all tiles */
    cursor: pointer;
}

    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Crops mixed-size images to fit */
    }

/* 4. The Badges */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.video-badge {
    background-color: #d32f2f;
}
/* Red for Video */
.image-badge {
    background-color: #0056b3;
}
/* Blue for Image */

/* Play Icon Overlay for Videos */
.video-type .image-wrapper::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* 5. Title Styling */
.media-item p {
    margin: 0;
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    flex-grow: 1;
}

.nypd-banner {
    background-color: #003366; /* Official NYPD Blue */
    padding: 12px 20px;
}

    .nypd-banner h3 {
        color: #ffffff; /* White Text */
        margin: 0;
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

/*.media-container {
    display: flex;
    flex-wrap: wrap;*/ /* Allows items to wrap to the next line */
    /*gap: 1rem;
    align-items: flex-start;
}*/

/*.media-item {
    background: #fafafa;
    border: 1px solid var(--border, #ccc);
    border-radius: 6px;
    padding: 0.75rem;*/
    /* "0 0 auto" prevents the card from stretching or shrinking */
    /*flex: 0 0 auto;
    max-width: 100%;
    cursor: pointer;*/ /* Indicates it's clickable */
    /*transition: transform 0.2s;
}

    .media-item:hover {
        transform: translateY(-3px);
    }

    .media-item img {
        display: block;
        border-radius: 4px;
        margin-bottom: 0.5rem;
        object-fit: cover;
    }

    .media-item.video-type img {
        width: 200px;
        aspect-ratio: 16 / 9;
    }

    .media-item.image-type img {
        width: 100px;
        aspect-ratio: 2 / 3;
    }*/

/* Modal Styles */
/*.modal-overlay {
    display: none;*/ /* Hidden by default */
    /*position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}*/

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

iframe, .full-img {
    width: 700px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.full-img {
    width: auto;
    aspect-ratio: auto;
    max-height: 80vh;
}

.media-item p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 260px; /* Keeps text from making the card too wide */
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    background: #fafafa;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    text-align: center;
}

/* Modal overlay 
*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal box */
.modal-box {
    background: #fff;
    padding: 25px;
    width: 450px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

    .modal-box h2 {
        margin-top: 0;
        font-size: 22px;
    }

    .modal-box p {
        margin-bottom: 15px;
        line-height: 1.4;
    }

    .modal-box button {
        float: right;
        padding: 8px 18px;
        background: #007bff;
        border: none;
        color: white;
        border-radius: 4px;
        cursor: pointer;
    }

        .modal-box button:hover {
            background: #0056b3;
        }

.two-column-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-column {
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.stack-wrapper {
    display: block; /* Default behavior */
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #003366; /* NYPD Navy */
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 10000; /* Stays above the absolute menu */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: opacity 0.3s, transform 0.3s;
    /* Hidden by default until user scrolls */
    opacity: 0;
    pointer-events: none;
}

    .back-to-top:hover {
        background-color: #004488; /* Lighter blue on hover */
        transform: translateY(-5px);
    }

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}

@media (max-width: 768px) {
    .cards-grid {
        /* If using Grid: */
        display: grid;
        grid-template-columns: 1fr !important;
        /* If using Flexbox: */
        /* display: flex; */
        /* flex-direction: column; */

        gap: 20px; /* Space between the stacked cards */
        width: 100%;
    }

    .card {
        width: 100% !important; /* Prevents desktop widths from sticking */
        box-sizing: border-box; /* Ensures padding doesn't push card off-screen */
        margin-bottom: 0; /* Let the grid-gap handle spacing */
    }

    .goog-te-gadget {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important; /* Keeps it left-aligned */
        white-space: normal !important;
    }

        /* Ensures the logo and "Powered by" text stack below the dropdown */
        .goog-te-gadget span {
            display: block !important;
            margin-top: 5px;
        }

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .stack-wrapper {
        display: flex;
        flex-direction: column-reverse;
        gap: 20px;
    }

    .search-column {
        position: static;
    }


    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        position:relative;
    }

        header .brand {
            flex-direction: column;
        }

    /*.menu-items {
        display: none;
        flex-direction: column;
        background: #90caf9;
        width: 100%;
        padding: 5px;
    }*/

    .menu-items {
        display: none;
        flex-direction: column;
        background-color: #002244;
        position: absolute;
        top: 100%;
        left: 0;
        /*width: 80%;*/
        padding: 0; /* Remove padding here so links can stretch full-width */
        margin: 0;
        border-top: 1px solid #004488;
        gap: 0;
        z-index: 9999 !important;
    }
        
        /* 2. Individual List Items */
        .menu-items li {
            width: 100%;
            border-bottom: 1px solid #003366;
        }

            /* 3. Link Styling - Left Aligned and Full Width */
            .menu-items li a {
                display: block; /* Makes the entire area clickable */
                padding: 15px 25px; /* Comfortable touch area */
                text-align: left; /* Align text to the left */
                color: #ffffff !important;
                text-decoration: none;
                width: 100%;
                box-sizing: border-box; /* Includes padding in width calculation */
            }

                /* 4. Hover/Touch Effect - Lighter Grey Highlight */
                .menu-items li a:hover,
                .menu-items li a:active {
                    background-color: #004488;
                }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        width: 30px;
        transition: all 0.3s ease-in-out; /* Smooth movement */
    }

        .hamburger span {
            height: 3px;
            background: #333;
            border-radius: 2px;
            background: #ffffff;
            transition: all 0.3s ease-in-out; /* Smooth movement */
        }

    /* Show menu when checkbox is checked */
   /* .nav-toggle:checked ~ .menu-items {
        display: flex;
    }*/
    #nav-toggle:checked ~ .menu-items {
        display: flex !important;
    }

    #nav-toggle:checked ~ .hamburger .line-1 {
        transform: translateY(7px) rotate(45deg);
    }

    /* Middle Line: Fade out (make invisible) */
    #nav-toggle:checked ~ .hamburger .line-2 {
        opacity: 0;
        transform: translateX(-10px);
    }

    /* Bottom Line: Rotate -45 degrees and move up */
    #nav-toggle:checked ~ .hamburger .line-3 {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ── 511NY Map Section ── */
.map-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.map-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    background: var(--blue);
    color: #fff;
    gap: 1rem;
    flex-wrap: wrap;
}

    .map-section-header h3 {
        margin: 0;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .map-section-header h3::before {
            content: "🗺️";
            font-size: 1rem;
        }

    .map-section-header a {
        color: #90caf9;
        font-size: 0.85rem;
        text-decoration: none;
        white-space: nowrap;
    }

        .map-section-header a:hover {
            text-decoration: underline;
            color: #fff;
        }

.map-toggle-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: #f0f4f8;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

    .map-toggle-bar strong {
        color: var(--blue);
        margin-right: 0.25rem;
    }

    .map-toggle-bar .tag {
        display: inline-block;
        padding: 0.2rem 0.55rem;
        border-radius: 12px;
        background: var(--blue-light);
        color: #fff;
        font-size: 0.78rem;
        cursor: pointer;
        border: none;
        font-family: inherit;
    }

        .map-toggle-bar .tag:hover {
            background: var(--blue);
        }

.map-frame-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    background: #e8edf2;
}

    .map-frame-wrap iframe {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

    .map-frame-wrap .map-loading {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        color: var(--blue);
        font-size: 0.95rem;
        pointer-events: none;
    }

        .map-frame-wrap .map-loading .spinner {
            width: 36px;
            height: 36px;
            border: 4px solid #ccd6e0;
            border-top-color: var(--blue-light);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.map-disclaimer {
    padding: 0.6rem 1.25rem;
    font-size: 0.78rem;
    color: #666;
    background: #fafafa;
    border-top: 1px solid var(--border);
}

    .map-disclaimer a {
        color: var(--blue-light);
    }
