/* Mobile-specific styles for Graph Foundation Model article */
/* Optimized for screens 768px and below */

@media (max-width: 768px) {
  /* Mobile Navigation */
  .nav-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    z-index: 999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
  }

  .mobile-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-nav-menu {
    list-style: none; /* Esta es la corrección para eliminar los puntos */
    padding: 1rem;
    margin: 0;
  }

  .mobile-nav-menu li {
    margin-bottom: 0.5rem;
  }

  .mobile-nav-link {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:focus {
    background: #f8f9fa;
    color: #667eea;
    border-left-color: #667eea;
    transform: translateX(5px);
  }

  .mobile-nav-link i {
    margin-right: 0.5rem;
    width: 20px;
  }

  /* Main Content Mobile */
  .main-content {
    margin-top: 70px;
    padding: 0.5rem;
  }

  .container {
    padding: 0 10px;
  }

  /* Article Header Mobile */
  .article-header {
    padding: 2rem 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
  }

  .article-title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .article-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .meta-item {
    font-size: 0.85rem;
    gap: 0.25rem;
  }

  /* Breadcrumb Mobile */
  .breadcrumb {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
  }

  .breadcrumb-list {
    font-size: 0.85rem;
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .breadcrumb-item {
    gap: 0.25rem;
  }

  .breadcrumb-separator {
    font-size: 0.7rem;
  }

  /* Table of Contents Mobile */
  .table-of-contents {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 12px;
  }

  .toc-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .toc-link {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .toc-link:hover {
    transform: translateX(3px);
  }

  .toc-link i {
    font-size: 0.8rem;
  }

  /* Content Sections Mobile */
  .content-section {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .section-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .section-icon {
    font-size: 1.2rem;
  }

  .section-content {
    font-size: 1rem;
    line-height: 1.7;
  }

  .section-content p {
    margin-bottom: 1.25rem;
  }

  .section-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
  }

  /* Algorithm Comparison Mobile */
  .algorithm-comparison {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .algorithm-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .algorithm-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .algorithm-features {
    font-size: 0.9rem;
  }

  .algorithm-features li {
    margin-bottom: 0.5rem;
    align-items: flex-start;
  }

  .algorithm-features i {
    margin-top: 0.2rem;
    flex-shrink: 0;
  }

  /* Strategy Grid Mobile */
  .strategy-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .strategy-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .strategy-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .strategy-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .strategy-steps {
    font-size: 0.9rem;
  }

  .strategy-steps li {
    margin-bottom: 0.75rem;
    align-items: flex-start;
  }

  .step-number {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
  }

  /* Interactive Tool Mobile */
  .interactive-tool {
    border-radius: 15px;
    margin: 2rem 0;
    padding: 1rem;
  }

  .tool-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
  }

  .tool-form {
    gap: 1rem;
  }

  .form-group {
    padding: 1rem;
    border-radius: 8px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  .form-input,
  .form-textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .form-input:focus,
  .form-textarea:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
  }

  .form-textarea {
    min-height: 100px;
    resize: vertical;
  }

  .analyze-btn {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 8px;
    width: 100%;
    margin-top: 0.5rem;
  }

  .analyze-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
  }

  .tool-result {
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
  }

  .score-circle {
    width: 100px;
    height: 100px;
  }

  .score-circle::before {
    width: 75px;
    height: 75px;
  }

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

  .recommendations {
    gap: 0.75rem;
  }

  .recommendation {
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
  }

  /* Comparison Table Mobile */
  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    min-width: 120px;
    white-space: normal;
  }

  .comparison-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  /* Benefits List Mobile */
  .benefits-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .benefit-item {
    padding: 1rem;
    border-radius: 8px;
    flex-direction: column;
    text-align: center;
  }

  .benefit-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .benefit-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .benefit-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Code Examples Mobile */
  .code-example {
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
  }

  .code-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .code-title {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .copy-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    align-self: flex-end;
    border-radius: 4px;
  }

  .code-content {
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Highlight Boxes Mobile */
  .highlight-box {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    border-left-width: 3px;
  }

  .highlight-box h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .highlight-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
  }

  .highlight-box ul {
    font-size: 0.9rem;
    padding-left: 1rem;
  }

  .highlight-box li {
    margin-bottom: 0.5rem;
  }

  /* CTA Section Mobile */
  .cta-section {
    padding: 2rem 1rem;
    border-radius: 15px;
    margin: 2rem 0;
  }

  .cta-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .cta-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .cta-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    justify-content: center;
    border-radius: 8px;
    width: 100%;
  }

  .cta-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
  }

  /* Share Section Mobile */
  .share-section {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
  }

  .share-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .share-buttons {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .share-btn {
    padding: 0.75rem 1rem;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
  }

  .share-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  /* Related Articles Mobile */
  .related-articles {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
  }

  .related-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .related-card {
    padding: 1rem;
    border-radius: 8px;
  }

  .related-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }

  .related-card p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
  }

  .related-link {
    font-size: 0.9rem;
  }

  /* Footer Mobile */
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .footer-section a,
  .footer-section p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .social-link {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* WhatsApp Float Mobile */
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  /* Progress Bar Mobile */
  .progress-bar {
    height: 2px;
  }

  /* Header Mobile */
  .header {
    padding: 0.75rem 0;
  }

  .header.scrolled {
    padding: 0.5rem 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-icon {
    width: 35px;
    height: 35px;
  }

  .nav-menu.active {
    list-style: none;
  }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
  .container {
    padding: 0 5px;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .content-section {
    padding: 0.75rem;
  }

  .interactive-tool {
    padding: 0.75rem;
  }

  .form-group {
    padding: 0.75rem;
  }

  .cta-section {
    padding: 1.5rem 0.75rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .share-section,
  .related-articles {
    padding: 1rem;
  }

  .algorithm-card,
  .strategy-card {
    padding: 1rem;
  }

  .benefit-item {
    padding: 0.75rem;
  }

  .code-example {
    padding: 0.75rem;
  }

  .highlight-box {
    padding: 0.75rem;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .toc-link:hover,
  .mobile-nav-link:hover,
  .share-btn:hover,
  .cta-btn:hover {
    transform: none;
  }

  .algorithm-card:hover,
  .strategy-card:hover,
  .benefit-item:hover {
    transform: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  }

  .related-card:hover {
    transform: none;
    background: #f8f9fa;
  }

  /* Increase touch targets */
  .mobile-nav-link,
  .toc-link,
  .share-btn,
  .cta-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .content-section {
    border: 2px solid #333;
  }

  .section-title {
    color: #000;
  }

  .section-content {
    color: #000;
  }

  .mobile-nav-link {
    border: 1px solid #333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .whatsapp-float {
    animation: none;
  }

  .mobile-menu {
    transition: none;
  }
}

/* Print styles for mobile */
@media print {
  .mobile-menu,
  .mobile-menu-toggle,
  .whatsapp-float,
  .share-section,
  .cta-section,
  .interactive-tool {
    display: none !important;
  }

  .main-content {
    margin-top: 0;
  }

  .content-section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1rem;
  }

  body {
    font-size: 10pt;
    line-height: 1.4;
    color: #000;
  }
}
