/* ========================================
   CCTV/STRUCTURED CABLING MOBILE CSS
   Works with universal mobile JavaScript
   ======================================== */

/* ========================================
   TABLET (992px and below)
   ======================================== */
@media (max-width: 992px) {
  /* Hero Section - Tablet */
  .structured-hero-left,
  .build-left {
    padding: 60px 50px;
    margin-left: 50px;
    max-width: 550px;
  }
  
  .structured-hero-left h1 {
    font-size: 48px;
  }
  
  .structured-hero-left p {
    font-size: 18px;
  }
  
  .build-left h2 {
    font-size: 42px;
  }
  
  .build-left h3 {
    font-size: 17px;
  }
  
  .build-left p {
    font-size: 17px;
  }
  
  .structured-hero-background::after,
  .build-right::before {
    width: 70%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.3));
  }
  
  /* Structured Section - Tablet */
  .structured-section h2 {
    font-size: 32px;
    margin-bottom: 45px;
  }
  
  .structured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
  
  .structured-card {
    padding: 32px 25px;
  }
}

/* ========================================
   MOBILE LARGE (768px and below)
   ======================================== */
@media (max-width: 768px) {
  /* Hero Section - Mobile */
  .structured-hero-section,
  .build-section {
    min-height: auto;
  }
  
  .structured-hero-content,
  .build-content {
    min-height: 600px;
    padding: 30px 0;
  }
  
  .structured-hero-left,
  .build-left {
    padding: 40px 30px;
    margin: 25px;
    margin-left: 25px;
    max-width: calc(100% - 50px);
    
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  }
  
  .structured-hero-left h1 {
    font-size: 36px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: none;
  }
  
  .structured-hero-left p {
    font-size: 17px;
    color: #ffffff;
    line-height: 1.6;
    text-shadow: none;
    margin-bottom: 30px;
  }
  
  .build-left h2 {
    font-size: 34px;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: none;
  }
  
  .build-left h3 {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
  }
  
  .build-left p {
    font-size: 17px;
    line-height: 1.6;
    color: #ffffff;
  }
  
  .structured-hero-background::after,
  .build-right::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
  }
  
  /* Structured Section - Mobile */
  .structured-section {
    padding: 80px 0;
  }
  
  .structured-section h2 {
    font-size: 30px;
    margin-bottom: 45px;
    padding: 0 25px;
    line-height: 1.3;
  }
  
  .structured-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .structured-card {
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  }
  
  .structured-card:hover {
    transform: translateY(-5px);
  }
  
  .structured-icon {
    width: 75px;
    height: 75px;
    margin-bottom: 20px;
  }
  
  .structured-icon img {
    width: 48px;
    height: 48px;
  }
  
  .structured-card h4 {
    font-size: 18px;
    min-height: auto;
    margin-bottom: 12px;
  }
  
  .structured-card p {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* ========================================
   PORTRAIT MODE OPTIMIZATION
   ======================================== */
@media (max-width: 768px) and (orientation: portrait) {
  /* Hero sections optimized for portrait */
  .structured-hero-content,
  .build-content {
    min-height: 700px;
    padding: 40px 0;
  }
  
  .structured-hero-left,
  .build-left {
    padding: 45px 35px;
    margin: 30px;
    margin-left: 30px;
  }
  
  .structured-hero-left h1 {
    font-size: 38px;
  }
  
  .structured-hero-left p {
    font-size: 18px;
  }
  
  .build-left h2 {
    font-size: 36px;
  }
  
  .build-left h3 {
    font-size: 17px;
  }
  
  .build-left p {
    font-size: 18px;
  }
  
  /* Structured section for portrait scrolling */
  .structured-section {
    padding: 90px 0;
  }
  
  .structured-grid {
    gap: 30px;
  }
  
  .structured-card {
    padding: 40px 35px;
    min-height: 220px;
  }
}

/* ========================================
   MOBILE SMALL (576px and below)
   ======================================== */
@media (max-width: 576px) {
  .structured-hero-left h1 {
    font-size: 30px;
  }
  
  .structured-hero-left p {
    font-size: 16px;
  }
  
  .build-left h2 {
    font-size: 30px;
  }
  
  .build-left h3 {
    font-size: 15px;
  }
  
  .build-left p {
    font-size: 16px;
  }
  
  .structured-hero-left,
  .build-left {
    padding: 35px 25px;
    margin: 20px;
    margin-left: 20px;
  }
  
  .structured-section h2 {
    font-size: 26px;
    padding: 0 20px;
  }
  
  .structured-card {
    padding: 32px 28px;
  }
  
  .structured-icon {
    width: 70px;
    height: 70px;
  }
  
  .structured-icon img {
    width: 45px;
    height: 45px;
  }
  
  .structured-card h4 {
    font-size: 17px;
  }
  
  .structured-card p {
    font-size: 14px;
  }
}

/* ========================================
   PORTRAIT SMALL MOBILE
   ======================================== */
@media (max-width: 576px) and (orientation: portrait) {
  .structured-hero-content,
  .build-content {
    min-height: 650px;
  }
  
  .structured-card {
    min-height: 200px;
  }
}

/* ========================================
   LANDSCAPE MOBILE
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .structured-hero-content,
  .build-content {
    min-height: auto;
    padding: 20px 0;
  }
  
  .structured-hero-left,
  .build-left {
    padding: 30px 25px;
    margin: 15px;
    margin-left: 15px;
  }
  
  .structured-hero-left h1 {
    font-size: 28px;
    margin-bottom: 15px;
  }
  
  .structured-hero-left p {
    font-size: 15px;
    margin-bottom: 20px;
  }
  
  .build-left h2 {
    font-size: 28px;
    margin-bottom: 12px;
  }
  
  .build-left h3 {
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .build-left p {
    font-size: 15px;
  }
  
  .structured-section {
    padding: 60px 0;
  }
  
  .structured-card {
    min-height: auto;
    padding: 28px 25px;
  }
}

/* ========================================
   TOUCH OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  .structured-card:hover {
    transform: none;
  }
  
  .structured-card:active {
    transform: scale(0.98);
  }
  
  .btn-secondary {
    min-height: 44px;
    min-width: 120px;
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .structured-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  /* Optimize background images */
  .structured-hero-background img,
  .build-right img {
    will-change: transform;
  }
  
  /* Smooth font rendering */
  .structured-hero-left,
  .build-left {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}