/* ========================================================================================================== */
/* ============================================ RESPONSIVE STYLES ============================================ */
/* ========================================================================================================== */

/* ==================== MOBILE FIRST - BASE STYLES (320px+) ==================== */

/* Global Mobile Fixes */
@media (max-width: 768px) {
  .container,
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: hidden;
  }

  section {
    overflow-x: hidden;
  }
}

/* Navbar Mobile */
@media (max-width: 991px) {
  .navbar-mentacy .container-fluid {
    padding: 0 1.5rem;
  }

  .navbar-mentacy-logo {
    height: 35px !important;
  }

  .navbar-nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .navbar-action-link {
    font-size: 0.9rem;
  }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    width: 95%;
    margin: 2rem auto;
    gap: 2rem;
    text-align: center;
  }

  .hero-left {
    max-width: 100%;
    gap: 2rem;
    align-items: center;
  }

  .hero-h1 {
    font-size: 1.8rem !important;
    line-height: 2.2rem !important;
    width: 100%;
  }

  .hero-description {
    width: 100%;
    font-size: 1rem;
    line-height: 1.6rem;
  }

  .hero-buttons {
    justify-content: center;
    width: 100%;
  }

  .hero-button {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .hero-image-wrapper {
    flex: 1;
    width: 100%;
    margin-top: 1rem;
  }

  .hero-image {
    max-width: 100%;
    margin-top: 0;
  }

  .store-buttons {
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
  }

  .store-buttons img {
    height: 40px;
  }
}

/* Insight Hub Modules Mobile */
@media (max-width: 768px) {
  .insighthub-modules-container {
    width: 95%;
    margin: 4rem auto;
  }

  .header-group {
    margin-bottom: 2.5rem;
    text-align: center;
  }

  .insighthub-h1 {
    font-size: 1.4rem;
    line-height: 2rem;
  }

  .insighthub-cards-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .insighthub-card {
    width: 100% !important;
    padding: 2rem 1.5rem;
  }
}

/* Mindspace Section Mobile */
@media (max-width: 768px) {
  .mindspace-main-container {
    width: 95% !important;
    margin: 2rem auto !important;
    padding: 2rem 1.5rem;
    flex-direction: column;
    min-height: auto;
  }

  .mindspace-white-card {
    width: 100% !important;
    max-width: 100%;
    transform: translateX(0);
    margin-top: 0;
    min-height: auto;
  }

  .mindspace-list-content {
    padding-left: 0;
    margin-top: 2rem;
    max-width: 100%;
    transform: translateX(0);
  }

  .feature-list li {
    margin-bottom: 1.2rem;
  }

  .feature-list p {
    font-size: 0.9rem;
  }

  .mindspace-nav {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 2rem;
    justify-content: center;
  }
}

/* Sleep Zone Mobile */
@media (max-width: 768px) {
  .sleepzone-cards-section {
    padding: 3rem 0;
    overflow-x: hidden;
  }

  .sleepzone-cards-wrapper {
    width: 95%;
    margin: 0 auto;
    overflow-x: hidden;
  }

  .sleepzone-illustration {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
  }

  .sleepzone-core-image {
    width: 100%;
    max-width: 100%;
    margin-top: 0 !important;
    margin-left: 0 !important;
  }
}

/* Digital Mentacy Section Mobile */
@media (max-width: 768px) {
  .digital-mentacy-section {
    padding: 4rem 0;
  }

  .digital-mentacy-container {
    flex-direction: column;
    width: 95%;
    gap: 3rem;
  }

  .digital-mentacy-left {
    width: 100%;
    order: 2;
  }

  .digital-mentacy-right {
    width: 100%;
    order: 1;
  }

  .digital-mentacy-right img {
    width: 100%;
  }

  .product-title {
    font-size: 1.8rem;
  }

  .product-description {
    max-width: 100%;
  }

  .product-feature {
    gap: 1rem;
  }

  .product-feature img {
    width: 40px;
    height: 40px;
  }

  .product-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Testimonial Section Mobile */
@media (max-width: 768px) {
  .testimonial-section {
    padding: 4rem 0;
  }

  .testimonial-container {
    width: 95%;
  }

  .testimonial-top {
    max-width: 100%;
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .testimonial-heading {
    font-size: 1.6rem;
  }

  .testimonial-center {
    flex-direction: column;
    gap: 1rem;
  }

  .testimonial-nav {
    position: relative;
    left: auto;
    right: auto;
    transform: none;
    margin: 0.5rem;
  }

  .testimonial-nav.left {
    order: 1;
  }

  .testimonial-nav.right {
    order: 3;
  }

  .testimonial-cards {
    order: 2;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 280px;
  }

  .testimonial-card {
    position: relative;
    transform: none;
    margin-bottom: 1rem;
  }

  .card-back {
    display: none;
  }

  .card-front {
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
}

/* FAQ Section Mobile */
@media (max-width: 768px) {
  .faq-section {
    padding: 4rem 0;
  }

  .faq-container {
    width: 95%;
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .faq-top {
    max-width: 100%;
    text-align: center;
    margin-bottom: 2rem;
  }

  .faq-heading {
    font-size: 1.6rem;
  }

  .faq-right {
    max-width: 100%;
  }

  .faq-item {
    margin-bottom: 1rem;
  }

  .faq-question {
    padding: 1.1rem 1.3rem;
    font-size: 0.9rem;
  }

  .faq-answer p {
    padding: 0 1.3rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* Upgrade Section Mobile */
@media (max-width: 768px) {
  .upgrade-section {
    min-height: auto;
    padding: 3rem 1.5rem;
  }

  .upgrade-content {
    padding: 2.5rem 1.5rem;
    max-width: 100%;
  }

  .upgrade-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .upgrade-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .upgrade-btn {
    width: 160px;
  }
}

/* Contact Section Mobile */
@media (max-width: 768px) {
  .contact-section {
    padding: 4rem 0 3rem;
  }

  .contact-container {
    width: 95%;
  }

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

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

  .contact-subtitle br {
    display: none;
  }

  .contact-input-wrapper {
    max-width: 100%;
  }

  .contact-input {
    padding: 1rem 3.8rem 1rem 1.4rem;
    font-size: 0.9rem;
  }

  .send-btn {
    width: 38px;
    height: 38px;
    right: 4px;
  }

  .send-btn img {
    width: 18px;
    height: 18px;
  }

  .contact-btn {
    width: 100%;
    text-align: center;
    padding: 0.85rem 2rem;
  }
}

/* Footer Mobile */
@media (max-width: 768px) {
  .footer-container {
    width: 95%;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-logo {
    width: 120px;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-column {
    text-align: center;
  }

  .footer-column h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .footer-column a {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
  }

  .footer-bottom-pill {
    width: 95%;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1.5rem;
    text-align: center;
  }

  .footer-bottom-pill p {
    font-size: 0.8rem;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-socials img {
    width: 32px;
    height: 32px;
  }
}

/* ==================== TABLET STYLES (769px - 1024px) ==================== */

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-container {
    width: 90%;
    gap: 3rem;
  }

  .hero-left {
    max-width: 55%;
  }

  .hero-h1 {
    font-size: 2rem;
    line-height: 2.8rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .insighthub-modules-container {
    width: 90%;
  }

  .insighthub-cards-container {
    gap: 1rem;
  }

  .insighthub-card {
    width: 48%;
  }

  .mindspace-main-container {
    width: 90%;
  }

  .digital-mentacy-container {
    width: 90%;
    gap: 4rem;
  }

  .digital-mentacy-left {
    width: 48%;
  }

  .digital-mentacy-right {
    width: 48%;
  }

  .testimonial-container {
    width: 90%;
  }

  .testimonial-cards {
    width: 420px;
  }

  .faq-container {
    width: 90%;
    gap: 4rem;
  }

  .footer-container {
    width: 90%;
  }
}

/* ==================== SMALL MOBILE (320px - 480px) ==================== */

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.5rem !important;
    line-height: 1.9rem !important;
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.5rem;
  }

  .hero-button {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .insighthub-h1 {
    font-size: 1.2rem;
    line-height: 1.8rem;
  }

  .insighthub-card {
    padding: 1.5rem 1.2rem;
  }

  .insighthub-card-title {
    font-size: 1.1rem;
  }

  .insighthub-card-description {
    font-size: 0.9rem;
  }

  .mindspace-main-container {
    padding: 1.5rem 1rem;
  }

  .mindspace-white-card {
    padding: 1.2rem;
  }

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

  .product-feature h4 {
    font-size: 1rem;
  }

  .product-feature p {
    font-size: 0.9rem;
  }

  .testimonial-heading {
    font-size: 1.4rem;
  }

  .faq-heading {
    font-size: 1.4rem;
  }

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

  .upgrade-description {
    font-size: 0.85rem;
  }

  .contact-title {
    font-size: 1.4rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==================== EXTRA SMALL MOBILE (max 360px) ==================== */

@media (max-width: 360px) {
  .navbar-mentacy .container-fluid {
    padding: 0 1rem;
  }

  .hero-container {
    width: 98%;
    margin: 1.5rem auto;
  }

  .hero-h1 {
    font-size: 1.3rem !important;
    line-height: 1.7rem !important;
  }

  .hero-button {
    padding: 9px 20px;
    font-size: 0.85rem;
  }

  .store-buttons img {
    height: 36px;
  }

  .insighthub-modules-container {
    width: 98%;
  }

  .mindspace-main-container {
    width: 98%;
    padding: 1.2rem 0.8rem;
  }

  .digital-mentacy-container {
    width: 98%;
  }

  .testimonial-container {
    width: 98%;
  }

  .faq-container {
    width: 98%;
  }

  .contact-container {
    width: 98%;
  }

  .footer-container {
    width: 98%;
  }
}

/* ==================== LANDSCAPE MOBILE ==================== */

@media (max-width: 768px) and (orientation: landscape) {
  .hero-container {
    flex-direction: row;
    align-items: center;
  }

  .hero-left {
    max-width: 50%;
  }

  .hero-image-wrapper {
    flex: 0 0 45%;
  }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */

@media (hover: none) and (pointer: coarse) {
  .hero-button:hover,
  .product-btn:hover,
  .contact-btn:hover,
  .upgrade-btn:hover {
    transform: none;
  }

  .store-buttons img:hover {
    transform: none;
    box-shadow: none;
    filter: none;
  }

  .insighthub-card:hover {
    transform: none;
  }

  .send-btn:hover {
    transform: translateY(-50%) scale(1);
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .navbar,
  .hero-buttons,
  .store-buttons,
  .testimonial-nav,
  .contact-input-wrapper,
  .contact-btn,
  .footer {
    display: none;
  }

  .hero-container,
  .insighthub-modules-container,
  .digital-mentacy-container {
    page-break-inside: avoid;
  }
}
