/*
 Theme Name: Astra Child - Listing Styles
 Template: astra
*/

/* ---------- Global ---------- */
body.single-listing {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: #333;
  background: #fff;
  line-height: 1.6;
  margin: 0;
}

/* ---------- FULL WRAPPER ---------- */
.listing-full-wrapper {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- HERO (featured image) ---------- */
.listing-hero {
  width: 100%;
  height: 380px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 36px 48px;
  position: relative;
}

.listing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.listing-hero h1 {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(20px, 4vw, 30px);
  max-width: 600px;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 3px 18px rgba(0,0,0,0.45);
}

/* ---------- MAIN CONTENT ---------- */
.container-listing {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.container-listing.single-column .listing-content {
  width: 100%;
}

/* TITLES & TEXT */
.listing-section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 12px;
}

.listing-content p {
  margin: 12px 0;
  font-size: 16px;
  color: #444;
}

.listing-content p strong {
  color: #222;
  font-weight: 600;
  min-width: 220px;
  display: inline-block;
}

/* ---------- TABS ---------- */
.listing-tabs {
  margin-top: 28px;
}

.tabs-header {
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.tab-btn {
  background: rgb(224, 224, 224);
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 16px;
  color: #292929;
  font-weight: 500;
  position: relative;
}

.tab-btn:hover {
  color: #111;
  background: rgb(197, 197, 197) ;
}

.tab-btn.active {
  color: #111;
  font-weight: 700;
  background: #fff;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 4px;
  background: transparent;
  border-radius: 3px;
}

/* Panels */
.tab-panel {
  display: none;
  opacity: 0;
  transition: opacity .22s ease;
}

.tab-panel.active {
  display: block;
  opacity: 1;
}

.tab-panel h2 {
  font-size: 23px;
  padding: 5px 0 20px 0;
}

.description-text {
  padding: 5px 12px 5px 12px;
}

/* ---------- Form ---------- */

.form-title {
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 23px;
  padding: 10px 0 30px 0;
  text-align: center;
}

.form-wrapper {
    display: flex;
    align-items: stretch;
    gap: 40px;
    align-items: flex-start;
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
}

/* Estilo del formulario */
.form-wrapper form {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-wrapper form,
.info-box {
    display: flex;
    flex-direction: column;
}

.form-wrapper form label {
    font-weight: 600;
    margin-bottom: 6px;
}

.form-wrapper form input,
.form-wrapper form textarea {
    width: 100%;
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Bloque del Agente */
.info-box {
    flex: 0 0 350px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.info-box img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

.info-box h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 500;
}

.formbtn {
    background: #D3AF35;
    text-shadow: 0px 0px 2px #000000;
    box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.4);
}

/* Botones uno al lado del otro */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-group .btn {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.btn-group .btn.main {
    background: #D3AF35;
    text-shadow: 0px 0px 2px #000000;
    box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.4);
}

.btn-group .btn.secondary {
    background: #D3AF35;
    text-shadow: 0px 0px 2px #000000;
    box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.4);
}

/* 📱 Móvil */
@media (max-width: 768px) {
    .form-wrapper {
        flex-direction: column;
        padding: 20px;
    }

    .info-box {
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }
}



/* ---------- DETAILS GRID ---------- */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {

  .listing-hero {
    height: 240px;
    padding: 20px;
  }

  .listing-hero h1 {
    font-size: 26px;
  }

  .container-listing {
    padding: 0 16px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    font-size: 15px;
    padding: 10px 12px;
  }
}

/* REMOVE ASTRA DEFAULT PADDING */
.ast-container,
.site-content > .ast-container {
  padding: 0 !important;
  max-width: 100% !important;
}


/* Fondo oscuro */
.modal-error {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Caja del mensaje */
.modal-error .modal-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    animation: popIn 0.2s ease-out;
}

/* Animación */
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Cerrar */
.close-modal {
    float: right;
    cursor: pointer;
    font-size: 22px;
}
.modal-content h3 {
    margin-top: 0;
    font-size: 20px;
}
.modal-content ul {
    margin: 15px 0 0;
    padding-left: 20px;
    color: #d00;
}
.modal-content li {
    margin-bottom: 8px;
}


.listing-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.listing-navigation .nav-button {
    background: #1e293b;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.listing-navigation .nav-button:hover {
    background: #0f172a;
}
