
/* 
   Privacy Page Specific Styles (Standalone)
   Targeting: privacy.php
*/

/* 1. Layout Shells */
.layout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  min-height: 0;
}

/* 2. Main Privacy Card */
main {
  max-width: 920px;
  width: min(920px, 100%);
  max-height: 680px; /* Fixed maximum height for desktop */
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: var(--card-border-radius);
  position: relative;
  color: #111;
  overflow-y: auto;
  flex: 0 1 auto;
  min-height: 0;
  
  /* Stabilize scroll performance & reduce jitter */
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

/* 3. Scrollbar Handling: Hidden by default for Mobile/Tablet to keep clean UI */
@media screen and (max-width: 1024px) {
  *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
  html, body, main {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
}

/* 3b. Refined Visible Scrollbar for Laptop and Desktop (min-width: 1025px) */
@media screen and (min-width: 1025px) {
  main::-webkit-scrollbar {
    display: block !important;
    width: 10px !important;
  }
  main::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 10px;
  }
  main::-webkit-scrollbar-thumb {
    background-color: rgba(15, 53, 88, 0.15) !important;
    border-radius: 10px;
  }
  main::-webkit-scrollbar-thumb:hover {
    background-color: rgba(15, 53, 88, 1) !important;
  }
  main {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(15, 53, 88, 0.15) transparent !important;
  }
}

/* 3. Typography */
h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.meta {
  color: #6B7280;
  margin: 0;
  font-size: 14px;
}

p { line-height: 1.5; margin-bottom: 1rem; font-size: 16px; }
ul { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; font-size: 16px; }

/* 4. Header/Logo Layout (Unique to this page) */
.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.title-block {
  flex: 1 1 auto;
}

.logo-block {
  flex: 0 0 auto;
}

.demo-logo {
  display: block;
  height: 40px;
  width: auto;
  user-select: none;
  margin-top: -8.4px; /* Align bottom with h1 (33.6px height) */
}

/* 5. Return/Close Button */
a.btn {
  display: inline-block;
  color: var(--ink-orange);
  text-decoration: underline;
  cursor: pointer;
  font-size: 16px;
  margin-top: 1.5rem;
}

/* Link color for privacy page text */
main a:not(.btn) {
  color: #0000EE !important;
}

/* ==========================================================================
   SPECIFIC TABLET & IPAD QUERIES (REFINED)
   ========================================================================== */

/* 1. TABLET PORTRAIT (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  main {
    width: 90%;
    max-height: 750px;
    padding: 1.5rem;
  }
  h1 {
    font-size: 26px !important;
  }
  p, li, .meta {
    font-size: 14px !important;
  }
  a.btn {
    font-size: 16px !important;
  }
  .demo-logo {
    height: 35px;
    margin-top: -9px;
  }
}

/* 2. TABLET LANDSCAPE (768px - 1199px) */
@media screen and (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
  main {
    display: flex !important;
    flex-direction: column !important;
    width: 66%;
    max-height: 550px;
    padding: 1.9rem;
  }
  .header-row {
    order: -10 !important;
  }
  h1 {
    font-size: 24px !important;
  }
  p, li, .meta {
    font-size: 13px !important;
  }
  a.btn {
    font-size: 16px !important;
  }
  .demo-logo {
    height: 32px;
    margin-top: -5.2px;
  }
}

/* 3. LARGE TABLET PORTRAIT (1024px - 1194px) */
@media screen and (min-width: 1024px) and (max-width: 1194px) and (orientation: portrait) {
  main {
    width: 66%;
    max-height: 550px;
    padding: 1.8rem;
  }
  h1 {
    font-size: 24px !important;
  }
  p, li, .meta {
    font-size: 13px !important;
  }
  .demo-logo {
    height: 45px;
    margin-top: -8.2px;
  }
}

/* 4. LARGE TABLET LANDSCAPE (1200px - 1366px) */
@media screen and (min-width: 1200px) and (max-width: 1366px) and (orientation: landscape) {
  main {
    display: flex !important;
    flex-direction: column !important;
    width: 60%;
    max-height: 500px;
    padding: 1.9rem;
  }
  .header-row {
    order: -10 !important;
  }
  h1 {
    font-size: 24px !important;
  }
  p { font-size: 13px; }
  .demo-logo {
    height: 40px;
    margin-top: -12.2px;
  }
}

/* MOBILE LANDSCAPE (Strictly < 933px) */
@media screen and (max-width: 932px) and (orientation: landscape) {
  .layout {
    padding: 0.5rem;
    justify-content: center;
    min-height: auto;
  }
  main {
    width: 95%;
    height: 220px !important;
    overflow-y: auto !important;
    padding: 1.25rem;
    border-radius: 24px;
    margin-bottom: 0.15rem;
  }
  h1 {
    font-size: 22px !important;
  }
  p, li, .meta {
    font-size: 11px !important;
  }
  .subtitle {
    font-size: 12px !important;
  }
  h2, h3 {
    font-size: 15px !important;
  }
  a.btn {
    font-size: 13px !important;
  }
  .header-row {
    margin-bottom: 0.75rem;
    gap: 1rem;
  }
  .demo-logo {
    height: 30px;
    margin-top: -10.6px;
  }
}

/* MOBILE PORTRAIT (Strictly < 768px) */
@media screen and (max-width: 767px) and (orientation: portrait) {
  .layout {
    padding: 0;
    justify-content: center;
  }
  main {
    width: 92%;
    max-height: 600px;
    padding: 1.5rem;
    border-radius: 24px;
    margin-bottom: 0.25rem;
  }
  h1 {
    font-size: 20px !important;
  }
  p, li, .meta {
    font-size: 11px !important;
  }
  .subtitle {
    font-size: 12px !important;
  }
  h2, h3 {
    font-size: 15px !important;
  }
  a.btn {
    font-size: 13px !important;
  }
  .header-row {
    margin-bottom: 1rem;
  }
  .demo-logo {
    height: 30px;
    margin-top: -9px;
  }
}

/* Specific adjustment for small devices (e.g., iPhone SE/375px) */
@media screen and (max-width: 375px) and (orientation: portrait) {
  main {
    max-height: 550px;
  }
}

@supports (-webkit-touch-callout: none) {
  /* Safari specific refinements to stop rubber-band/bouncy effect */
  html, body {
    overscroll-behavior: none;
  }
}
