/* Mobile-specific fixes for Matchly Sports Landing Page */

/* Header Mobile Fixes */
@media (max-width: 768px) {
  .header-area {
    height: 100px !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000 !important;
  }
  
  body {
    padding-top: 100px !important;
  }
}

/* Hero Section Mobile Improvements */
@media (max-width: 768px) {
  .main-banner {
    padding: 80px 0 60px 0 !important; /* Increased top padding to account for fixed headers */
    text-align: center;
    margin-top: 0;
  }
  
  .main-banner .left-content {
    margin-right: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .main-banner .left-content .hero-tag {
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .main-banner .left-content .hero-headline {
    font-size: 38px !important;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
  }
  
  .main-banner .left-content .hero-subtitle {
    font-size: 16px;
    text-align: center;
    margin-right: 0;
    margin-bottom: 30px;
    padding: 0 10px;
    line-height: 1.6;
  }
  
  .main-banner .left-content .cta-container {
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
  }
  
  .main-banner .left-content .primary-button .main-cta {
    padding: 12px 25px;
    font-size: 15px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .main-banner .left-content .secondary-button .secondary-cta {
    font-size: 14px;
    text-align: center;
  }
  
  .main-banner .right-image {
    margin: 40px auto 0 auto;
    text-align: center;
    padding: 0 20px;
  }
  
  .main-banner .right-image img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .main-banner {
    padding: 70px 0 50px 0 !important; /* Increased top padding to account for fixed headers */
  }
  
  .main-banner .left-content {
    padding: 0 15px;
  }
  
  .main-banner .left-content .hero-headline {
    font-size: 32px !important;
    margin-bottom: 15px;
  }
  
  .main-banner .left-content .hero-subtitle {
    font-size: 15px;
    margin-bottom: 25px;
    padding: 0 5px;
  }
  
  .main-banner .left-content .cta-container {
    gap: 12px;
    margin-top: 15px;
  }
  
  .main-banner .left-content .primary-button .main-cta {
    padding: 10px 20px;
    font-size: 14px;
    max-width: 250px;
  }
  
  .main-banner .right-image {
    margin: 30px auto 0 auto;
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .main-banner {
    padding: 60px 0 40px 0 !important; /* Increased top padding to account for fixed headers */
  }
  
  .main-banner .left-content {
    padding: 0 10px;
  }
  
  .main-banner .left-content .hero-headline {
    font-size: 28px !important;
    margin-bottom: 12px;
  }
  
  .main-banner .left-content .hero-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .main-banner .left-content .primary-button .main-cta {
    padding: 8px 18px;
    font-size: 13px;
    max-width: 220px;
  }
  
  .main-banner .right-image {
    margin: 25px auto 0 auto;
    padding: 0 10px;
  }
}

/* About Section Mobile Improvements */
@media (max-width: 768px) {
  #about {
    padding-top: 80px !important;
  }
  
  .about .row {
    flex-direction: column;
  }
  
  .about .row .col-lg-6 {
    padding: 0 20px;
    margin-bottom: 30px;
  }
  
  .about-left-image {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .about-left-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
  }
  
  .about-right-content {
    padding: 30px 20px !important;
    margin: 0;
    text-align: center;
  }
  
  .about-right-content .section-heading h4 {
    font-size: 28px;
    text-align: center;
  }
  
  .about-right-content p {
    text-align: center;
    font-size: 15px;
    padding-left: 0;
  }
  
  .about-right-content p::before {
    display: none;
  }
  
  .features-list {
    text-align: center;
    margin: 20px 0;
  }
  
  .features-list li {
    text-align: center;
    padding: 10px;
  }
}

@media (max-width: 576px) {
  #about {
    padding-top: 60px !important;
  }
  
  .about .row .col-lg-6 {
    padding: 0 15px;
    margin-bottom: 25px;
  }
  
  .about-right-content {
    padding: 25px 15px !important;
  }
  
  .about-right-content .section-heading h4 {
    font-size: 24px;
  }
  
  .about-right-content p {
    font-size: 14px;
  }
}

/* Services Section Mobile Improvements */
@media (max-width: 768px) {
  /* Asegurar que la sección de servicios tenga suficiente espacio */
  .services {
    padding-top: 40px !important;
  }
  
  /* Corregir el problema de font-size: 0px que oculta las imágenes */
  .services .naccs .menu div {
    font-size: 14px !important;
  }
  
  /* Override the problematic rule from main CSS that hides content */
  .services .naccs .menu div * {
    font-size: inherit !important;
  }
  
  /* Asegurar que las imágenes sean específicamente visibles */
  .services .naccs .menu div .icon {
    font-size: 14px !important;
  }
  
  .services .naccs .menu div .icon img {
    font-size: 14px !important;
  }
  
  .services .naccs .menu div .thumb {
    font-size: 14px !important;
  }
  
  .services .naccs .menu div .thumb .title {
    font-size: 14px !important;
  }
  
  /* Asegurar que las imágenes de servicios sean visibles */
  .services .icon img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    height: auto !important;
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    font-size: 14px !important;
  }
  
  /* Asegurar que el contenedor del icono también sea visible */
  .services .naccs .menu div .thumb .icon {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
  }
  
  .services .naccs .menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  
  .services .naccs .menu div {
    width: 100%;
    margin-bottom: 0;
    min-height: 80px !important;
    max-width: none;
    position: relative;
  }
  
  .services .naccs .menu div .thumb {
    padding: 15px 18px;
    text-align: left;
    min-height: 80px !important;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
  }
  
  .services .naccs .menu div .thumb .title {
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 600;
    color: #2a2a2a;
  }
  
  .services .icon {
    width: 70px !important;
    height: 70px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }
  
  .services .icon img {
    width: 60px !important;
    height: 60px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
  }
  
  .services .icon::before {
    width: 70px !important;
    height: 70px !important;
  }
  
  .services .naccs .menu div .thumb span.coming-soon-tag {
    position: absolute !important;
    bottom: 6px !important;
    right: 6px !important;
    padding: 2px 6px !important;
    font-size: 7px !important;
    background: linear-gradient(135deg, #ff4757, #ff3742) !important;
    color: white !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3) !important;
    z-index: 10 !important;
    line-height: 1.1 !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: nowrap !important;
    display: inline-block !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    border: none !important;
    text-shadow: none !important;
  }
  
  .services .naccs .menu div .thumb:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .services .naccs .menu div .thumb .content-wrapper {
    flex: 1;
    text-align: left;
    padding-right: 40px; /* Reducido para el tag más pequeño */
  }
  
  .services ul.nacc li.active {
    padding: 25px 15px;
    margin-top: 10px;
  }
  
  .services ul.nacc li .left-text {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .services ul.nacc li .left-text h4 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .services ul.nacc li .left-text p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .services ul.nacc li .right-image {
    text-align: center;
    margin-top: 20px;
  }
  
  .services ul.nacc li .right-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
  }
}

@media (max-width: 576px) {
  /* Asegurar que la sección de servicios tenga suficiente espacio */
  .services {
    padding-top: 35px !important;
  }
  
  /* Corregir el problema de font-size: 0px que oculta las imágenes */
  .services .naccs .menu div {
    font-size: 13px !important;
  }
  
  .services .naccs .menu {
    gap: 10px;
    margin-bottom: 25px;
  }
  
  .services .naccs .menu div {
    min-height: 75px !important;
  }
  
  .services .naccs .menu div .thumb {
    padding: 12px 16px;
    min-height: 75px !important;
    gap: 12px;
  }
  
  .services .naccs .menu div .thumb .title {
    font-size: 13px;
  }
  
  .services .icon {
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
  }
  
  .services .icon img {
    width: 50px !important;
    height: 50px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
  }
  
  .services .icon::before { 
    width: 60px !important;
    height: 60px !important;
  }
  
  .services .naccs .menu div .thumb span.coming-soon-tag {
    bottom: 5px !important;
    right: 5px !important;
    padding: 2px 5px !important;
    font-size: 6px !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: nowrap !important;
    display: inline-block !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    border: none !important;
    text-shadow: none !important;
  }
  
  .services ul.nacc li.active {
    padding: 20px 10px;
  }
}

@media (max-width: 480px) {
  /* Asegurar que la sección de servicios tenga suficiente espacio */
  .services {
    padding-top: 30px !important;
  }
  
  .services .naccs .menu div {
    font-size: 12px !important;
  }
  
  .services .naccs .menu {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .services .naccs .menu div {
    min-height: 70px !important;
  }
  
  .services .naccs .menu div .thumb {
    padding: 10px 14px;
    min-height: 70px !important;
    gap: 10px;
  }
  
  .services .naccs .menu div .thumb .title {
    font-size: 12px;
  }
  
  .services .icon {
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  
  .services .icon img {
    width: 40px !important;
    height: 40px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
  }
  
  .services .icon::before {
    width: 50px !important;
    height: 50px !important;
  }
  
  .services .naccs .menu div .thumb span.coming-soon-tag {
    bottom: 4px !important;
    right: 4px !important;
    padding: 1px 4px !important;
    font-size: 5px !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: nowrap !important;
    display: inline-block !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    border: none !important;
    text-shadow: none !important;
  }
  
  .services ul.nacc li.active {
    padding: 15px 8px;
  }
}

/* Portfolio Section Mobile Improvements */
@media (max-width: 768px) {
  .our-portfolio .section-heading {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .our-portfolio .section-heading h4 {
    font-size: 28px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px;
  }
  
  .portfolio-item .thumb img {
    height: 200px;
    object-fit: cover;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 15px;
  }
  
  .portfolio-item .thumb img {
    height: 250px;
  }
}

/* Contact Section Mobile Improvements */
@media (max-width: 768px) {
  .contact-us {
    padding-top: 80px !important;
  }
  
  .contact-us .section-heading {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .contact-us .section-heading h4 {
    font-size: 28px;
  }
  
  form#contact {
    padding: 30px 20px;
  }
  
  .fill-form {
    padding: 40px 20px;
  }
  
  .fill-form .info-post {
    text-align: center;
    margin-bottom: 25px;
  }
  
  form#contact input,
  form#contact textarea {
    width: 100%;
    margin-bottom: 20px;
  }
  
  form#contact button {
    width: 100%;
    padding: 15px;
  }
}

@media (max-width: 576px) {
  .contact-us {
    padding-top: 60px !important;
  }
  
  form#contact {
    padding: 20px 15px;
  }
  
  .fill-form {
    padding: 30px 15px;
  }
  
  .contact-us .section-heading h4 {
    font-size: 24px;
  }
}

/* Contact Form Button UX Improvements - Desktop */
form#contact button {
  display: block !important;
  width: 100% !important;
  padding: 15px 25px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-align: center !important;
  cursor: pointer !important;
  user-select: none !important;
  min-height: 50px !important;
  border-radius: 25px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

form#contact button:hover,
form#contact button:focus {
  background-color: #4da6e7 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(77, 166, 231, 0.4) !important;
}

form#contact button:active {
  transform: translateY(0) !important;
  box-shadow: 0 3px 10px rgba(77, 166, 231, 0.5) !important;
}

/* Contact Form Button UX Improvements - Mobile */
@media (max-width: 768px) {
  form#contact button {
    display: block !important;
    width: 100% !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    min-height: 50px !important;
    border-radius: 25px !important;
    transition: all 0.3s ease !important;
  }
  
  form#contact button:hover,
  form#contact button:focus,
  form#contact button:active {
    background-color: #4da6e7 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(77, 166, 231, 0.3) !important;
  }
  
  form#contact button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(77, 166, 231, 0.4) !important;
  }
}

@media (max-width: 576px) {
  form#contact button {
    padding: 18px 25px !important;
    font-size: 15px !important;
    min-height: 55px !important;
  }
}

@media (max-width: 480px) {
  form#contact button {
    padding: 20px 25px !important;
    font-size: 14px !important;
    min-height: 60px !important;
  }
}

/* General Mobile Improvements */
@media (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .section-heading {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .section-heading h6 {
    font-size: 16px;
  }
  
  .section-heading h4 {
    font-size: 28px;
  }
  
  .section-heading .line-dec {
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .section-heading h4 {
    font-size: 24px;
  }
  
  .section-heading h6 {
    font-size: 14px;
  }
}

/* Logo Quality Improvements for Mobile */
@media (max-width: 768px) {
  .header-area .main-nav .logo img {
    max-width: 120px !important;
    height: auto !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: pixelated !important;
    -webkit-image-rendering: -webkit-optimize-contrast !important;
    -moz-image-rendering: crisp-edges !important;
    -ms-image-rendering: crisp-edges !important;
    filter: contrast(1.1) brightness(1.05) !important;
  } 
}

@media (max-width: 576px) {
  .header-area .main-nav .logo img {
    max-width: 100px !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .header-area .main-nav .logo img {
    max-width: 90px !important;
    height: auto !important;
  }
}

/* Pre-header Mobile Improvements - Make it visible and properly positioned */
@media (max-width: 768px) {
  .pre-header {
    display: block !important;
    height: auto !important;
    padding: 8px 0 !important;
    background: linear-gradient(135deg, #2B4B80 0%, #4da6e7 100%) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1002 !important;
    width: 100% !important;
  }
  
  .pre-header .container {
    padding: 0 15px !important;
  }
  
  .pre-header ul.info {
    text-align: center !important;
    margin-bottom: 5px !important;
  }
  
  .pre-header ul.info li {
    margin-right: 0 !important;
    margin-bottom: 5px !important;
  }
  
  .pre-header ul.info li a {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }
  
  .pre-header ul.info li a i {
    font-size: 12px !important;
    padding: 4px !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 6px !important;
  }
  
  .pre-header ul.social-media {
    text-align: center !important;
    margin-top: 5px !important;
  }
  
  .pre-header ul.social-media li {
    margin-left: 4px !important;
    margin-right: 4px !important;
  }
  
  .pre-header ul.social-media li a {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }
  
  /* Adjust header position to account for pre-header */
  .header-area {
    top: 60px !important; /* Adjust based on pre-header height */
    z-index: 1001 !important;
  }
  
  body {
    padding-top: 160px !important; /* Adjust for both pre-header (~60px) and header (100px) */
  }
}

@media (max-width: 576px) {
  .pre-header {
    padding: 6px 0 !important;
  }
  
  .pre-header ul.info li a {
    font-size: 11px !important;
  }
  
  .pre-header ul.info li a i {
    font-size: 11px !important;
    padding: 3px !important;
    width: 18px !important;
    height: 18px !important;
  }
  
  .pre-header ul.social-media li a {
    width: 22px !important;
    height: 22px !important;
    font-size: 9px !important;
  }
  
  /* Adjust header position for smaller screens */
  .header-area {
    top: 55px !important;
  }
  
  body {
    padding-top: 155px !important; /* Adjust for both pre-header (~55px) and header (100px) */
  }
}

@media (max-width: 480px) {
  .pre-header {
    padding: 5px 0 !important;
  }
  
  .pre-header ul.info li a {
    font-size: 10px !important;
  }
  
  .pre-header ul.info li a i {
    font-size: 10px !important;
    padding: 2px !important;
    width: 16px !important;
    height: 16px !important;
  }
  
  .pre-header ul.social-media li a {
    width: 20px !important;
    height: 20px !important;
    font-size: 8px !important;
  }
  
  /* Adjust header position for smallest screens */
  .header-area {
    top: 50px !important;
  }
  
  body {
    padding-top: 150px !important; /* Adjust for both pre-header (~50px) and header (100px) */
  }
}
