/* ======================== */
/* Základní stylování */
/* ======================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin-top: 150px; /* pro horní fixní menu */
}

#show-fees {
    display: block !important;
    color: blue !important;
    font-weight: bold;
}

/* ======================== */
/* Hlavní kontejner stránky */
/* ======================== */
.container {
    width: 100%;
    max-width: 1248px; /* Maximální šířka stránky */
    min-height: 100vh; /* Dynamická výška podle obsahu */
    margin: 0 auto; /* Zarovnání na střed */
    padding: 32px 24px 80px 24px; /* Vnitřní odsazení + rezerva dole */
    background-color: #ffffff; /* Bílé pozadí */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Jemný stín */
    border-radius: 8px; /* Zaoblení rohů */
    display: flex; /* Flexbox pro zarovnání obsahu uvnitř */
    flex-direction: column; /* Obsah uspořádán vertikálně */
    overflow: visible; /* dovolí, aby se video/mapa/obrázky zobrazily celé */
}

header {
    text-align: center;
    margin-bottom: 16px;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

/* ======================== */
/* Galerie obrázků          */
/* ======================== */
.gallery {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 32px;
}

.main-image img {
    width: 100%;
    height: 445px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.main-image img:hover {
    transform: scale(1.05);
}

.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-content: start;
}

.thumbnail-box img {
    width: 289px;
    height: 218.5px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.thumbnail-box img:hover {
    transform: scale(1.05);
}

/* ======================== */
/* Pravý panel - Detaily    */
/* ======================== */
.details-right {
    position: absolute;
    right: 20px;
    top: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: -8px;
}

.photo-count {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
    margin-top: 30px;
    text-align: center;
}

/* ======================== */
/* Tlačítka                 */
/* ======================== */
.details-below-thumbnails {
    text-align: center;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 16px;
}

.button-box {
    display: flex;
    justify-content: flex-end;
}

.btn-tour,
.btn-contact {
    display: block;
    width: 277px;
    padding: 10px;
    font-size: 1rem;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
}

.btn-tour {
    background-color: #0044cc;
    color: white;
}

.btn-contact {
    background-color: white;
    color: #0044cc;
    border: 1px solid #0044cc;
}

/* ======================== */
/* Odkazy na sociální sítě  */
/* ======================== */
.share-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.share-social span {
    font-weight: 600;
    margin-right: 6px;
    font-size: 15px;
}

.share-social a {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.share-social a:hover {
    background-color: #0057ff;
    color: #fff;
    border-color: #0057ff;
}

/* ======================== */
/* Hypoteční kalkulačka     */
/* ======================== */
.mortgage-calculator {
    display: flex;
    align-items: center;
    background-color: #e8f4ff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 786px;
    height: 172px;
    padding: 16px;
}

.icon img {
    width: 64px;
    height: 64px;
}

.content {
    margin-left: 16px;
}

.content h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.content p {
    font-size: 0.9em;
    color: #555;
    margin: 8px 0;
}

.content button {
    padding: 10px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.content button:hover {
    background-color: #0056b3;
}

/* ======================== */
/* Prohlídka s agentem */
/* ======================== */
.agent-tour-block {
    width: 787px;
    height: 300px;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.leaflet-control-attribution {
    display: none !important;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}

.agent-tour-block img.agent-image {
    width: 200px;
    height: 100px;
    object-fit: cover;
    display: block;
    margin-bottom: 16px;
}

.header-row h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    flex-grow: 1;
}

.contact-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1em;
    cursor: pointer;
    display: inline-block;
    margin-left: auto;
}

.contact-button:hover {
    background-color: #0056b3;
}

.tour-info {
    margin-top: 16px;
    font-size: 1em;
    color: #555;
    line-height: 1.5;
}

/* ======================== */
/* Výpis vlastností */
/* ======================== */
.blue-line {
    width: 1112px;
    height: 4px;
    background-color: #007bff;
    margin: 0 auto;
}

.property-facts-box {
    width: 100%;
    max-width: 786px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.property-facts-box h3 {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
}

/* Stylování tlačítek */
.button-box button {
    width: 277px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.btn-tour {
    height: 60px;
    background-color: #0044cc;
    color: #fff;
}

.btn-contact {
    height: 40px;
    background-color: #fff;
    color: #0044cc;
    border: 1px solid #0044cc;
}

.button-box button:hover {
    transform: scale(1.05);
}

/* ======================== */
/* Informace o nemovitosti  */
/* ======================== */
.property-info {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.property-info .info-item {
    flex: 1;
}

/* ======================== */
/* Podrobnosti nemovitosti  */
/* ======================== */
.property-details {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ======================== */
/* Modalní okno             */
/* ======================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    transform: scale(1.6);
    transition: transform 0.2s ease-in-out;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* ======================== */
/* 📱 Responsivní úpravy */
/* ======================== */
@media (max-width: 992px) {
    .container {
        max-width: 95%;
        padding: 24px 16px 60px 16px;
    }

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

    .thumbnail-box img {
        width: 100%;
        height: auto;
    }

    .details-right {
        position: static;
        margin-top: 20px;
        align-items: center;
    }

    .agent-tour-block,
    .mortgage-calculator,
    .property-facts-box,
    .map-wrapper,
    .video-wrapper {
        width: 100% !important;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 16px 12px 50px 12px;
        border-radius: 0;
        box-shadow: none;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .main-image img {
        height: auto;
        border-radius: 6px;
    }

    .thumbnail-box img {
        width: 100%;
        height: auto;
    }

    .agent-tour-block,
    .mortgage-calculator,
    .property-facts-box,
    .map-wrapper,
    .video-wrapper {
        width: 100% !important;
        max-width: 100%;
    }

    .btn-tour, .btn-contact {
        width: 100%;
    }
}
/* ========================================================= */
/* 🩵 Oprava mobilního zobrazení – GlovatoReal, listopad 2025 */
/* ========================================================= */
/* ========================================================= */
/* 🩵 Korekce vyjetého layoutu na mobilu – GlovatoReal, 2025 */
/* ========================================================= */

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important; /* zabrání horizontálnímu posuvu */
  }

  /* Všechny hlavní bloky přizpůsob na 100 % */
  .container,
  .gallery,
  .main-image,
  .image-thumbnails,
  .map-wrapper,
  .video-wrapper,
  .property-facts-box,
  .agent-tour-block,
  .mortgage-calculator {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 10px !important;
    box-sizing: border-box;
  }

  /* Resetuje margin-left a pevné šířky z inline stylů */
  div[style*="margin-left"],
  div[style*="width:991px"],
  div[style*="width:816px"],
  div[style*="width:787px"] {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Galerie obrázků pod sebe */
  .gallery {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .main-image img,
  .thumbnail-box img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  /* Texty a nadpisy zarovnat vlevo, zamezit přetahování */
  h1, h2, h3, p {
    text-align: left !important;
    word-break: break-word;
  }

  /* Tlačítka pod sebe */
  .btn-tour,
  .btn-contact {
    width: 100% !important;
    display: block !important;
  }

  /* Bez vnitřního posuvu */
  .property-main-box {
    overflow: visible !important;
  }
}
/* ========================================================= */
/* 🩵 Responzivní fix pro property_details.php – GlovatoReal */
/* listopad 2025 – opravuje vyjeté bloky na mobilech         */
/* ========================================================= */

@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden !important; /* vypne horizontální posun */
  }

  /* Reset všech fixních boxů s inline width/margin */
  div[style*="width:"],
  div[style*="margin-left"],
  div[style*="left:"],
  div[style*="position: absolute"],
  #floating-box,
  #price-history-box {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 16px auto !important;
    left: auto !important;
    top: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Galerie */
  .gallery {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
  }

  .main-image img,
  .image-thumbnails img {
    width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
  }

  /* Sekce detailů */
  div[style*="max-width: 991px"] {
    max-width: 100% !important;
    width: 100% !important;
    margin: 10px auto !important;
    padding: 12px !important;
  }

  /* Texty */
  h1, h2, h3, p {
    text-align: left !important;
    word-wrap: break-word !important;
  }

  /* Video a mapa */
  .map-wrapper,
  #map-container,
  .video-wrapper,
  .video-container iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* Tlačítka */
  .btn-tour,
  .btn-contact {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
  }

  /* Modální okna – na celou obrazovku */
  .modal-content,
  .media-modal-content {
    width: 90% !important;
    max-width: 100% !important;
    margin: 10% auto !important;
  }
}

@media (max-width: 600px) {
  body {
    margin-top: 80px !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* Tlačítka a boxy */
  .btn-tour, .btn-contact {
    width: 100% !important;
    display: block !important;
  }

  div[style*="width:"],
  div[style*="max-width: 991px"] {
    padding: 10px !important;
  }
}
