/* Mobile Responsive Fix - Trinity Technology Solutions */

/* Base responsive fixes */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

* {
  box-sizing: border-box !important;
}

/* Container fixes */
.page-wrapper,
.main-wrapper,
.container-large,
.container-medium,
.container-small {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Header mobile fixes */
@media (max-width: 768px) {
  .new-responsive-header {
    height: 60px !important;
  }
  
  .new-header-container {
    padding: 0 1rem !important;
    justify-content: space-between !important;
  }
  
  .new-logo img {
    height: 45px !important;
  }
  
  .new-nav {
    display: none !important;
  }
  
  .new-nav.active {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    flex-direction: column !important;
    padding: 1.5rem 1rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
  }
  
  .new-nav a {
    padding: 0.75rem 0 !important;
    text-align: center !important;
    border-bottom: 1px solid #eee !important;
    width: 100% !important;
  }
  
  .new-get-started {
    margin-left: 0 !important;
    margin-top: 0.5rem !important;
  }
  
  .new-hamburger {
    display: flex !important;
  }
}

/* Hero section mobile fixes */
@media (max-width: 768px) {
  .section_hero {
    min-height: 70vh !important;
    padding-top: 60px !important;
  }
  
  #hero-video {
    height: 70vh !important;
    object-position: center !important;
  }
  
  .hero_content {
    padding: 2rem 1rem !important;
    text-align: center !important;
  }
  
  .hero_content h1 {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  .hero_content p {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .partner-pill {
    font-size: 12px !important;
    padding: 6px 12px !important;
    margin-bottom: 1rem !important;
  }
  
  .button.is-medium {
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
  }
}

/* Partners section mobile fixes */
@media (max-width: 768px) {
  .partners_comp {
    padding: 1rem 0 !important;
  }
  
  .logos-scroll-container {
    padding: 0 1rem !important;
  }
  
  .logos-scroll {
    gap: 1rem !important;
    padding: 1rem 0 !important;
  }
  
  .partner-logo {
    height: 40px !important;
    max-width: 100px !important;
    min-width: 80px !important;
  }
}

/* About section mobile fixes */
@media (max-width: 768px) {
  .who-we-are-section {
    padding: 3rem 0 !important;
  }
  
  .who-we-are-section .container-large > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center !important;
  }
  
  .who-we-are-section img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .who-we-are-section h2 {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .who-we-are-section h3 {
    font-size: 0.9rem !important;
  }
}

/* Databricks section mobile fixes */
@media (max-width: 768px) {
  .databricks-section {
    padding: 3rem 0 !important;
  }
  
  .databricks-section .container-large > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center !important;
  }
  
  .databricks-section h2 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  .databricks-section p {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .databricks-section > div > div > div:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
    margin-top: 1.5rem !important;
  }
  
  .databricks-section img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .databricks-section h4 {
    font-size: 0.9rem !important;
  }
}

/* Technology stack mobile fixes */
@media (max-width: 768px) {
  .tech-stack-section {
    padding: 3rem 0 !important;
  }
  
  .tech-stack-section h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }
  
  .tech-stack-section .title-small {
    font-size: 1rem !important;
  }
  
  .tech-stack-section > div > div > div:nth-child(3),
  .tech-stack-section > div > div > div:nth-child(4) {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  .tech-stack-section > div > div > div:nth-child(3) > div,
  .tech-stack-section > div > div > div:nth-child(4) > div {
    padding: 1.5rem 0.5rem !important;
  }
  
  .tech-stack-section img {
    width: 30px !important;
    height: 30px !important;
  }
  
  .tech-stack-section h3 {
    font-size: 0.8rem !important;
  }
}

/* Services section mobile fixes */
@media (max-width: 768px) {
  .services {
    padding: 3rem 0 !important;
  }
  
  .services-grid-new {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .service-card-new {
    padding: 1.5rem 1rem !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  
  .service-icon-new {
    width: 40px !important;
    height: 40px !important;
  }
  
  .service-title-new {
    font-size: 1rem !important;
  }
}

/* Counters section mobile fixes */
@media (max-width: 768px) {
  .counter-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  .counter-title {
    font-size: 2rem !important;
  }
  
  .paragraph-medium-lighter {
    font-size: 0.9rem !important;
  }
}

/* Sectors section mobile fixes */
@media (max-width: 768px) {
  .sectors {
    padding: 3rem 0 !important;
  }
  
  .four_column_grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  .sector_thumbnail-title {
    font-size: 1rem !important;
  }
}

/* Business section mobile fixes */
@media (max-width: 768px) {
  .businesses-section {
    padding: 3rem 0 !important;
  }
  
  .businesses-grid-new {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .business-preview {
    height: 150px !important;
  }
  
  .business-title {
    font-size: 1.3rem !important;
  }
  
  .business-desc {
    font-size: 0.9rem !important;
  }
}

/* Global section mobile fixes */
@media (max-width: 768px) {
  .global-section {
    padding: 3rem 0 !important;
  }
  
  .world-map {
    height: 250px !important;
  }
  
  .world-map-container {
    padding: 1rem !important;
  }
  
  .location-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  
  .location-card {
    padding: 1rem !important;
  }
  
  .location-card h3 {
    font-size: 1rem !important;
  }
  
  .location-card p {
    font-size: 0.8rem !important;
  }
}

/* Testimonials section mobile fixes */
@media (max-width: 768px) {
  .testimonials-section {
    padding: 3rem 0 !important;
  }
  
  .testimonial-card-new {
    min-width: 280px !important;
    padding: 1.5rem !important;
  }
  
  .testimonials-track-new {
    gap: 1rem !important;
  }
  
  .testimonial-card-new p {
    font-size: 0.9rem !important;
  }
  
  .testimonial-author-new h4 {
    font-size: 0.9rem !important;
  }
  
  .testimonial-author-new span {
    font-size: 0.8rem !important;
  }
}

/* FAQ section mobile fixes */
@media (max-width: 768px) {
  .faq-section {
    padding: 2rem 0 !important;
  }
  
  .faq-question {
    font-size: 1.1rem !important;
    padding-right: 2rem !important;
  }
  
  .faq-answer {
    font-size: 0.9rem !important;
  }
}

/* Footer mobile fixes */
@media (max-width: 768px) {
  footer {
    padding: 3rem 0 2rem !important;
  }
  
  footer > div:nth-child(2) > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  footer > div:nth-child(2) > div > div:first-child {
    grid-column: 1 !important;
    margin-bottom: 1rem !important;
  }
  
  footer h4 {
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
  }
  
  footer a,
  footer span {
    font-size: 1rem !important;
  }
  
  footer > div:first-child {
    font-size: 3rem !important;
    bottom: -20px !important;
  }
}

/* Chatbot mobile fixes */
@media (max-width: 768px) {
  .chat-interface {
    width: calc(100vw - 20px) !important;
    height: 80vh !important;
    max-height: 500px !important;
  }
  
  .chatbot-greeting {
    max-width: 250px !important;
    bottom: 70px !important;
    right: 10px !important;
  }
  
  #chatbot-container {
    bottom: 10px !important;
    right: 10px !important;
  }
}

/* Extra small mobile fixes */
@media (max-width: 480px) {
  .hero_content h1 {
    font-size: 1.5rem !important;
  }
  
  .four_column_grid {
    grid-template-columns: 1fr !important;
  }
  
  .counter-grid {
    grid-template-columns: 1fr !important;
  }
  
  .location-cards {
    grid-template-columns: 1fr !important;
  }
  
  .tech-stack-section > div > div > div:nth-child(3),
  .tech-stack-section > div > div > div:nth-child(4) {
    grid-template-columns: 1fr !important;
  }
  
  .new-logo img {
    height: 35px !important;
  }
  
  .new-responsive-header {
    height: 50px !important;
  }
  
  .new-nav {
    top: 50px !important;
  }
}

/* Prevent horizontal scrolling */
@media (max-width: 768px) {
  .container-large,
  .container-medium,
  .container-small {
    padding: 0 1rem !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  
  .padding-global {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix any elements that might cause overflow */
  img,
  video {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Ensure text doesn't overflow */
  h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* Tablet responsive fixes */
@media (max-width: 1024px) and (min-width: 769px) {
  .services-grid-new {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .businesses-grid-new {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .four_column_grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}