/* Updated style.css with new classes for Post Ad functionality */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.6; color: #333; background: #f9f9f9; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Navbar */
nav { position: fixed; top: 0; width: 100%; background: #fff; border-bottom: 2px solid #e91e63; z-index: 1000; padding: 0px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo { font-size: 1.8em; font-weight: bold; color: #e91e63; text-decoration: none; }
.categories { position: relative; }
.categories-btn { background: none; border: 1px solid #e91e63; color: #e91e63; padding: 8px 12px; cursor: pointer; }
.dropdown { position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid #e91e63; min-width: 150px; display: none; }
.dropdown a { display: block; padding: 10px; color: #333; text-decoration: none; }
.dropdown a:hover { background: #f9f9f9; }
.user-menu { display: flex; align-items: center; flex-wrap: wrap; }
.user-menu a, .user-menu button { margin-left: 15px; color: #FFEB3B; text-decoration: none; cursor: pointer; }
.user-menu span { margin-left: 15px; color: #e91e63; font-weight: bold; }
.post-ad-btn { background: #e91e63; color: #fff; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; margin-left: 10px; }

/* Search Bar */
.search-hero { background: linear-gradient(to right, #e91e63, #f48fb1); color: #fff; padding: 80px 20px 60px; text-align: center; margin-top: 60px; }
.search-form { display: flex; max-width: 800px; margin: 20px auto; gap: 10px; flex-wrap: wrap; justify-content: center; }
.search-input { flex: 1; min-width: 200px; padding: 12px; border: none; border-radius: 5px; }
.search-select { padding: 12px; border: none; border-radius: 5px; }
.search-btn { background: #fff; color: #e91e63; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; }

/* Cities Grid */
.cities-grid { display: flex; justify-content: center; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.city-link { padding: 10px 20px; background: #e91e63; color: #fff; text-decoration: none; border-radius: 5px; transition: background 0.2s; }
.city-link:hover { background: #c2185b; }

/* Message */
.message { background: #d4edda; color: #155724; padding: 15px; text-align: center; margin: 10px 20px; border-radius: 5px; }
.message.error { background: #f8d7da; color: #721c24; }

/* Main */
.main { padding: 20px 0; }
.listing-summary { background: #fff; padding: 20px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.listing-summary .count { color: #777; }
.disclaimer { background: #fff3cd; border: 1px solid #ffeaa7; padding: 15px; margin: 20px 0; border-radius: 5px; font-size: 0.9em; }
.disclaimer a { color: #e91e63; text-decoration: none; }

/* Filters */
.filters { display: flex; justify-content: center; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.filter-btn { background: #e91e63; color: #fff; border: none; padding: 8px 15px; border-radius: 20px; cursor: pointer; }
.filter-btn.active { background: #c2185b; }
.filter-note { text-align: center; margin: 20px 0; font-style: italic; color: #777; }

/* Profiles Grid */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.profile-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); transition: transform 0.2s; position: relative; text-decoration: none; color: inherit; display: block; }
.profile-card:hover { transform: translateY(-5px); }
.profile-img { width: 100%; height: 250px; background-size: cover; background-position: center; position: relative; }
.profile-img::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.2); }
.available-badge { position: absolute; top: 10px; right: 10px; background: #4caf50; color: #fff; padding: 5px 10px; border-radius: 15px; font-size: 0.8em; z-index: 2; }
.img-overlay { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; opacity: 0; transition: opacity 0.2s; z-index: 3; background: rgba(0,0,0,0.5); padding: 10px; border-radius: 20px; }
.img-overlay button { background: #4caf50; color: #fff; border: none; padding: 8px; border-radius: 50%; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.profile-content { padding: 15px; }
.profile-name { font-size: 1.4em; font-weight: bold; color: #e91e63; margin-bottom: 5px; }
.profile-meta { color: #777; margin-bottom: 10px; }
.star-rating { display: flex; color: #ffd700; margin-bottom: 10px; }
.star { font-size: 1.2em; margin-right: 2px; cursor: pointer; transition: color 0.2s; }
.star.filled { color: #ffd700; }
.star.empty { color: #ddd; }
.profile-bio { font-size: 0.95em; color: #555; margin-bottom: 10px; }
.profile-rates { font-weight: bold; color: #e91e63; }

/* Consolidated badges */
.badge { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 15px; font-size: 0.8em; z-index: 2; }
.premium { background: #ffd700; color: #000; }
.verified { top: 40px; background: #2196f3; color: #fff; }

/* Pagination */
.pagination { text-align: center; margin: 20px 0; }
.pagination button { padding: 10px 15px; margin: 0 5px; background: #e91e63; color: #fff; border: none; border-radius: 5px; cursor: pointer; }
.pagination button:hover { background: #c2185b; }
.pagination button:disabled { background: #ccc; cursor: not-allowed; }

/* Modal for Post Ad/Login/Signup */
.modal { position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); display: none; }
.modal-content { background-color: #fff; margin: 10% auto; padding: 20px; border-radius: 10px; width: 80%; max-width: 500px; position: relative; }
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover { color: #e91e63; }
.modal form { display: flex; flex-direction: column; gap: 10px; }
.modal input, .modal select, .modal textarea { padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
.modal-content img { max-width: 100px; max-height: 100px; border: 1px solid #ddd; border-radius: 5px; }
.modal form label { font-size: 0.9em; color: #666; }

/* Consolidated clickability/modal fixes */
.user-menu a, .user-menu button { pointer-events: auto !important; z-index: 1001; position: relative; }
.user-menu { align-items: center; flex-wrap: wrap; align-self: center; }
.modal { pointer-events: none; }
.modal-content, .close { pointer-events: auto; }

/* Ad Detail Page */
.ad-detail-page .ad-header { max-width: 800px; margin: 60px auto; padding: 20px; background: #fff; border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); text-align: center; }
.ad-img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.ad-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.ad-actions button, .call-btn, .whatsapp-btn { background: #4caf50; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin: 5px; }
.whatsapp-btn { background: #25D366; }
.back-btn { background: #666; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 5px; display: inline-block; }

/* Footer */
footer { background: #333; color: #fff; padding: 40px 20px 20px; text-align: center; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-around; flex-wrap: wrap; margin-bottom: 20px; }
.footer-section { flex: 1; min-width: 200px; margin: 10px; }
.footer-section h3 { color: #e91e63; margin-bottom: 10px; }
.footer-section a { display: block; color: #ccc; text-decoration: none; margin: 5px 0; }
.footer-section a:hover { color: #fff; }
.social-icons { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.social-icons a { font-size: 1.5em; color: #ccc; }
.copyright { border-top: 1px solid #555; padding-top: 20px; font-size: 0.9em; color: #999; }
.age-warning { background: #fff3cd; color: #856404; padding: 10px; margin-top: 20px; border-radius: 5px; font-size: 0.85em; }

@media (max-width: 768px) { 
    .nav-container, .search-form, .user-menu, .cities-grid, .ad-actions { flex-direction: column; gap: 10px; }
    .profiles-grid { grid-template-columns: 1fr; } 
    h1 { font-size: 2em; } 
    .footer-content { flex-direction: column; }
    .modal-content { width: 95%; margin: 20% auto; }
    .admin-actions { flex-direction: column; }
}
/* Dynamic Content Box */
.content-box {
    background: #fff;
    padding: 30px;
    margin: 30px auto;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    line-height: 1.7;
    color: #333;
}
.content-box h2 {
    color: #e91e63;
    font-size: 2em;
    margin-bottom: 15px;
    text-align: center;
}
.content-box h3 {
    color: #c2185b;
    font-size: 1.6em;
    margin: 25px 0 15px;
}
.content-box h4, .content-box h5, .content-box h6 {
    color: #e91e63;
    margin: 20px 0 10px;
}
.content-box ul {
    margin: 15px 0;
    padding-left: 20px;
}
.content-box ul li {
    margin: 8px 0;
    position: relative;
}
.content-box ul li:before {
    content: "✓";
    color: #4caf50;
    font-weight: bold;
    margin-right: 10px;
}

/* Improved Footer */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 40px 20px;
}
.footer-section h4 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 1.3em;
}
.footer-section a {
    display: block;
    color: #ccc;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-section a:hover {
    color: #e91e63;
}
.copyright {
    text-align: center;
    padding: 20px;
    background: #222;
    color: #999;
    font-size: 0.9em;
    border-top: 1px solid #444;
}
.ad-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(233,30,99,0.3) !important;
}
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9999; align-items: center; justify-content: center; }
.modal-content { background: white; padding: 30px; border-radius: 12px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
/* ——— FIX FOOTER ON ALL PAGES (Home, City, Ad Detail) ——— */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Very important */
}

main {
    flex: 1; /* This pushes footer down */
}

/* Optional: Better spacing before footer */
.container {
    padding-bottom: 50px;
}