/* ============================================
   RESPONSIVE BREAKPOINTS - Light Professional Theme
   Mobile First Approach

   Breakpoints:
   - xs: 0 - 479px (extra small)
   - sm: 480px - 639px (small)
   - md: 640px - 767px (medium)
   - lg: 768px - 1023px (large)
   - xl: 1024px - 1279px (extra large)
   - 2xl: 1280px+ (2x extra large)
   ============================================ */

/* Extra Small Devices (phones, up to 479px) */
@media (max-width: 479px) {
  :root {
    --container-padding: 1rem;
    --text-4xl: 2rem;
    --text-5xl: 2.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  /* Hero adjustments */
  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero--home {
    padding: var(--space-2xl) 0 var(--space-3xl);
  }

  .hero__title {
    font-size: var(--text-2xl);
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: var(--text-base);
    line-height: 1.6;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Section spacing */
  .section {
    padding: var(--space-2xl) 0;
  }

  .section-lg {
    padding: var(--space-3xl) 0;
  }

  /* Typography */
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }

  /* Cards */
  .card-body {
    padding: var(--space-lg);
  }

  .category-card .card-icon {
    width: 56px;
    height: 56px;
  }

  .category-card .card-icon svg {
    width: 28px;
    height: 28px;
  }

  /* Casino Card */
  .casino-card {
    flex-direction: column;
  }

  .casino-card__logo {
    padding: var(--space-lg);
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .casino-card__content {
    padding: var(--space-lg);
  }

  .casino-card__action {
    padding: var(--space-lg);
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-border);
    flex-direction: column;
  }

  .casino-card__action .btn {
    width: 100%;
  }

  .casino-card__bonus {
    font-size: var(--text-xl);
  }

  /* Footer */
  .footer {
    padding: var(--space-2xl) 0 var(--space-lg);
  }

  .footer__grid {
    text-align: center;
    gap: var(--space-xl);
  }

  .footer__brand {
    max-width: none;
    margin: 0 auto;
  }

  .footer__logo {
    justify-content: center;
  }

  .footer__links {
    align-items: center;
  }

  .footer__badges {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Widgets */
  .widget {
    padding: var(--space-lg);
  }

  .top-casinos {
    padding: var(--space-lg);
  }

  .top-casinos__item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .top-casinos__cta {
    width: 100%;
    text-align: center;
    margin-top: var(--space-sm);
  }

  /* Article content */
  .article-content h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-2xl);
  }

  .article-content h3 {
    font-size: var(--text-lg);
  }

  /* TOC */
  .toc {
    padding: var(--space-lg);
  }

  /* Pros/Cons */
  .pros-cons__list {
    padding: var(--space-lg);
  }

  /* Keywords carousel */
  .kw-section {
    padding: var(--space-xl) 0;
  }

  .kw-section__title {
    font-size: var(--text-xl);
  }

  .kw-pill {
    padding: 0.625rem 1.25rem;
    font-size: var(--text-xs);
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .pagination__item {
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
  }

  /* Breadcrumbs */
  .breadcrumbs {
    padding: var(--space-md) 0;
    font-size: var(--text-xs);
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
  }

  .btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-base);
  }

  /* Forms */
  .form-input,
  .form-textarea,
  .form-select {
    padding: 0.875rem var(--space-md);
  }

  /* Responsible gambling */
  .responsible-gambling {
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
  }

  /* Modal */
  .kw-modal {
    padding: var(--space-sm);
  }

  .kw-modal__container {
    max-height: 95vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .kw-modal__header {
    padding: var(--space-md);
  }

  .kw-modal__title {
    font-size: var(--text-lg);
  }

  .kw-modal__body {
    padding: var(--space-md);
  }

  /* Contact form */
  .contact-form {
    padding: var(--space-lg);
  }

  /* Article list */
  .article-list__item {
    padding: var(--space-md);
  }

  .article-list__item h3 {
    font-size: var(--text-base);
  }
}

/* Small Devices (landscape phones, 480px - 639px) */
@media (min-width: 480px) and (max-width: 639px) {
  .hero__actions {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .article-card {
    flex-direction: row;
  }

  .article-card__image {
    width: 160px;
    flex-shrink: 0;
    aspect-ratio: auto;
  }

  .article-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .casino-card__bonus {
    font-size: var(--text-xl);
  }

  .top-casinos__item {
    flex-wrap: nowrap;
  }

  .top-casinos__cta {
    width: auto;
    margin-top: 0;
  }
}

/* Medium Devices (tablets, 640px - 767px) */
@media (min-width: 640px) and (max-width: 767px) {
  .casino-card {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .casino-card__logo {
    width: 100%;
    padding: var(--space-lg);
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .casino-card__content {
    flex: 1;
    min-width: 200px;
  }

  .casino-card__action {
    width: 100%;
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--color-border);
    gap: var(--space-md);
  }

  .casino-card__action .btn {
    flex: 1;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .kw-section__title {
    font-size: var(--text-2xl);
  }
}

/* Large Devices (small laptops, 768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .header__nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .layout-sidebar {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .sidebar .widget,
  .sidebar .top-casinos {
    flex: 1;
    min-width: 300px;
  }

  .casino-card__action {
    min-width: 180px;
  }

  .hero--home {
    padding: var(--space-3xl) 0 var(--space-4xl);
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .article-content {
    font-size: var(--text-base);
  }
}

/* Desktop and Up (1024px+) */
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }

  .mobile-menu-btn {
    display: none;
  }

  .header__nav {
    display: flex;
  }

  .hero__content {
    max-width: 900px;
  }

  .hero__title {
    font-size: var(--text-5xl);
  }

  .article-content {
    font-size: var(--text-lg);
  }

  .layout-sidebar {
    grid-template-columns: 1fr 340px;
  }
}

/* Large Desktop (1280px+) */
@media (min-width: 1280px) {
  :root {
    --container-max: 1280px;
  }

  .container {
    padding: 0 var(--space-xl);
  }

  .layout-sidebar {
    grid-template-columns: 1fr 380px;
    gap: var(--space-3xl);
  }

  .hero--home {
    padding: var(--space-4xl) 0 calc(var(--space-4xl) + var(--space-3xl));
  }

  .footer__grid {
    gap: var(--space-3xl);
  }
}

/* Extra Large Desktop (1440px+) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1400px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch */
  .btn:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .kw-pill:hover {
    transform: none;
    background: var(--color-primary-bg);
  }

  .top-casinos__cta:hover {
    transform: none;
  }

  .nav-link::after {
    display: none;
  }

  /* Touch-friendly tap targets */
  .nav-link {
    padding: var(--space-md) 0;
  }

  .widget__link {
    padding: var(--space-md);
  }

  .toc__link {
    padding: var(--space-md);
  }

  /* Dropdown behavior for touch */
  .nav-dropdown__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0;
    padding-left: var(--space-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    background: transparent;
    border: none;
  }

  .nav-dropdown.active .nav-dropdown__menu {
    max-height: 500px;
  }
}

/* Print Styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .header,
  .footer,
  .mobile-menu,
  .sidebar,
  .btn-cta,
  .btn-primary,
  .btn-accent,
  .kw-section,
  .top-casinos,
  .hero::before,
  .hero::after,
  .pagination,
  .responsible-gambling {
    display: none !important;
  }

  .hero {
    padding: var(--space-md) 0;
    background: white !important;
  }

  .hero__title {
    color: black !important;
    text-shadow: none !important;
  }

  .main-content {
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .article-content {
    font-size: 12pt;
    line-height: 1.6;
  }

  .article-content h2,
  .article-content h3,
  .article-content h4 {
    color: black !important;
    page-break-after: avoid;
  }

  .article-content p,
  .article-content li {
    orphans: 3;
    widows: 3;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  .card {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  table {
    border-collapse: collapse;
  }

  th, td {
    border: 1px solid #ccc !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .kw-carousel__track {
    animation: none !important;
  }

  .hero::before,
  .hero::after,
  .hero__container::before,
  .hero__container::after {
    animation: none !important;
  }

  .btn:hover,
  .card:hover,
  .kw-pill:hover {
    transform: none !important;
  }
}

/* High Contrast Mode - Light Theme */
@media (prefers-contrast: high) {
  :root {
    --color-border: #333333;
    --color-text-light: #333333;
    --color-text-muted: #444444;
    --shadow: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-card: 0 0 0 2px var(--color-border);
    --shadow-card-hover: 0 0 0 3px var(--color-primary);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .card {
    border: 2px solid var(--color-border);
  }

  .kw-pill {
    border-width: 3px;
  }

  .nav-link::after {
    height: 3px;
  }

  .tag {
    border-width: 2px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    border-width: 2px;
  }
}

/* Focus Visible for Keyboard Navigation */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  :focus-visible {
    transition: outline-offset 0.15s ease;
  }
}

/* Landscape Mode for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--space-lg) 0;
  }

  .hero--home {
    padding: var(--space-lg) 0 var(--space-xl);
  }

  .hero__title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
  }

  .hero__subtitle {
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
  }

  .kw-modal__container {
    max-height: 85vh;
  }

  .mobile-menu {
    top: 60px;
  }
}

/* Dark mode support (for users who prefer dark) */
@media (prefers-color-scheme: dark) {
  /* Keep light theme by default - dark mode would require full CSS rewrite */
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }

  .page-wrapper {
    min-height: -webkit-fill-available;
  }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
  .kw-carousel__track {
    scrollbar-width: none;
  }
}
