/* ================================
   Link Field Theme - Responsive Styles
   Mobile-First Media Queries
   ================================ */

/* ================================
   Tablet Styles (768px - 1023px)
   ================================ */
@media (min-width: 768px) {

  /* Header */
  .header-container {
    padding: 1.25rem var(--container-padding);
  }

  .site-logo {
    font-size: var(--font-size-2xl);
  }

  .site-logo img {
    height: 48px;
  }

  .header-spacer {
    height: 80px;
  }

  /* Hero Section */
  .hero-section {
    min-height: 600px;
    padding: var(--space-3xl) var(--container-padding);
  }

  .hero-section h1 {
    font-size: var(--font-size-4xl);
  }

  .hero-section p {
    font-size: var(--font-size-xl);
  }

  .hero-cta {
    gap: 1.5rem;
  }

  .hero-cta .btn {
    min-width: 200px;
    padding: 1rem 2.5rem;
    font-size: var(--font-size-lg);
  }

  /* Services Grid - 2 columns on tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .service-card {
    padding: var(--space-xl) var(--space-lg);
  }

  .service-icon {
    width: 72px;
    height: 72px;
    font-size: 36px;
  }

  /* Solutions Grid - 2 columns on tablet */
  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .solution-image {
    height: 280px;
  }

  /* Strengths Grid - 2 columns on tablet */
  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .strength-item {
    padding: var(--space-xl) var(--space-lg);
  }

  /* Blog Grid - 2 columns on tablet */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .blog-thumbnail {
    height: 220px;
  }

  /* CTA Section */
  .cta-section h2 {
    font-size: var(--font-size-4xl);
  }

  .cta-section p {
    font-size: var(--font-size-xl);
  }

  .cta-buttons {
    gap: 1.5rem;
  }

  .cta-buttons .btn {
    min-width: 200px;
    padding: 1rem 2.5rem;
    font-size: var(--font-size-lg);
  }

  /* Footer - 2 columns on tablet */
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  /* Content Area */
  .entry-header {
    margin-bottom: var(--space-2xl);
  }

  .entry-title {
    font-size: var(--font-size-4xl);
  }

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

  .entry-content h2 {
    font-size: var(--font-size-3xl);
  }

  .entry-content h3 {
    font-size: var(--font-size-2xl);
  }

  /* Forms */
  .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .form-row .form-group {
    margin-bottom: 0;
  }

  /* Pagination */
  .pagination {
    gap: 0.75rem;
  }

  .pagination a,
  .pagination span {
    min-width: 48px;
    height: 48px;
  }

  /* Scroll to Top */
  .scroll-to-top {
    width: 56px;
    height: 56px;
    font-size: var(--font-size-xl);
  }
}

/* ================================
   Desktop Styles (1024px+)
   ================================ */
@media (min-width: 1024px) {

  /* Header */
  .header-container {
    padding: 1.5rem var(--container-padding);
  }

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

  .main-navigation {
    display: block;
  }

  .header-spacer {
    height: 88px;
  }

  /* Hero Section */
  .hero-section {
    min-height: 700px;
  }

  .hero-section h1 {
    font-size: var(--font-size-5xl);
  }

  .hero-section p {
    font-size: var(--font-size-2xl);
  }

  .hero-cta .btn {
    min-width: 220px;
    padding: 1.125rem 3rem;
    font-size: var(--font-size-xl);
  }

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

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  .section-title {
    font-size: var(--font-size-4xl);
  }

  .section-description {
    font-size: var(--font-size-xl);
    max-width: 700px;
  }

  /* Services Grid - 3 columns on desktop */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .service-card {
    padding: var(--space-2xl);
  }

  .service-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
  }

  .service-card h3 {
    font-size: var(--font-size-2xl);
  }

  /* Solutions Grid - 2 columns on desktop */
  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  .solution-image {
    height: 320px;
  }

  .solution-content {
    padding: var(--space-xl);
  }

  .solution-content h3 {
    font-size: var(--font-size-2xl);
  }

  .solution-content p {
    font-size: var(--font-size-lg);
  }

  /* Strengths Grid - 4 columns on desktop */
  .strengths-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
  }

  .strength-item {
    padding: var(--space-xl);
  }

  .strength-number {
    font-size: var(--font-size-4xl);
  }

  .strength-item h3 {
    font-size: var(--font-size-xl);
  }

  /* Blog Grid - 3 columns on desktop */
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .blog-thumbnail {
    height: 240px;
  }

  .blog-content {
    padding: var(--space-xl);
  }

  .blog-card h3 {
    font-size: var(--font-size-xl);
  }

  /* CTA Section */
  .cta-section {
    padding: var(--space-3xl) 0;
  }

  .cta-section h2 {
    font-size: var(--font-size-5xl);
  }

  .cta-section p {
    font-size: var(--font-size-2xl);
  }

  .cta-buttons .btn {
    min-width: 240px;
  }

  /* Footer - 3 columns on desktop */
  .footer-widgets {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }

  .footer-widget h3 {
    font-size: var(--font-size-xl);
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: var(--space-lg) 0;
  }

  .breadcrumb-list {
    font-size: var(--font-size-base);
  }

  /* Content Area */
  .content-area {
    padding: var(--space-3xl) 0;
  }

  .single-post .content-area,
  .page .content-area {
    padding: var(--space-2xl) 0;
  }

  .entry-header {
    margin-bottom: var(--space-3xl);
  }

  .entry-title {
    font-size: var(--font-size-5xl);
  }

  .entry-meta {
    font-size: var(--font-size-base);
    gap: 2rem;
  }

  .entry-content {
    max-width: 900px;
    font-size: var(--font-size-lg);
  }

  .entry-content h2 {
    font-size: var(--font-size-4xl);
    margin-top: var(--space-2xl);
  }

  .entry-content h3 {
    font-size: var(--font-size-3xl);
  }

  .entry-content h4 {
    font-size: var(--font-size-2xl);
  }

  .entry-content p {
    margin-bottom: var(--space-lg);
  }

  .entry-content blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    font-size: var(--font-size-xl);
  }

  /* Scroll to Top */
  .scroll-to-top {
    width: 64px;
    height: 64px;
    font-size: var(--font-size-2xl);
  }

  /* Sidebar Layout */
  .has-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
  }

  .has-sidebar.sidebar-left {
    grid-template-columns: 320px 1fr;
  }
}

/* ================================
   Large Desktop (1280px+)
   ================================ */
@media (min-width: 1280px) {

  /* Hero Section */
  .hero-section {
    min-height: 800px;
  }

  /* Container Adjustments */
  .container {
    padding: 0 var(--space-xl);
  }

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

  /* Services */
  .service-card {
    padding: var(--space-2xl) var(--space-xl);
  }

  /* Solutions */
  .solution-image {
    height: 360px;
  }

  /* Sidebar Layout - Wider sidebar */
  .has-sidebar {
    grid-template-columns: 1fr 360px;
    gap: var(--space-3xl);
  }

  .has-sidebar.sidebar-left {
    grid-template-columns: 360px 1fr;
  }
}

/* ================================
   Extra Large Desktop (1440px+)
   ================================ */
@media (min-width: 1440px) {

  /* Hero Section */
  .hero-section {
    min-height: 850px;
  }

  /* Section Spacing */
  .section {
    padding: 6rem 0;
  }

  /* Content Area */
  .entry-content {
    max-width: 1000px;
  }
}

/* ================================
   Print Styles
   ================================ */
@media print {

  /* Hide navigation and non-content elements */
  .site-header,
  .mobile-menu,
  .mobile-menu-overlay,
  .mobile-menu-toggle,
  .hero-section,
  .cta-section,
  .site-footer,
  .scroll-to-top,
  .breadcrumb,
  .entry-meta,
  .entry-footer,
  .pagination,
  .sidebar,
  .blog-read-more,
  .service-link,
  .solution-badge {
    display: none !important;
  }

  /* Reset backgrounds and colors */
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  /* Adjust spacing */
  .section {
    padding: 1rem 0;
  }

  /* Improve readability */
  .entry-content {
    max-width: 100%;
  }

  .entry-content h2,
  .entry-content h3,
  .entry-content h4 {
    page-break-after: avoid;
  }

  .entry-content p {
    orphans: 3;
    widows: 3;
  }

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

  /* Optimize images */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-section::before {
    animation: none;
  }

  .cta-section::before {
    animation: none;
  }
}

/* ================================
   Dark Mode Support
   ================================ */
@media (prefers-color-scheme: dark) {

  /* Optional: Uncomment to enable automatic dark mode */
  /*
  :root {
    --color-bg-primary: #1A1A1A;
    --color-bg-secondary: #2A2A2A;
    --color-bg-dark: #0A0A0A;
    --color-text-primary: #E0E0E0;
    --color-text-secondary: #B0B0B0;
    --color-text-light: #808080;
    --color-border: #3A3A3A;
  }

  .site-header {
    background: rgba(26, 26, 26, 0.98);
  }

  .site-header.scrolled {
    background: rgba(26, 26, 26, 1);
  }

  .service-card,
  .solution-card,
  .blog-card {
    background: var(--color-bg-secondary);
  }

  .mobile-menu {
    background: var(--color-bg-primary);
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  textarea,
  select {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
  }
  */
}

/* ================================
   High Contrast Mode
   ================================ */
@media (prefers-contrast: high) {

  :root {
    --color-border: #000;
  }

  .btn,
  .service-card,
  .solution-card,
  .blog-card,
  .strength-item {
    border: 2px solid currentColor;
  }
}

/* ================================
   Landscape Orientation (Mobile)
   ================================ */
@media (max-width: 767px) and (orientation: landscape) {

  .hero-section {
    min-height: 400px;
    padding: var(--space-xl) var(--container-padding);
  }

  .hero-section h1 {
    font-size: var(--font-size-2xl);
  }

  .hero-section p {
    font-size: var(--font-size-base);
  }

  .header-spacer {
    height: 64px;
  }
}

/* ================================
   Small Mobile (max 480px)
   ================================ */
@media (max-width: 480px) {

  :root {
    --container-padding: 1rem;
  }

  /* Header */
  .site-logo {
    font-size: var(--font-size-lg);
  }

  .site-logo img {
    height: 36px;
  }

  /* Hero */
  .hero-section {
    min-height: 450px;
    padding: var(--space-2xl) var(--container-padding);
  }

  .hero-section h1 {
    font-size: var(--font-size-2xl);
  }

  .hero-section p {
    font-size: var(--font-size-base);
  }

  .hero-cta .btn {
    width: 100%;
    min-width: auto;
  }

  /* Cards */
  .service-card,
  .solution-content,
  .strength-item,
  .blog-content {
    padding: var(--space-md);
  }

  .service-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  /* CTA */
  .cta-section h2 {
    font-size: var(--font-size-2xl);
  }

  .cta-section p {
    font-size: var(--font-size-base);
  }

  .cta-buttons .btn {
    width: 100%;
    min-width: auto;
  }

  /* Content */
  .entry-title {
    font-size: var(--font-size-2xl);
  }

  .entry-content h2 {
    font-size: var(--font-size-xl);
  }

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

  /* Mobile Menu */
  .mobile-menu {
    width: 100%;
    right: -100%;
  }

  /* Pagination */
  .pagination a,
  .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    font-size: var(--font-size-sm);
  }

  /* Scroll to Top */
  .scroll-to-top {
    width: 44px;
    height: 44px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* ================================
   Tablet Portrait (768px - 1023px Portrait)
   ================================ */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {

  /* Optimize for tablet portrait */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* ================================
   Hover Support Detection
   ================================ */
@media (hover: hover) and (pointer: fine) {

  /* Enhanced hover effects for devices with precise pointers */
  .service-card:hover,
  .solution-card:hover,
  .blog-card:hover {
    transform: translateY(-10px);
  }

  .service-link:hover,
  .blog-read-more:hover {
    gap: 1rem;
  }
}

/* ================================
   No Hover Support
   ================================ */
@media (hover: none) {

  /* Remove hover effects for touch devices */
  .service-card:hover,
  .solution-card:hover,
  .blog-card:hover,
  .strength-item:hover {
    transform: none;
  }

  /* Increase touch target sizes */
  .btn,
  .pagination a,
  .pagination span,
  button {
    min-height: 48px;
  }
}
