/* ====== Simple CSS Reset ====== */
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  line-height:1.4;
  color:#222;
  background:linear-gradient(180deg,#7c93a1 0%,#fff 100%);
  padding:0;
  margin:0
}

:root{
  --accent:#0ea5a4;
  --accent-2:#0369a1;
  --muted:#6b7280;
  --card-bg:#ffffff;
  --radius:14px;
  --container:100%; /* changed from 1200px */
  --glass: rgba(167, 144, 144, 0.6);
}

/* ====== Layout ====== */
header{
  position:sticky;
  top:0;
  backdrop-filter:saturate(120%) blur(6px);
  background:linear-gradient(180deg,#0a3d62,#0a3d62);
  border-bottom:1px solid white;
  z-index:40
}
.nav{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0.85rem 1rem
}
.brand{display:flex;gap:.6rem;align-items:center}
.logo{
  height:44px;width:44px;border-radius:10px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:flex;align-items:center;justify-content:center;
  color:white;font-weight:700;
  box-shadow:0 6px 20px rgba(229, 231, 231, 0.08)
}
.brand h1{font-size:1.05rem;margin:0; color: white}
.brand p{margin:0;font-size:.75rem;color: white}

nav .actions{display:flex;gap:.5rem;align-items:center}
.btn{padding:.5rem .9rem;border-radius:10px;border:0;font-weight:600;cursor:pointer; color:red;}
.btn-ghost{background:red; color: #f1f1f1;}
.btn-primary{background:var(--accent);color:white}

.container{
  width:100%;
  max-width:1200px; /* still caps at desktop */
  margin:1.2rem auto;
  padding:0 1rem
}

/* ====== Hero ====== */
.hero{
  display:grid;
  grid-template-columns:1fr; /* default single column */
  gap:1rem;
  align-items:center;
  margin-bottom:1rem
}
@media (min-width:768px){
  .hero{
    grid-template-columns:1fr 400px; /* only on bigger screens */
  }
}
.hero-card{background:var(--card-bg);padding:1.25rem;border-radius:var(--radius);box-shadow:0 6px 30px rgba(2,6,23,0.06)}
.hero h2{margin:0 0 .5rem 0;font-size:1.35rem}
.hero p{margin:0;color:var(--muted)}

.searchbar{display:flex;gap:.6rem;margin-top:1rem}
.searchbar input[type="search"]{flex:1;padding:.6rem .8rem;border-radius:10px;border:1px solid rgba(0,0,0,0.06);outline:none}
.searchbar select{padding:.6rem;border-radius:10px;border:1px solid rgba(0,0,0,0.06)}

/* ====== Grid ====== */
.grid{
  display:grid;
  grid-template-columns:1fr; /* mobile default */
  gap:1rem;
  margin-top:1rem
}
@media (min-width:600px){
  .grid{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:1000px){
  .grid{grid-template-columns:repeat(3,1fr)}
}

.card{
  background:var(--card-bg);
  padding:1rem;
  border-radius:12px;
  box-shadow:0 8px 30px rgba(2,6,23,0.06);
  display:flex;
  flex-direction:column;
  gap:.6rem
}
.card .top{display:flex;gap:.75rem;align-items:center}
.avatar{width:64px;height:64px;border-radius:10px;background:linear-gradient(135deg,#fef3c7,#fbcfe8);display:flex;align-items:center;justify-content:center;font-weight:700;color:#111}
.meta h3{margin:0;font-size:1.05rem}
.meta p{margin:0;color:var(--muted);font-size:.9rem}
.tags{display:flex;gap:.35rem;flex-wrap:wrap}
.tag{background:rgba(2,6,23,0.04);padding:.25rem .5rem;border-radius:8px;font-size:.8rem}
.card .desc{color:var(--muted);font-size:.95rem}

/* ==== FIXED ACTIONS ==== */
.card .actions {
  margin-top: auto;
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap; /* allow wrap on small screens */
}
.card .actions a,
.card .actions button {
  flex: 1 1 45%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: .5rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}


/* Call button */
.call {
  color: #0ea5a4;
  border: 1px solid #0ea5a4;
}
.call:hover {
  background: #0ea5a4;
  color: #fff;
}

/* WhatsApp button */
.call.whatsapp {
  border: 1px solid #25D366;
  color: #25D366;
}
.call.whatsapp:hover {
  background: #25D366;
  color: #fff;
}

/* Remove button */
.remove {
  border: 1px solid #dc2626;
  color: #dc2626;
}
.remove:hover {
  background: #dc2626;
  color: #fff;
}

/* ====== Modal ====== */
.modal-backdrop{position:fixed;inset:0;background:rgba(2,6,23,0.45);display:none;align-items:center;justify-content:center;padding:1rem;z-index:80}
.modal{background:var(--card-bg);max-width:680px;width:100%;padding:1rem;border-radius:14px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.form-grid .full{grid-column:1/-1}
label{font-size:.85rem;color:var(--muted);display:block;margin-bottom:.25rem}
input,textarea,select{width:100%;padding:.5rem .6rem;border-radius:10px;border:1px solid rgba(0,0,0,0.06);outline:none}
textarea{min-height:90px}

.empty{padding:1.6rem;border-radius:12px;background:linear-gradient(180deg,rgba(14,165,164,0.06),rgba(3,105,161,0.03));display:flex;gap:1rem;align-items:center}

/* ====== Footer ====== */
footer{max-width:1200px;margin:2rem auto;padding:1rem;color:var(--muted);font-size:.9rem}
.footer {
  background: #0a3d62;
  color: #fff;
  text-align: center;
  padding: 1rem 1rem;
  margin-top: 2rem;
  max-width: 100%;
}
.footer h3 {margin-bottom: 0.5rem;font-size: 1.3rem;}
.footer p {margin: 0.2rem 0;}
.footer-links {margin: 1rem 0;display: flex;flex-direction: column;gap: 0.5rem;}
.footer-link {color: #f1f1f1;text-decoration: none;font-weight: bold;transition: color 0.3s ease;}
.footer-link:hover {color: #1dd1a1;}
.credit {margin-top: 1rem;font-size: 0.9rem;opacity: 0.8;}
.footer-link i {margin-right: 6px;color: #25D366;}
.credit a {color: white;text-decoration: none;}
.credit a:hover {text-decoration: underline;}

/* ====== Popup Gallery ====== */
.popup-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);z-index:1000;justify-content:center;align-items:center}
.popup img{max-width:70%;max-height:70%;border-radius:10px;box-shadow:0px 5px 20px rgba(0,0,0,0.5);animation:zoomIn 0.5s}
.close-btn{position:absolute;top:20px;right:30px;font-size:2rem;color:white;cursor:pointer;padding-left:10%}
@keyframes zoomIn{from{transform:scale(0.8);opacity:0;}to{transform:scale(1);opacity:1;}}
.image-gallery{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.image-gallery .thumb{width:150px;height:110px;object-fit:cover;border-radius:8px;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,0.08);transition:transform .18s ease}
.image-gallery .thumb:hover{transform:scale(1.03)}
.img-popup{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,0.8);z-index:2000;padding:20px}
.img-popup[aria-hidden="false"]{display:flex}
.img-wrapper{max-width:1100px;width:100%;max-height:88vh;display:flex;flex-direction:column;align-items:center;gap:10px}
.img-wrapper img{max-width:100%;max-height:78vh;border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,0.4)}
.img-caption{color:#f3f4f6;margin:0;text-align:center;font-size:0.95rem;opacity:0.9}
.img-close,.img-next,.img-prev{position:absolute;background:rgba(0,0,0,0.3);border:0;color:white;font-size:28px;cursor:pointer;padding:8px;line-height:1;border-radius:50%;transition:background 0.2s ease}
.img-close:hover,.img-next:hover,.img-prev:hover{background:rgba(0,0,0,0.5)}
.img-close{top:18px;right:22px;font-size:32px}
.img-prev{left:16px;top:50%;transform:translateY(-50%)}
.img-next{right:16px;top:50%;transform:translateY(-50%)}

/* --- Mobile breakpoints --- */
@media (max-width:768px){
  .image-gallery .thumb{width:45%;height:auto}
  .img-wrapper img{max-height:65vh}
  .img-prev,.img-next{font-size:24px}
}
@media (max-width:480px){
  .image-gallery .thumb{width:100%}
  .img-wrapper img{max-height:60vh}
  .img-prev,.img-next{display:none}
  .img-caption{font-size:0.85rem}
}

.avatar img.avatar-img {
  width: 50px;        /* adjust to your liking */
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tag-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.tag-link:hover {
  text-decoration: underline;
}

.tag {
  display: inline-block;
  background: rgba(13, 110, 253, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 4px 4px 0 0;
  font-size: 0.75rem;
}


/* ==================== AUTH MODAL STYLES ==================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal-content {
  background: #fff;
  padding: 2rem;
  width: 90%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  position: relative;
}

.auth-modal-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.auth-modal-content input {
  width: 100%;
  padding: 0.7rem 1rem;
  margin-bottom: 0.8rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}

.auth-modal-content button {
  width: 100%;
  padding: 0.8rem;
  background-color: #4CAF50;
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-modal-content button:hover {
  background-color: #45a049;
}

.close-modal {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #000;
}

/* Add this in your CSS */
.edit-btn {
  background-color: red;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 4px;
}

.edit-btn:hover {
  opacity: 0.85;
}






/* ====== Final overflow fix ====== */
html, body {max-width:100%;overflow-x:hidden;}
