/* public/css/style.css */

:root {
    --primary-color: #4db6ac;
    /* Pastel Teal */
    --primary-dark: #00897b;
    --accent-color: #ff8a80;
    /* Pastel Red/Pink */
    --bg-color: #fefefe;
    --text-color: #555555;
    /* Softer Gray */
    --text-light: #888888;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    /* More rounded */
    --font-main: 'Zen Kaku Gothic New', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Compact */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    padding: 1rem 0;
    position: relative;
    /* For absolute search overlay */

    /* Orange design borders */
    border-top: 4px solid var(--accent-color);

}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    /* Center align vertically */
    gap: 1.5rem;
}

.nav-logo {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: #333;
    /* Dark text */
    text-shadow: none;
    /* Remove shadow */
    margin: 0;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.7;
}

.header-tagline {
    color: #333;
    /* Dark text */
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: auto;
    /* Push navigation to the right */
}

.nav-item {
    color: #444;
    /* Dark text */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-item:hover {
    opacity: 0.8;
}

.btn-login {
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
}

.btn-login:hover {
    background: white;
    color: var(--text-color);
}

/* Hero styles removed */

/* Header Simple */
.header-simple {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.back-link {
    color: var(--primary-color);
    font-weight: bold;
}

/* Community Sections */
.detail-section h2.section-heading {
    border-left: 6px solid #ff9800;
    /* More vibrant accent */
    padding-left: 12px;
    margin-bottom: 24px;
    font-size: 1.4rem;
    color: #444;
}

/* Photo Gallery: 3-column grid */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Square crop */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* File Upload Button */
.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: #fdfdfd;
    border: 2px dashed #ccc;
    border-radius: 12px;
    color: #666;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-btn:hover {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

/* Comments Section - "Engaging" Design */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.comment-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    margin-bottom: 0;
    /* Let grid gap handle spacing if any */
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4db6ac, #00897b);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 137, 123, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

/* User Badge Style */
.comment-user {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e0f2f1;
    /* Light Teal */
    color: #00695c;
    /* Dark Teal text */
    border-radius: 20px;
    /* Oval shape */
    font-weight: bold;
    font-size: 0.85rem;
    line-height: 1.2;
}

.comment-user::before {
    content: none;
}

.comment-date {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

.comment-content {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    padding-left: 4px;
}

/* Replies */
.comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
}

.btn-reply-toggle,
.btn-show-replies {
    background: none;
    border: none;
    cursor: pointer;
    color: #00897b;
    padding: 0;
    font-weight: bold;
}

.btn-reply-toggle:hover,
.btn-show-replies:hover {
    text-decoration: underline;
}

.replies-container {
    margin-top: 12px;
    margin-left: 10px;
    border-left: 3px solid #eee;
    padding-left: 12px;
}

.reply-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.reply-user {
    background-color: #eee;
    /* Differentiate reply user */
    color: #555;
    font-size: 0.75rem;
    padding: 2px 8px;
}

.reply-form-container {
    margin-top: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
}

.simple-reply-form {
    display: flex;
    gap: 8px;
}

.simple-reply-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.simple-reply-form button {
    padding: 8px 16px;
    background: #00897b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Comment Form */
.community-form {
    background: #fafafa;
    padding: 20px;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.community-form textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    resize: none;
    transition: border-color 0.2s;
    outline: none;
}

.community-form textarea:focus {
    border-color: #ff9800;
    background: white;
}

.community-form button {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 12px auto 0;
    border-radius: 50px;
    padding: 12px;
    font-weight: bold;
    background: linear-gradient(to right, #ff9800, #f57c00);
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(245, 124, 0, 0.3);
    transition: transform 0.2s;
}

.community-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(245, 124, 0, 0.4);
}

/* Search Form */
.search-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;

}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.keyword-group {
    flex: 1;
    /* Take full available width */
    min-width: 300px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
}

input[type="text"],
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
}

input[type="text"]:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 137, 123, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(77, 182, 172, 0.3);
    /* Pastel shadow */
}

.btn-primary:hover {
    background: #80cbc4;
    /* Lighter pastel hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(77, 182, 172, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-map {
    background: #4A90E2;
    color: white;
    width: 100%;
    max-width: 300px;
}

.btn-map:hover {
    background: #357ABD;
}

.search-btn {
    min-width: 120px;
    height: 48px;
    /* Match input height roughly */
}

/* Results */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 1rem;
    display: flex;
    align-items: baseline;
}

.section-title span {
    font-size: 1rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

/* Category Nav */
.category-nav {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title-sm {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 700;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: normal;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #f0f0f0;
    color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.category-tag.active {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    font-weight: 700;
}

/* Specific styling for badges used as links */
/* Specific styling for badges used as links */
/* .category-tag[class*="badge-color-"] handled by utility classes */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}



.resource-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Improved Separation: Border + Soft but Deep Shadow */
    border: 3px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    overflow: hidden;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-card:nth-child(1) {
    animation-delay: 0.1s;
}

.resource-card:nth-child(2) {
    animation-delay: 0.2s;
}

.resource-card:nth-child(3) {
    animation-delay: 0.3s;
}

.resource-card:nth-child(4) {
    animation-delay: 0.4s;
}

.resource-card:nth-child(5) {
    animation-delay: 0.5s;
}

.card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    /* Negate padding */
    width: calc(100% + 3rem);
}

.card-image.placeholder {
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: bold;
    font-size: 0.9rem;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    border-color: var(--accent-color);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Linked Badge & Title Hover Effects */
a.badge:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    transition: 0.2s;
}

.card-title a:hover {
    color: var(--primary-color) !important;
    transition: 0.2s;
}

.target-badge {
    background: #e0f2f1;
    color: #00695c;
}

/* Pastel Badge Variations */
.badge-color-0 {
    background: #ffcdd2;
    color: #b71c1c;
}

/* Red/Pink */
.badge-color-1 {
    background: #f8bbd0;
    color: #880e4f;
}

/* Pink */
.badge-color-2 {
    background: #e1bee7;
    color: #4a148c;
}

/* Purple */
.badge-color-3 {
    background: #d1c4e9;
    color: #311b92;
}

/* Deep Purple */
.badge-color-4 {
    background: #c5cae9;
    color: #1a237e;
}

/* Indigo */
.badge-color-5 {
    background: #bbdefb;
    color: #0d47a1;
}

/* Blue */
.badge-color-6 {
    background: #b3e5fc;
    color: #01579b;
}

/* Light Blue */
.badge-color-7 {
    background: #b2dfdb;
    color: #004d40;
}

/* Teal */
.badge-color-8 {
    background: #c8e6c9;
    color: #1b5e20;
}

/* Green */
.badge-color-9 {
    background: #dcedc8;
    color: #33691e;
}

/* Light Green */
.badge-color-10 {
    background: #fff9c4;
    color: #f57f17;
}

/* Yellow */
.badge-color-11 {
    background: #ffe0b2;
    color: #e65100;
}

/* Orange */
.badge-color-12 {
    background: #ffccbc;
    color: #bf360c;
}

/* Deep Orange */
.badge-color-13 {
    background: #d7ccc8;
    color: #3e2723;
}

/* Brown */
.badge-color-14 {
    background: #cfd8dc;
    color: #263238;
}

/* Blue Grey */

.card-body {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

/* Admin Styles */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: bold;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

/* Map Pin Colors (Vivid) */
.pin-color-0 {
    background-color: #b71c1c;
}

.pin-color-1 {
    background-color: #880e4f;
}

.pin-color-2 {
    background-color: #4a148c;
}

.pin-color-3 {
    background-color: #311b92;
}

.pin-color-4 {
    background-color: #1a237e;
}

.pin-color-5 {
    background-color: #0d47a1;
}

.pin-color-6 {
    background-color: #01579b;
}

.pin-color-7 {
    background-color: #004d40;
}

.pin-color-8 {
    background-color: #1b5e20;
}

.pin-color-9 {
    background-color: #33691e;
}

.pin-color-10 {
    background-color: #f57f17;
}

.pin-color-11 {
    background-color: #e65100;
}

.pin-color-12 {
    background-color: #bf360c;
}

.pin-color-13 {
    background-color: #3e2723;
}

.pin-color-14 {
    background-color: #263238;
}

/* Map Pin Colors End */

.meta-list li {
    margin-bottom: 0.3rem;
    display: flex;
    align-items: flex-start;
}

.icon {
    margin-right: 0.5rem;
}

.card-footer {
    text-align: right;
}

/* Detail Page */
.detail-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.detail-image-container {
    margin-bottom: 2rem;
    text-align: center;
}

.detail-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.tag-list {
    margin-bottom: 2rem;
}

.section-heading {
    font-size: 1.2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.detail-description {
    line-height: 1.8;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.detail-table th,
.detail-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.detail-table th {
    width: 30%;
    color: var(--text-light);
    font-weight: normal;
    background: #fafafa;
}

.action-area {
    text-align: center;
    margin-top: 2rem;
}

/* Pickup Section */
.pickup-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease-out;
}

.pickup-label {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.pickup-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: flex;
    overflow: hidden;
    min-height: 300px;
}

.pickup-image {
    display: block;
    text-decoration: none;
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    min-width: 40%;
}

.pickup-image.placeholder {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-weight: bold;
    font-size: 1.5rem;
}

.pickup-content {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.pickup-title {
    font-size: 2rem;
    margin: 1rem 0;
    color: var(--text-color);
}

.pickup-desc {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

@media (min-width: 1025px) {
    .hamburger-menu {
        display: none;
    }
}

.hamburger-menu {
    display: none;
    /* Default hidden, overridden in media query */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 3px;
    transition: 0.3s;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 1024px) {

    /* Header - Stack items */
    /* Header - Mobile Menu */
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    /* Push search button to right on mobile */
    .header-search-btn {
        margin-left: auto !important;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        display: none;
        /* Hidden by default */
        position: absolute;
        /* Overlay */
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 999;
        /* Below search (1000) if both open, or same */
        background: #ffffff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem 0;
        border-top: 1px solid #eee;
        /* margin-top: 1rem; Remove margin */
        animation: slideDown 0.3s ease-out;
    }

    .nav-links.active {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .header-left {
        justify-content: flex-start;
        width: auto;
    }



    /* Pickup Card */
    .pickup-card {
        flex-direction: column;
        min-height: auto;
    }

    .pickup-image {
        min-height: 200px;
        width: 100%;
    }

    .pickup-content {
        padding: 1.5rem;
    }

    .pickup-title {
        font-size: 1.5rem;
    }

    /* Search Form - Stack items */
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group,
    .keyword-group {
        width: 100%;
        min-width: 0;
    }

    .search-btn {
        width: 100%;
    }

    /* Mobile Heart Button Only */
    .fav-text {
        display: none;
    }

    .btn-favorite {
        padding: 0;
        width: 44px;
        height: 44px;
        justify-content: center;
        border-radius: 50%;
    }

    .btn-favorite .fav-icon {
        font-size: 1.2rem;
    }

    .btn-favorite .fav-icon {
        font-size: 1.2rem;
    }



    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;

        /* Detail Page */
        .detail-card {
            padding: 1.5rem;
        }

        .detail-title {
            font-size: 1.5rem;
        }

        .photo-gallery {
            grid-template-columns: repeat(2, 1fr);
        }

        /* Map */
        #map {
            height: 400px;
            /* Smaller height for mobile */
        }

        /* Tables (Detail) */
        .detail-table th,
        .detail-table td {
            display: block;
            width: 100%;
        }

        .detail-table th {
            background: none;
            padding-bottom: 0;
            font-weight: bold;
            color: var(--primary-dark);
            margin-top: 1rem;
        }

        .detail-table tr:first-child th {
            margin-top: 0;
        }

        .detail-table td {
            padding-top: 0.2rem;
            padding-left: 0;
        }
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.5rem;
    }

    .nav-item {
        font-size: 0.9rem;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Favorite Button */
.btn-favorite {
    background: #fff;
    border: 2px solid #e91e63;
    color: #e91e63;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(233, 30, 99, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-favorite:hover {
    background: #fff0f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

.btn-favorite:active {
    transform: translateY(0);
}

.btn-favorite.active {
    background: #e91e63;
    color: white;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
    animation: heartPop 0.4s ease-out;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
    margin-top: 3rem;
}

.admin-link a {
    font-size: 0.9rem;
    color: #999;
}

/* =========================================
   Global Header Search
   ========================================= */
.header-search-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--primary-dark);
    margin-left: 1rem;
    /* Space from NavLinks */
}

.header-search-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-dark);
    stroke-width: 2;
}

.header-search-btn:hover {
    opacity: 0.7;
}

/* Ensure navbar layout handles it */
.navbar {
    gap: 1rem;
    /* Add gap between logo and right-side items */
}

/* Search Section Toggle */
.search-section {
    display: none;
    /* Hidden by default */
    position: absolute;
    /* Float over content */
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    /* Ensure background is solid */
    padding: 1.5rem;
    /* margin-top: 1rem; Remove margin to flush with header */
    border-bottom: 4px solid var(--accent-color);
    /* Match header design */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

.search-section.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet (Small) - 2 Columns */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile (Phone) - 1 Column */
@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stack Logo and Tagline vertically */
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .header-tagline {
        font-size: 0.75rem;
        margin-left: 0;
    }

    .btn {
        width: 50%;
    }

    .detail-card {
        padding: 1rem;
    }
}

/* Pagination Circular Numbers */
.pagination-num {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    /* Prevent shrinking */
    flex: none !important;
    /* Prevent flux/growing */
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
/* Responsive Pagination */
@media (max-width: 480px) {
    .pagination-desktop {
        display: none !important;
    }
    .pagination-mobile {
        display: flex !important;
    }
}
@media (min-width: 481px) {
    .pagination-desktop {
        display: flex !important;
    }
    .pagination-mobile {
        display: none !important;
    }
}
