/* ==========================================================================
   Gò Công Map List - Main Stylesheet
   ========================================================================== */

/* Header Styles */
.rotate-180 {
    transform: rotate(180deg);
}

.header-sticky {
    position: sticky;
    top: 0;
    z-index: 499;
}

@media (max-width: 768px) {
    .mobile-menu-transition {
        transition: all 0.3s ease;
    }
}

.filter-section-animation {
    transition: all 0.3s ease;
}

/* Footer Styles */
footer a {
    transition: all 0.2s ease;
}

/* Sticky Footer Setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, .main-content {
    flex: 1;
}

footer {
    margin-top: auto;
}

@media (max-width: 768px) {
    footer .grid {
        gap: 2rem;
    }
    
    footer h4 {
        font-size: 1.1rem;
    }
    
    footer ul {
        margin-bottom: 1.5rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Index Page Styles */
/* Screen reader only - for SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.place-card {
    transition: all 0.15s ease;
}

.place-card:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
}

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Badge colors for different categories */
.badge-worship {
    background: #FEF3C7;
    color: #92400E;
}

.badge-school {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-tourist {
    background: #D1FAE5;
    color: #065F46;
}

.badge-park {
    background: #D1FAE5;
    color: #047857;
}

.badge-cemetery {
    background: #F3E8FF;
    color: #6B21A8;
}

.badge-stadium {
    background: #FED7AA;
    color: #9A3412;
}

.badge-natural {
    background: #D1FAE5;
    color: #065F46;
}

.badge-library {
    background: #E0E7FF;
    color: #3730A3;
}

.badge-museum {
    background: #FCE7F3;
    color: #9F1239;
}

.badge-transit {
    background: #E5E7EB;
    color: #374151;
}

.badge-keyword {
    background: #FEF3C7;
    color: #854D0E;
}

.badge-default {
    background: #F3F4F6;
    color: #4B5563;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.place-title {
    color: #1D4ED8;
}

.place-title:hover {
    color: #1E40AF;
    text-decoration: underline;
}

.address-link {
    color: inherit;
    transition: color 0.15s ease;
}

.address-link:hover {
    color: #059669;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }

    .mobile-full {
        width: 100% !important;
    }
}

/* Region badges for place items */
.place-region-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    margin-right: 0.25rem;
    min-width: 2rem;
    height: 1.25rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.025em;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.place-badge-gc {
    background: #3B82F6;
}

.place-badge-gcd {
    background: #F59E0B;
}

.place-badge-gct {
    background: #10B981;
}

.place-badge-tpd {
    background: #8B5CF6;
}

.place-badge-default {
    background: #6B7280;
}

/* Place Page Styles */
.info-card {
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 0.5rem;
}

/* Submit Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #374151;
}

/* Address suggestions dropdown */
#address-suggestions {
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 1px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#address-suggestions:empty {
    display: none !important;
}

.btn-primary {
    background: #111827;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: #1f2937;
}

.btn-secondary {
    background: white;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.alert {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Admin Auth Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 24px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.close {
    color: #6b7280;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #1f2937;
}

.action-btn {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

 .adSwiper {
    padding: 0 40px 50px;
}
.adSwiper .swiper-button-next,
.adSwiper .swiper-button-prev {
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.adSwiper .swiper-button-next:after,
.adSwiper .swiper-button-prev:after {
    font-size: 18px;
    color: #7c3aed;
    font-weight: bold;
}
.adSwiper .swiper-button-next:hover,
.adSwiper .swiper-button-prev:hover {
    background: #7c3aed;
}
.adSwiper .swiper-button-next:hover:after,
.adSwiper .swiper-button-prev:hover:after {
    color: white;
}
.adSwiper .swiper-pagination-bullet {
    background: #d1d5db;
    opacity: 1;
}
.adSwiper .swiper-pagination-bullet-active {
    background: #7c3aed;
}
.adSwiper .swiper-slide {
    height: auto;
}
.adSwiper .swiper-slide > a {
    display: flex;
    flex-direction: column;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}