/*
 * FlowDrya Website - Responsive Styles
 * Mobile-First Approach
 */

/* ============================================
   MOBILE (0-576px) - Base Styles
   ============================================ */

/* ===========================================
   MOBILE HEADER/NAVBAR FIXES - Bootstrap 5 Compatible
   Works with both .main-header (home) and .main-header.header-static (inner pages)
   =========================================== */

@media (max-width: 991.98px) {

  /* ---- NAVBAR CONTAINER ---- */
  /* Allow wrapping so collapse goes below brand + toggler */
  .main-header .navbar > .container,
  .main-header .navbar > .container-fluid,
  .main-header.header-static .navbar > .container,
  .main-header.header-static .navbar > .container-fluid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* ---- NAVBAR BRAND (Logo) - stays LEFT ---- */
  .main-header .navbar-brand,
  .main-header.header-static .navbar-brand {
    order: 0 !important;
    flex: 0 1 auto !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }

  /* ---- NAVBAR TOGGLER (Burger) - stays RIGHT ---- */
  .main-header .navbar-toggler,
  .main-header.header-static .navbar-toggler {
    order: 1 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }

  /* Static header - dark toggler border */
  .main-header.header-static .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2) !important;
  }

  /* ---- NAVBAR COLLAPSE - goes BELOW on new row ---- */
  .main-header .navbar-collapse,
  .main-header.header-static .navbar-collapse {
    order: 2 !important;
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 0.75rem !important;
  }

  /* ---- NAVBAR PADDING ---- */
  .main-header .navbar,
  .main-header.header-static .navbar {
    padding: 0.75rem 0 !important;
  }

  /* ---- LOGO IMAGE SIZE ---- */
  .main-header .navbar-logo,
  .main-header.header-static .navbar-logo {
    height: 55px !important;
    max-width: 200px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* ---- HOME PAGE (transparent header) MOBILE MENU ---- */
  .main-header:not(.header-static) .navbar-collapse {
    background: rgba(30, 30, 30, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  }

  /* ---- HOME PAGE NAV LINKS ---- */
  .main-header:not(.header-static) .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .main-header:not(.header-static) .navbar-nav .nav-link:hover,
  .main-header:not(.header-static) .navbar-nav .nav-link:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
  }

  .main-header:not(.header-static) .navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
  }

  /* ---- STATIC HEADER (white background) MOBILE MENU ---- */
  .main-header.header-static .navbar-collapse {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  /* ---- STATIC HEADER NAV LINKS ---- */
  .main-header.header-static .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    color: var(--text-dark) !important;
  }

  .main-header.header-static .navbar-nav .nav-link:hover,
  .main-header.header-static .navbar-nav .nav-link:focus {
    background: rgba(0, 62, 1, 0.08) !important;
    color: var(--primary-green) !important;
  }

  .main-header.header-static .navbar-nav .nav-link.active {
    background: rgba(0, 62, 1, 0.12) !important;
    color: var(--primary-green) !important;
    font-weight: 600 !important;
  }

  /* ---- STATIC HEADER DROPDOWNS ---- */
  .main-header.header-static .dropdown-menu {
    background: rgba(248, 249, 250, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-left: 1rem !important;
    margin-top: 0.25rem !important;
  }

  .main-header.header-static .dropdown-item {
    color: var(--text-dark) !important;
    padding: 0.6rem 1rem !important;
  }

  .main-header.header-static .dropdown-item:hover,
  .main-header.header-static .dropdown-item:focus {
    background: rgba(0, 62, 1, 0.08) !important;
    color: var(--primary-green) !important;
  }

  /* ---- HOME PAGE DROPDOWNS (dark background) ---- */
  .main-header:not(.header-static) .dropdown-menu {
    background: rgba(40, 40, 40, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    margin-left: 1rem !important;
    margin-top: 0.25rem !important;
  }

  .main-header:not(.header-static) .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 1rem !important;
  }

  .main-header:not(.header-static) .dropdown-item:hover,
  .main-header:not(.header-static) .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
  }

  /* ---- CRITICAL: DROPDOWN SHOW STATE ---- */
  /* Ensure dropdowns display when JS adds .show class to parent or menu */
  .main-header .dropdown.show > .dropdown-menu,
  .main-header.header-static .dropdown.show > .dropdown-menu,
  .main-header .dropdown-menu.show,
  .main-header.header-static .dropdown-menu.show {
    display: block !important;
    position: static !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 0.5rem !important;
    padding: 0.5rem 0 !important;
    z-index: 1000 !important;
  }

  /* Ensure parent elements don't clip dropdown */
  .main-header .navbar-collapse,
  .main-header.header-static .navbar-collapse {
    overflow: visible !important;
  }

  .main-header .navbar-nav,
  .main-header.header-static .navbar-nav {
    overflow: visible !important;
  }

  .main-header .dropdown,
  .main-header.header-static .dropdown {
    position: relative !important;
    overflow: visible !important;
  }

  /* Dropdown toggle arrow rotation when open */
  .main-header .dropdown.show .dropdown-toggle .dropdown-arrow,
  .main-header.header-static .dropdown.show .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
    display: inline-block;
    transition: transform 0.2s ease;
  }

  /* Ensure dropdown items are visible */
  .main-header .dropdown.show > .dropdown-menu .dropdown-item,
  .main-header.header-static .dropdown.show > .dropdown-menu .dropdown-item,
  .main-header .dropdown-menu.show .dropdown-item,
  .main-header.header-static .dropdown-menu.show .dropdown-item {
    display: block !important;
  }

  /* Hide Bootstrap's default dropdown arrow on mobile */
  .main-header .dropdown-toggle::after,
  .main-header.header-static .dropdown-toggle::after {
    display: none !important;
  }
}

/* ---- EXTRA SMALL SCREENS (≤400px) ---- */
@media (max-width: 400px) {
  .main-header .navbar-logo,
  .main-header.header-static .navbar-logo {
    height: 45px !important;
    max-width: 160px !important;
  }

  .main-header .navbar-toggler,
  .main-header.header-static .navbar-toggler {
    padding: 0.4rem 0.6rem !important;
  }

  .main-header .navbar-toggler-icon,
  .main-header.header-static .navbar-toggler-icon {
    width: 1.2em !important;
    height: 1.2em !important;
  }

  .main-header .navbar > .container,
  .main-header.header-static .navbar > .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ===========================================
   MOBILE CONTENT IMPROVEMENTS
   =========================================== */

/* Container padding adjustments for mobile */
.container {
  padding-left: 16px;
  padding-right: 16px;
}

/* Reference and Article cards - full width on mobile */
.reference-cards-grid,
.article-cards-grid {
  gap: 1.25rem;
}

.reference-card,
.article-card {
  margin-bottom: 1rem;
}

/* Form elements - touch friendly */
.form-control,
.form-select {
  min-height: 48px;
  font-size: 16px !important; /* Prevent iOS zoom */
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

/* Contact form improvements */
.contact-form-section .form-control,
.contact-form-section .form-select,
.contact-form-section textarea {
  font-size: 16px !important;
}

/* Buttons full width on very small screens */
@media (max-width: 480px) {
  .hero-content .btn,
  .contact-cta .btn {
    width: 100%;
    max-width: 300px;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
  }

  .hero-content .btn + .btn {
    margin-top: 0.75rem;
  }
}

/* Typography - Mobile Optimized */
.hero-content h1 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  white-space: normal; /* Allow wrapping on mobile */
}

.hero-content .subheading {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* World section - mobile */
.world-main-headline {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.world-section-text {
  font-size: 1rem;
  line-height: 1.65;
}

/* World image grid - mobile: stack vertically */
.world-grid {
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: auto;
}

.world-grid-gallery {
  grid-template-columns: repeat(2, 1fr);
}

.world-grid-main {
  min-height: 300px;
}

.section-subtitle {
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Logo - Mobile sizing */
.navbar-brand .logo-text {
  font-size: 1.6rem;
}

.navbar-brand .logo-subtext {
  font-size: 1.3rem;
  font-weight: 300;
  margin-left: 0.2rem;
}

.navbar-logo {
  height: 50px;
}

.footer-logo {
  max-height: 40px;
}

/* Hero Section Mobile - Keep deeper hero (PDF requirement) */
.hero-section {
  min-height: 100vh;
}

/* Mobile background slides - disable parallax */
.hero-bg-slide {
  background-attachment: scroll !important; /* Fixed backgrounds can cause issues on mobile */
  background-position: center center !important;
}

/* Mobile video optimization */
.hero-video {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero-content {
  padding: 1.5rem 1rem;
  transform: translateY(0); /* Reset transform for better mobile centering */
}

/* Stack hero buttons on mobile */
.hero-content .btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0.75rem auto;
}

.hero-content .btn.ms-3 {
  margin-left: auto !important; /* Override Bootstrap margin */
}

/* Mobile Navigation */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid rgba(255, 255, 255, 0.3);
}

/* About Us Hero - Mobile */
.about-hero-overlay {
  padding: 0 0 0 1rem; /* Small left margin on mobile */
  bottom: 0.25rem;
}

.about-hero-title-overlay {
  font-size: 2rem;
}

.about-hero-content {
  padding-left: 1rem; /* Match overlay padding */
}

.about-hero-subtitle {
  font-size: 2rem;
}

.about-hero-image-wrapper {
  height: 70vh;
  min-height: 400px;
}

/* Mobile Sections */
.section {
  padding: 40px 0;
}

.intro-section {
  padding: 30px 0;
}

.intro-section p {
  font-size: 1rem;
  line-height: 1.7;
}

.intro-section .intro-lead {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
}

/* Section labels on mobile */
.section-label {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Product overlay text on mobile */
@media (max-width: 767px) {
  .product-overlay {
    padding: 1rem;
  }

  .product-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .product-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  /* Home product showcase - mobile pinned styles */
  #home-product-showcase .product-overlay {
    padding: 1.5rem 1rem;
  }

  #home-product-showcase .product-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  #home-product-showcase .product-overlay p {
    font-size: 1rem;
  }
}

/* Icon sections on mobile */
.icon-section .row {
  gap: 0;
}

/* FAQ section on mobile */
.faq-section .accordion-button {
  padding: 1rem;
  font-size: 0.95rem;
}

.faq-section .accordion-body {
  padding: 1rem;
  font-size: 0.9rem;
}

/* Mobile Buttons - Touch Friendly (min 44px height) */
/* Matching new_demo: consistent font-weight 600, font-size 0.9375rem */
.btn {
  min-height: 44px;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
}

.btn-lg {
  min-height: 48px;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Mobile Cards */
.icon-box {
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
}

.icon-box i {
  font-size: 2.5rem;
}

.icon-box h3 {
  font-size: 1.1rem;
}

.icon-box p {
  font-size: 0.95rem;
}

/* Material Cards Mobile */
.material-thumbnails {
  grid-template-columns: 1fr;
  grid-gap: 1rem;
}

.material-card h4 {
  font-size: 1.1rem;
}

/* Reference & Article Cards Mobile */
.reference-card,
.article-card,
.review-card {
  margin-bottom: 1.5rem;
}

.reference-card-body h4,
.article-card h4 {
  font-size: 1.15rem;
}

/* Product Showcase Mobile */
.product-showcase {
  padding: 1.5rem;
  margin: 1rem 0;
}

/* Contact CTA Mobile */
.contact-cta {
  padding: 60px 0;
  min-height: 400px;
}

.contact-cta h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.contact-cta p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .contact-cta .btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto !important;
  }
}

/* Footer Mobile */
.main-footer {
  padding: 40px 0 20px;
}

.footer-section {
  margin-bottom: 2rem;
  text-align: center;
}

.footer-section h5 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
  font-size: 0.9rem;
}

/* Footer logo mobile */
.footer-logo {
  max-height: 45px !important;
  width: auto;
  max-width: 160px;
  margin: 0 auto 1rem auto !important;
  display: block;
}

/* Footer links centered on mobile */
.footer-section ul {
  padding-left: 0;
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

/* Social links centered */
.social-links {
  justify-content: center;
}

/* Footer bottom centered */
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

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

.social-links a {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

/* Newsletter Mobile */
.newsletter-form .input-group {
  flex-wrap: nowrap;
}

.newsletter-input {
  font-size: 0.85rem !important;
  padding: 0.6rem 0.875rem !important;
}

.newsletter-btn {
  padding: 0.6rem 1rem !important;
  min-width: 50px;
}

/* Back to Top Mobile */
.back-to-top {
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
}

/* Google Translate Mobile */
.translate-dropdown {
  right: 0 !important;
  left: auto !important;
  min-width: 180px !important;
}

#google_translate_element select.goog-te-combo {
  font-size: 0.85rem !important;
  padding: 8px 10px !important;
}

/* Font Switcher Mobile - Left Side */
.font-switcher-container {
  bottom: 10px;
  left: 10px;
  opacity: 0.5;
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Mobile friendly tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Material thumbnails - Mobile (2 columns) */
.material-thumbnails {
  grid-template-columns: repeat(2, 1fr);
}

/* ============================================
   SMALL TABLETS (576px - 768px)
   ============================================ */
@media (min-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
    font-weight: 600;
  }

  .hero-content .subheading {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Logo - Small tablet sizing */
  .navbar-brand .logo-text {
    font-size: 1.8rem;
  }

  .navbar-brand .logo-subtext {
    font-size: 1.45rem;
    font-weight: 300;
    margin-left: 0.22rem;
  }

  /* Material thumbnails - Force 5 columns from small tablets+ (PDF requirement) */
  .material-thumbnails {
    grid-template-columns: repeat(5, 1fr);
  }

  /* About Us Hero - Small Tablet */
  .about-hero-overlay {
    padding: 0 0 0 1.5rem;
  }

  .about-hero-title-overlay {
    font-size: 2.5rem;
  }

  .about-hero-content {
    padding-left: 1.5rem;
  }

  .about-hero-subtitle {
    font-size: 2.5rem;
  }

  .about-hero-image-wrapper {
    height: 80vh;
  }
}

/* ============================================
   TABLETS (768px - 992px)
   ============================================ */
@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    white-space: nowrap; /* Keep title on one line for tablets+ */
  }

  .hero-content .subheading {
    font-size: 1.2rem;
  }

  /* Restore inline buttons for tablets+ */
  .hero-content .btn {
    display: inline-block;
    width: auto;
    margin: 0.5rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  /* World section - tablet */
  .world-main-headline {
    font-size: var(--text-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
  }

  .world-section-text {
    font-size: var(--text-body);
    line-height: var(--leading-relaxed);
  }

  /* World image grid - tablet: side by side */
  .world-grid {
    grid-template-columns: 1fr 2fr;
    min-height: 450px;
  }

  .world-grid-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .world-grid-main {
    min-height: auto;
  }

  .section-subtitle {
    font-size: 1.125rem;
  }

  .section {
    padding: 80px 0;
  }

  .material-thumbnails {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Back to Top - Tablet */
  .back-to-top {
    width: 50px;
    height: 50px;
    bottom: 25px;
    right: 25px;
  }

  /* NOTE: Navbar still collapsed at 768px (expands at 992px with navbar-expand-lg) */
  /* Logo sizes for tablet - still mobile menu but slightly larger logo */
  .main-header .navbar-logo,
  .main-header.header-static .navbar-logo {
    height: 50px !important;
    max-width: 180px !important;
  }

  .navbar-brand .logo-text {
    font-size: 2.2rem;
  }

  .navbar-brand .logo-subtext {
    font-size: 1.75rem;
    font-weight: 300;
    margin-left: 0.25rem;
  }

  /* Footer - Reset to left aligned for tablets+ */
  .footer-section {
    text-align: left;
  }

  .footer-logo {
    margin: 0 0 1rem 0 !important;
    display: inline-block;
  }

  .social-links {
    justify-content: flex-start;
  }

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

  /* Ensure header content is above the background layer */
  .navbar-nav,
  .navbar-brand {
    position: relative;
    z-index: 2;
  }

  /* About Us Hero - Tablet */
  .about-hero-overlay {
    padding: 0 0 0 2rem;
    bottom: 0.5rem;
  }

  .about-hero-title-overlay {
    font-size: 3.5rem;
  }

  .about-hero-content {
    padding-left: 2rem;
  }

  .about-hero-subtitle {
    font-size: 3.5rem;
  }

  .about-hero-image-wrapper {
    height: 90vh;
  }
}

/* ============================================
   LAPTOPS / DESKTOPS (992px+) - Full Navigation
   ============================================ */
@media (min-width: 992px) {

  /* ---- RESET ALL MOBILE NAVBAR STYLES ---- */
  .main-header .navbar,
  .main-header.header-static .navbar {
    padding: 1.2rem 0 !important;
  }

  .main-header .navbar > .container,
  .main-header.header-static .navbar > .container {
    flex-wrap: nowrap !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .main-header .navbar-brand,
  .main-header.header-static .navbar-brand {
    margin-right: 0 !important;
  }

  .main-header .navbar-collapse,
  .main-header.header-static .navbar-collapse {
    flex-basis: auto !important;
    width: auto !important;
    margin-top: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Reset navbar logo for desktop - full size */
  .main-header .navbar-logo,
  .main-header.header-static .navbar-logo {
    height: 60px !important;
    max-width: none !important;
    width: auto !important;
  }

  /* Reset dropdown menus for desktop */
  .main-header .dropdown-menu,
  .main-header.header-static .dropdown-menu {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }

  .hero-content h1 {
    font-size: 2.8rem;
    font-weight: 600;
    white-space: nowrap; /* Keep title on one line for desktops+ */
  }

  .hero-content .subheading {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  /* World section - desktop */
  .world-main-headline {
    font-size: var(--text-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.01em;
  }

  .world-section-text {
    font-size: var(--text-body);
    font-weight: var(--weight-normal);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
  }

  .section-subtitle {
    font-size: 1.2rem;
  }

  .icon-box {
    padding: 1.5rem 1.25rem;
  }

  /* About Us Hero - Desktop */
  .about-hero-title-overlay {
    font-size: 4rem;
  }

  .about-hero-subtitle {
    font-size: 4rem;
  }

  .about-hero-image-wrapper {
    height: 100vh;
  }
}

/* ============================================
   LARGE DESKTOPS (1200px+)
   ============================================ */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 100vh;
  }

  .material-thumbnails {
    grid-template-columns: repeat(5, 1fr);
  }

  .contact-cta {
    padding: 120px 0;
  }

  /* About Us Hero - Large Desktop */
  .about-hero-title-overlay {
    font-size: 4.5rem;
  }

  .about-hero-subtitle {
    font-size: 4.5rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .main-header,
  .main-footer,
  .font-switcher-container,
  #google_translate_element,
  .hero-video-bg,
  .btn {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ============================================
   REDUCED MOTION (Accessibility)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   ADDITIONAL MOBILE IMPROVEMENTS
   ============================================ */

/* Mobile specific - very small screens (max 375px) */
@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  /* Smaller logo for very small screens */
  .navbar-brand .logo-text {
    font-size: 1.4rem;
  }

  .navbar-brand .logo-subtext {
    font-size: 1.15rem;
    font-weight: 300;
    margin-left: 0.18rem;
  }
  
  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 400;
  }
  
  .icon-box {
    padding: 1.25rem 0.75rem;
  }
  
  .newsletter-input {
    font-size: 0.8rem !important;
  }
  
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 15px;
    right: 15px;
  }

  .back-to-top i {
    font-size: 1rem;
  }
}

/* Mobile landscape orientation */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-section {
    min-height: 70vh;
  }

  .hero-content {
    transform: translateY(-20px); /* Slight upward adjustment for landscape */
  }
  
  .contact-cta {
    min-height: 300px;
    padding: 40px 0;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .nav-link,
  .btn,
  .social-links a,
  .material-card,
  .reference-card,
  .article-card {
    -webkit-tap-highlight-color: rgba(70, 110, 70, 0.2);
  }
  
  /* Disable hover effects on touch devices */
  .icon-box:hover::before,
  .material-card:hover::after {
    display: none;
  }
  
  /* Simplify animations for better performance */
  * {
    animation-duration: 0.3s !important;
  }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Fix iOS input zoom */
  .newsletter-input,
  input[type="email"],
  input[type="text"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }
  
  /* Fix iOS momentum scrolling */
  body {
    -webkit-overflow-scrolling: touch;
  }
}

/* Android Chrome specific */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input {
    font-size: 16px;
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Mobile Safari fixes */
@supports (-webkit-touch-callout: none) {
  .hero-video-bg {
    background-size: cover;
    background-position: center;
  }
}
