/* 
========================================================================
   MIRAR AGRO - RESPONSIVE STYLESHEET
   Description: Media queries, layout adjustments for tablet/mobile viewports,
                and mobile-specific sticky CTA components.
========================================================================
*/

/* 1. MEDIA QUERIES FOR SCREEN SIZES */

/* Large screens (min-width: 1200px) */
@media (min-width: 1200px) {
  .hero-content h1 {
    font-size: 4rem;
  }
}

/* Medium & Desktop viewports (max-width: 991.98px) */
@media (max-width: 991.98px) {
  :root {
    --navbar-height: 70px;
  }
  
  .section-padding {
    padding: 70px 0;
  }
  
  .navbar-custom {
    background-color: var(--bg-body);
  }

  .navbar-collapse {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 10px;
    box-shadow: var(--shadow-md);
  }

  .nav-link-custom::after {
    display: none;
  }

  .navbar-cta-btn {
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
  }

  .theme-toggle-btn {
    margin-left: 0;
    margin-top: 10px;
    display: inline-block;
  }

  /* Hero adjustments */
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }

  /* Process Timeline vertical adjustment */
  .timeline-line {
    left: 20px;
    top: 50px;
    height: calc(100% - 100px);
  }

  .timeline-step {
    flex-direction: row !important;
    margin-bottom: 50px;
  }

  .timeline-info {
    display: none; /* Hide double text fields in mobile vertical list */
  }

  .timeline-node {
    left: 20px;
    transform: translateX(-50%);
  }
  
  .timeline-step:hover .timeline-node {
    transform: translateX(-50%) scale(1.1);
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: auto;
  }

  /* Gallery grid adjustments */
  .gallery-item.wide,
  .gallery-item.tall {
    grid-column: span 1;
    grid-row: span 1;
    height: 250px;
  }
}

/* Tablet viewports (max-width: 767.98px) */
@media (max-width: 767.98px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .about-pillars {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    padding: 25px;
  }
  .testimonial-quote {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  
  .contact-info-wrapper,
  .contact-form-wrapper {
    padding: 25px;
  }

  .cta-pre-footer h3 {
    font-size: 1.75rem;
  }
  .cta-pre-footer p {
    font-size: 0.95rem;
  }
  .cta-pre-footer-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
  }

  .footer-bottom {
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
    margin-top: 15px;
  }

  /* Padding offset at bottom of page to accommodate mobile sticky footer CTA */
  body {
    padding-bottom: 75px; /* Offset height of sticky CTA */
  }

  /* 2. MOBILE STICKY CTA BAR */
  .mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 65px;
    background: var(--bg-navbar);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 10px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-sticky-cta.hidden {
    transform: translateY(100%);
  }

  .mobile-cta-item {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: var(--radius-round);
    color: var(--text-white) !important;
    width: 95%;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.3px;
    text-decoration: none;
  }

  .mobile-cta-call {
    background-color: var(--color-accent);
  }
  .mobile-cta-whatsapp {
    background-color: #25D366;
  }
  .mobile-cta-order {
    background-color: var(--color-secondary);
    color: #1F2937 !important;
  }
  
  .mobile-cta-btn:active {
    transform: scale(0.95);
  }

  /* Shift floating buttons up so they don't overlap mobile cta */
  .floating-actions-container {
    bottom: 80px;
  }
}

/* Extra Small screens (max-width: 480px) */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn-premium {
    width: 100%;
  }
  
  .mobile-cta-btn {
    padding: 8px 6px;
    font-size: 0.7rem;
    gap: 4px;
    width: 96%;
  }

  .mobile-cta-btn span {
    display: inline !important;
  }
}
