/* Mobile / small-screen fixes found in QA (Nov 2026). Loaded after style.css and header.css. */

/* ---------- Tool controls (homepage + colour screens) ---------- */
@media (max-width: 991px) {
  .sidebar-content { margin-top: 18px; }
  .sidebar-content > .row:first-child > div,
  .sidebar-content > .row:first-child > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .sidebar-content #background_title { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }
  .sidebar-content select.form-control { height: 46px !important; margin: 0 !important; border-radius: 10px; font-size: 15px; }
  .sidebar-content > .row:nth-child(2) { margin-top: 4px; row-gap: 12px; }
  .sidebar-content > .row:nth-child(2) > [class*="col-3"] { flex: 0 0 50%; max-width: 50%; }
  .sidebar-content > .row:nth-child(2) > [class*="col-6"] { flex: 0 0 100%; max-width: 100%; }
  .sidebar-content .input-select { display: block !important; position: relative; margin-top: 12px !important; }
  .sidebar-content .input-select input {
    width: 100% !important;
    height: 46px;
    padding: 0 40px 0 14px !important;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    text-align: left;
  }
  .sidebar-content .input-select input::placeholder { font-size: 15px; color: #6c757d; }
  .sidebar-content .input-select input:focus { border-color: #000; }
  .sidebar-content .input-select label {
    position: absolute !important;
    width: auto !important;
    right: 14px !important;
    bottom: auto !important;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 14px !important;
    color: #6c757d !important;
    pointer-events: none;
  }
  .sidebar-content .primary-btn { height: 48px; border-radius: 10px; font-size: 16px; }
}

/* ---------- Tablet (768-991px): stack the colour list above the preview, like phones ---------- */
@media (min-width: 768px) and (max-width: 991px) {
  .main-section > .container > .row > .col-md-3,
  .main-section > .container > .row > .col-md-9 { flex: 0 0 100%; max-width: 100%; }
  .main-section > .container > .row > .order-md-last { order: -1; }
  .main-section .side-boxes { flex-direction: row; height: auto; padding: 0; margin-bottom: 20px; overflow-x: auto; }
  .main-section .side-boxes .side-box { flex: 0 0 auto; width: auto; }
  .main-section .side-box-img { width: 100px; }
}

/* ---------- Fake update previews: keep the fullscreen button off the text ---------- */
@media (max-width: 767px) {
  .main-screen-wrapper .main-screen .img-screen a > img {
    top: 12px;
    right: 12px;
    bottom: auto;
    width: 30px;
    margin: 0 !important;
  }
}

/* ---------- Fake update hub cards (Spanish /es/actualizacion-falsa) ---------- */
@media (max-width: 575px) {
  .os-grid { gap: 12px; margin-bottom: 28px; }
  .os-card-content { padding: 12px 12px 14px !important; }
  .os-card-title { font-size: 15px !important; line-height: 1.3 !important; margin-bottom: 6px !important; hyphens: auto; }
  .os-card-description { font-size: 13px !important; line-height: 1.45 !important; }
}

/* ---------- Footer: two link columns side by side on phones ---------- */
@media (max-width: 767px) {
  .footer-content { grid-template-columns: 1fr 1fr !important; gap: 1.75rem 1.25rem !important; }
  .footer-content .footer-about { grid-column: 1 / -1; }
}

/* ---------- Blog sidebar author card (no photo yet) ---------- */
.author-img-wrapper .author-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 26px;
}

/* ---------- Very small phones (320-360px) ---------- */
@media (max-width: 380px) {
  .footer-logo { padding: 8px; gap: .35rem; max-width: 100%; }
  .footer-logo .logo-box { padding: .4rem .6rem; font-size: 1rem; }
  .windows-11-bottom-text, .win11-text3 { max-width: 100%; padding: 0 8px; box-sizing: border-box; font-size: 13px; }
  .win11-main-custom span { overflow-wrap: anywhere; }
  .container-single-post { grid-template-columns: minmax(0, 1fr) !important; }
  .container-single-post > .main-content, .container-single-post > .sidebar { min-width: 0; max-width: 100%; }
  .main-content, .sidebar-card { overflow-wrap: anywhere; }
}

/* ---------- Fake update pages, single-column layout (<=1200px):
   preview -> Simulation Settings -> Choose Your OS ---------- */
@media (max-width: 1200px) {
  .container-single-post:has(> .right-side-bar .settings-card) { row-gap: 0; }
  .container-single-post:has(> .right-side-bar .settings-card) > .left-side-content { display: contents; }
  .container-single-post:has(> .right-side-bar .settings-card) > .left-side-content > * { order: 1; }
  .container-single-post:has(> .right-side-bar .settings-card) > .right-side-bar { order: 2; margin-bottom: 32px; }
  .container-single-post:has(> .right-side-bar .settings-card) > .left-side-content > .os-selection-section { order: 3; }
  .container-single-post:has(> .right-side-bar .settings-card) > .left-side-content > .main-screen-wrapper { margin-bottom: 28px; }
}
