@import url(global.css);

/* ============================================================
   TABLET RESPONSIVENESS (MAX 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card { min-width: calc(50% - 15px); }
}

/* ============================================================
   MOBILE RESPONSIVENESS (MAX 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* 1. Header & Navigation */
  .navbar .container { padding: 0 15px; }
  
  .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .logo { font-size: 0.9rem; flex: 1; }

  .btn-portal {
    padding: 8px 10px !important;
    font-size: 10px !important;
    white-space: nowrap;
    min-width: fit-content;
  }

  /* 2. Hero Section */
  .hero { padding: 100px 0 60px; text-align: center; }
  .hero h1 { font-size: 2rem; line-height: 1.2; width: 100%; }
  .hero-actions { 
    display: flex;
    flex-direction: column; 
    gap: 15px; 
    align-items: center;
  }

  /* 3. About & Expertise Sections */
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .stats { justify-content: center; }
  .expertise-grid { grid-template-columns: 1fr; }

  /* 4. News Carousel Correction */
  .news-wrapper {
    width: 100vw; 
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
  }

  .news-grid {
    display: grid !important;
    grid-auto-columns: 100%;
    grid-auto-flow: column;
    gap: 0 !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .news-card {
    width: 100vw !important;
    min-width: 100vw !important;
    box-sizing: border-box;
    padding: 30px 25px;
    margin: 0 !important;
    border: none;
    background: #eee;
  }

  .carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
  }

  /* 5. Contact Section */
  .contact { padding: 40px 0; }
  
  .contact-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .contact-info, .contact-form {
    width: 100% !important;
    padding: 35px 25px !important;
    margin: 0 !important;
    height: auto !important;
  }

  .contact-form { background: #ffffff !important; }

  /* 6. Footer */
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .footer-social { justify-content: center; margin-top: 15px; }
}

/* ============================================================
   CLIENT PORTAL RESPONSIVENESS (cliente.html)
   ============================================================ */
@media (max-width: 992px) {
  .sidebar { width: 80px; }
  .sidebar-logo h2, .sidebar-nav a span { display: none; }
}

@media (max-width: 600px) {
  .portal-body { flex-direction: column; }
  .sidebar { 
    width: 100%; 
    height: auto; 
    position: relative; 
    border-right: none;
    border-bottom: 1px solid var(--gold);
  }
  .sidebar-nav { 
    display: flex; 
    flex-direction: row; 
    justify-content: space-around; 
    padding: 10px 0;
  }
  .stats-grid { grid-template-columns: 1fr; }

  /* Table Mobile Layout */
  .portal-table thead { display: none; }
  .portal-table tr { 
    display: block; 
    border: 1px solid #eee; 
    margin-bottom: 15px; 
    border-radius: 8px; 
  }
  .portal-table td { 
    display: flex; 
    justify-content: space-between; 
    padding: 12px 10px; 
    border-bottom: 1px solid #f9f9f9; 
  }
  .portal-table td::before { 
    content: attr(data-label); 
    font-weight: bold; 
    color: #c5a059; 
  }
}