/* 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: 10px 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; }
.country-select { padding: 5px; border: 1px solid #ddd; margin-left: 10px; }
.user-menu { display: flex; align-items: center; flex-wrap: wrap; }
.user-menu a { margin-left: 15px; color: #666; text-decoration: none; }
.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; }

/* Message */
.message { background: #d4edda; color: #155724; padding: 15px; text-align: center; margin: 10px 20px; border-radius: 5px; }

/* 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; }

/* 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 { background: #4caf50; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.back-btn { background: #666; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 5px; }

/* 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 { 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; }
    .ad-actions { flex-direction: column; }
}