/* Mobile Responsive CSS for Policies Page */

/* Tablets & Medium Screens (769px - 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 16px;
  }
  
  .policy-wrapper {
    grid-template-columns: 260px 1fr;
    gap: 24px;
  }
  
  .hero h2 {
    font-size: 26px;
  }
  
  .hero p {
    font-size: 14px;
  }
}

/* Large Tablets (768px - 880px) */
@media (max-width: 880px) {
  :root {
    --header-height: 72px;
  }
  
  .nav {
    padding: 8px 16px;
  }
  
  .brand h1 {
    font-size: 16px;
  }
  
  .brand p,
  .site-note {
    font-size: 11px;
  }
  
  .site-note {
    max-width: 160px;
    line-height: 1.3;
  }
  
  .container {
    margin: 20px auto;
    padding: 0 14px;
  }
  
  .hero {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
    text-align: left;
  }
  
  .hero > div:last-child {
    margin-left: 0 !important;
    text-align: left;
    width: 100%;
  }
  
  .hero h2 {
    font-size: 24px;
  }
  
  .meta {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  
  .actions {
    flex-wrap: wrap;
    margin-top: 12px;
  }
  
  .policy-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
  }
  
  .side {
    position: relative;
    top: 0 !important;
    height: auto;
    max-height: none;
    padding: 14px;
    border-radius: 8px;
  }
  
  .side nav ul {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .side nav ul::-webkit-scrollbar {
    height: 4px;
  }
  
  .side nav ul::-webkit-scrollbar-thumb {
    background: var(--dark-gold);
    border-radius: 2px;
  }
  
  .side a {
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 14px;
  }
  
  article {
    padding: 20px;
  }
  
  article h3 {
    font-size: 20px;
  }
  
  article h4 {
    font-size: 15px;
    margin-top: 16px;
  }
  
  article p,
  article li {
    font-size: 14px;
  }
  
  .cookie-table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 8px;
  }
  
  .modal {
    width: 340px;
  }
}

/* Standard Phones (481px - 767px) */
@media (max-width: 767px) {
  :root {
    --header-height: 68px;
  }
  
  body {
    font-size: 15px;
  }
  
  .brand > div:first-child {
    width: 48px !important;
    height: 48px !important;
  }
  
  .brand h1 {
    font-size: 15px;
  }
  
  .brand p {
    font-size: 10px;
  }
  
  .site-note {
    font-size: 10px;
    max-width: 130px;
  }
  
  .container {
    padding: 0 12px;
    margin: 16px auto;
  }
  
  .hero {
    padding: 16px 14px;
  }
  
  .hero h2 {
    font-size: 22px;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 13px;
  }
  
  .meta .tag {
    font-size: 12px;
    padding: 5px 8px;
  }
  
  .meta > div:last-child {
    font-size: 12px;
  }
  
  .btn {
    padding: 9px 12px;
    font-size: 13px;
  }
  
  .side {
    padding: 12px;
  }
  
  .side a {
    font-size: 12px;
    padding: 9px 12px;
  }
  
  article {
    padding: 18px;
    border-radius: 8px;
  }
  
  article h3 {
    font-size: 19px;
  }
  
  article h4 {
    font-size: 14px;
    margin-top: 14px;
    margin-bottom: 6px;
  }
  
  article p,
  article li {
    font-size: 13px;
  }
  
  article ul {
    margin-left: 16px;
  }
  
  .cookie-table {
    font-size: 12px;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 6px;
  }
  
  .modal {
    width: 320px;
    right: 12px;
    bottom: 12px;
  }
  
  .modal .body {
    padding: 12px;
  }
  
  .toggle {
    padding: 8px 0;
  }
  
  .toggle > div:first-child > div:first-child {
    font-size: 14px;
  }
  
  .toggle > div:first-child > div:last-child {
    font-size: 12px;
  }
  
  footer {
    padding: 16px 12px;
    font-size: 12px;
    margin-top: 20px;
  }
}

/* Small Phones (376px - 480px) */
@media (max-width: 480px) {
  :root {
    --header-height: 64px;
  }
  
  body {
    font-size: 14px;
  }
  
  .nav {
    padding: 6px 12px;
    gap: 10px;
  }
  
  .brand > div:first-child {
    width: 44px !important;
    height: 44px !important;
    font-size: 14px !important;
  }
  
  .brand h1 {
    font-size: 14px;
    letter-spacing: 0.4px;
  }
  
  .brand p {
    font-size: 9px;
  }
  
  .site-note {
    display: none;
  }
  
  .container {
    padding: 0 10px;
    margin: 14px auto;
  }
  
  .hero {
    padding: 14px 12px;
    border-radius: 8px;
  }
  
  .hero h2 {
    font-size: 20px;
  }
  
  .hero p {
    font-size: 12px;
  }
  
  .meta {
    gap: 8px;
  }
  
  .meta .tag {
    font-size: 11px;
    padding: 4px 7px;
  }
  
  .meta > div:last-child {
    font-size: 11px;
  }
  
  .actions {
    gap: 8px;
    margin-top: 10px;
  }
  
  .btn {
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }
  
  .btn i {
    font-size: 12px;
  }
  
  .policy-wrapper {
    gap: 14px;
    margin-top: 16px;
  }
  
  .side {
    padding: 10px;
  }
  
  .side nav ul {
    gap: 6px;
  }
  
  .side a {
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 6px;
  }
  
  article {
    padding: 16px;
  }
  
  article h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  article h4 {
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 5px;
  }
  
  article p,
  article li {
    font-size: 12px;
    line-height: 1.6;
  }
  
  article ul {
    margin-left: 14px;
  }
  
  article p + h4 {
    margin-top: 14px;
  }
  
  .cookie-table {
    font-size: 11px;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 5px;
  }
  
  .modal {
    width: 300px;
    max-width: calc(100% - 20px);
    right: 10px;
    bottom: 10px;
  }
  
  .modal header {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .modal .body {
    padding: 10px;
  }
  
  .modal .body > p {
    font-size: 12px;
  }
  
  .toggle {
    padding: 7px 0;
  }
  
  .toggle > div:first-child > div:first-child {
    font-size: 13px;
  }
  
  .toggle > div:first-child > div:last-child {
    font-size: 11px;
  }
  
  .switch {
    width: 42px;
    height: 24px;
  }
  
  .knob {
    width: 18px;
    height: 18px;
  }
  
  .on .knob {
    left: 21px;
  }
  
  .modal .body > div:last-child {
    flex-direction: column;
    gap: 8px;
  }
  
  .modal .body > div:last-child button {
    width: 100%;
    justify-content: center;
    padding: 9px 14px;
    font-size: 12px;
  }
  
  footer {
    padding: 14px 10px;
    font-size: 11px;
    line-height: 1.7;
  }
  
  footer a {
    display: inline-block;
  }
}

/* Extra Small Phones (321px - 375px) */
@media (max-width: 375px) {
  :root {
    --header-height: 60px;
  }
  
  body {
    font-size: 13px;
  }
  
  .nav {
    padding: 5px 10px;
  }
  
  .brand > div:first-child {
    width: 40px !important;
    height: 40px !important;
    font-size: 13px !important;
  }
  
  .brand h1 {
    font-size: 13px;
  }
  
  .brand p {
    font-size: 8px;
  }
  
  .container {
    padding: 0 8px;
    margin: 12px auto;
  }
  
  .hero {
    padding: 12px 10px;
  }
  
  .hero h2 {
    font-size: 18px;
  }
  
  .hero p {
    font-size: 11px;
  }
  
  .meta .tag {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .meta > div:last-child {
    font-size: 10px;
  }
  
  .btn {
    padding: 7px 9px;
    font-size: 11px;
  }
  
  .side {
    padding: 8px;
  }
  
  .side a {
    font-size: 10px;
    padding: 7px 9px;
  }
  
  article {
    padding: 14px;
  }
  
  article h3 {
    font-size: 17px;
  }
  
  article h4 {
    font-size: 12px;
    margin-top: 10px;
  }
  
  article p,
  article li {
    font-size: 11px;
  }
  
  article ul {
    margin-left: 12px;
  }
  
  .cookie-table {
    font-size: 10px;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 4px;
  }
  
  .modal {
    width: 280px;
  }
  
  .modal header {
    font-size: 13px;
  }
  
  .modal .body > p {
    font-size: 11px;
  }
  
  .toggle > div:first-child > div:first-child {
    font-size: 12px;
  }
  
  .toggle > div:first-child > div:last-child {
    font-size: 10px;
  }
  
  footer {
    padding: 12px 8px;
    font-size: 10px;
  }
}

/* Very Small Phones (≤320px) */
@media (max-width: 320px) {
  :root {
    --header-height: 56px;
  }
  
  body {
    font-size: 12px;
  }
  
  .brand > div:first-child {
    width: 36px !important;
    height: 36px !important;
    font-size: 12px !important;
  }
  
  .brand h1 {
    font-size: 12px;
  }
  
  .brand p {
    display: none;
  }
  
  .container {
    padding: 0 6px;
  }
  
  .hero {
    padding: 10px 8px;
  }
  
  .hero h2 {
    font-size: 16px;
  }
  
  .hero p {
    font-size: 10px;
  }
  
  .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .side {
    padding: 6px;
  }
  
  .side a {
    font-size: 9px;
    padding: 6px 8px;
  }
  
  article {
    padding: 12px;
  }
  
  article h3 {
    font-size: 16px;
  }
  
  article h4 {
    font-size: 11px;
  }
  
  article p,
  article li {
    font-size: 10px;
  }
  
  .cookie-table {
    font-size: 9px;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 3px;
  }
  
  .modal {
    width: 260px;
  }
  
  footer {
    padding: 10px 6px;
    font-size: 9px;
  }
}

/* Landscape Mode Optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 12px 14px;
  }
  
  .hero h2 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .hero p {
    font-size: 11px;
  }
  
  .side {
    position: relative;
    top: 0 !important;
  }
  
  .side nav ul {
    flex-direction: row;
    overflow-x: auto;
  }
  
  article {
    padding: 14px;
  }
  
  .modal {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

/* Print Optimization */
@media print {
  header,
  .side,
  .actions,
  footer,
  .modal,
  .hero > div:last-child {
    display: none !important;
  }
  
  body {
    background: #fff;
  }
  
  .hero {
    background: none;
    padding: 0;
    margin-bottom: 20px;
  }
  
  article {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
  }
  
  article h3 {
    page-break-after: avoid;
  }
  
  article h4 {
    page-break-after: avoid;
  }
  
  article p,
  article li {
    font-size: 11pt;
  }
  
  .cookie-table {
    page-break-inside: avoid;
  }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
  .side a,
  .btn,
  .switch {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .side nav ul {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  .modal {
    touch-action: pan-y;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .brand > div:first-child,
  article {
    border-width: 0.5px;
  }
}