/* CitizenshipTestPro - Glassmorphic Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
  nav {
    width: 95%;
  }

  .hero .container {
    padding: var(--space-lg);
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-menu {
    gap: var(--space-xs);
  }

  .main-menu a {
    padding: 8px 14px;
    font-size: 13px;
  }

  .hero {
    padding: 120px 20px 40px;
  }

  .container {
    max-width: 95%;
  }

  main.container {
    padding-top: 100px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  nav {
    top: 10px;
    width: 95%;
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
  }

  .navbar-container {
    flex-wrap: wrap;
  }

  .main-menu {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: rgba(10, 74, 110, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    flex-direction: column;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-xl), var(--glow-lg);
    display: flex;
  }

  .main-menu.active {
    opacity: 1;
    visibility: visible;
  }

  .main-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-menu li:last-child {
    border-bottom: none;
  }

  .main-menu a {
    display: block;
    width: 100%;
    padding: 14px 20px;
  }

  .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background: var(--glow-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
    box-shadow: 0 0 5px var(--glow-primary);
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    border: none;
    margin-top: 0;
    padding: 0 var(--space-sm);
    border-radius: 0;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu li {
    padding: 0;
  }

  .dropdown-menu a {
    padding: 10px 16px;
    font-size: 13px;
  }

  .search-toggle {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 100px 20px 40px;
  }

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

  .hero h1 {
    font-size: 28px;
  }

  .hero .hero-subtitle,
  .hero p {
    font-size: 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    min-height: 44px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
    padding: var(--space-md);
  }

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

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

  .stat-number {
    font-size: 1.75rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  table {
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
  }

  thead {
    display: none;
  }

  tr {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
  }

  td {
    display: block;
    border: none;
    padding: 0.75rem 0.5rem;
    text-align: right;
    position: relative;
    padding-left: 50%;
  }

  td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-right: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--glow-primary);
  }

  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .social-share {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .faq-item {
    padding: 1rem 0;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 1rem;
    right: 1rem;
    font-size: 20px;
  }

  .blog-post {
    margin-top: 100px;
  }

  .post-header,
  .post-content {
    padding: var(--space-md);
  }

  main.container {
    padding-top: 90px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero .hero-subtitle,
  .hero p {
    font-size: 15px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .card {
    padding: var(--space-sm);
  }

  .stat {
    padding: var(--space-sm);
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* Large Screens: 1024px+ */
@media (min-width: 1024px) {
  .hamburger {
    display: none !important;
  }

  .main-menu {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
  }

  .dropdown-menu {
    min-width: 200px;
  }
}

/* Extra Large: 1280px+ */
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero h1 {
    font-size: clamp(32px, 5vw, 64px);
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  .social-share a {
    width: 50px;
    height: 50px;
  }

  .card:hover {
    transform: none;
  }

  .glass-panel:hover {
    transform: none;
  }
}

/* Print Stylesheet */
@media print {
  nav,
  footer,
  .back-to-top,
  .social-share,
  .newsletter-form,
  .search-toggle,
  .reading-progress {
    display: none !important;
  }

  body {
    color: #000;
    background: white;
  }

  body::before {
    display: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #000;
    page-break-after: avoid;
    page-break-inside: avoid;
    text-shadow: none;
    -webkit-text-fill-color: #000;
  }

  p, li {
    color: #333;
  }

  p, ul, ol {
    page-break-inside: avoid;
  }

  table {
    border-collapse: collapse;
  }

  th, td {
    border: 1px solid #000;
    color: #000;
  }

  .card,
  .glass-panel,
  .stat {
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
    box-shadow: none;
  }
}

/* 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;
  }
}
