/* ===========================================
   MOBILE & TABLET RESPONSIVE STYLES
   GHS Website - Mobile & Tablet Optimizations
   =========================================== */

/* ===========================================
   TABLET STYLES (768px - 1024px)
   =========================================== */

@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    padding: 0 30px;
  }

  .hero-logo {
    left: 60px;
  }

  .hero-logo-image {
    width: 200px;
    max-width: 200px;
  }

  .feature-blocks {
    gap: 35px;
  }

  .feature-block {
    max-width: 250px;
    height: 250px;
  }

  .why-choose-content {
    gap: 50px;
  }

  .circular-image {
    width: 250px;
    height: 250px;
  }

  .service-card {
    flex: 0 0 320px;
    min-width: 320px;
  }

  .about-logo-container {
    width: 400px;
    height: 400px;
  }

  .contact-content {
    gap: 60px;
  }
}

/* ===========================================
   MOBILE STYLES (768px and below)
   =========================================== */

@media (max-width: 768px) {
  /* Mobile Navigation Enhancements */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(176, 168, 168, 0.075);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: none;
  }
  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("assets/bg/bill.png") center/cover no-repeat;
    background-size: contain;
    background-position: center;
    filter: brightness(2);
    z-index: -2;
  }
  .nav-container {
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  .nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
  }

  .nav-menu a {
    text-decoration: none;
    color: var(--nav-color, #ffffff);
    transition: color 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    outline: none;
    border: none;
    box-shadow: none;
  }

  /* Body blur when mobile menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
  }

  .nav-menu a:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.05);
  }

  .nav-phone {
    display: none;
  }

  /* Hero Section Mobile */
  .hero {
    position: relative; /* was fixed on desktop; allow normal flow on mobile */
    height: 65vh;
    /* reduce height to avoid large empty areas */
  }

  /* remove extra spacer below fixed hero on desktop */
  .content-spacer {
    display: none;
  }

  .hero-logo {
    background-color: red;
    right: 160px;
    left: auto;
    top: 10%;
  }

  .hero-logo-image {
    top: 24%;
    left: 45%;
    position: absolute;
  }

  .hero-content {
    padding: 16px;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    padding: 14px 22px;
    font-size: 16px;
  }

  /* Feature Blocks Mobile */
  /* Feature Blocks */
  .features {
    padding: 80px 0;
    background: #ffffff;
  }

  .feature-blocks {
    flex-direction: column;
    align-content: center;
    justify-content: center;
    gap: 40px;
    width: 72vw;
    margin-left: 55px;
    padding: 0 20px;
  }

  .feature-block {
    width: 100%;
    height: 280px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transform: scale(0) translateY(50px);
    transition: all 0.4s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
  }

  .feature-block.animate {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .feature-block:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  }

  .feature-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    overflow: hidden;
  }

  .feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .feature-block:hover .feature-image img {
    transform: scale(1.1);
  }

  .feature-block h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
  }

  /* Why Choose Us Mobile */
  .why-choose-us {
    padding: 60px 0;
  }

  .why-choose-content {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .circular-image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    margin-bottom: 10px;
  }

  .feature-point {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .feature-icon {
    margin: 0 auto;
  }

  /* Services Mobile - Enhanced for Image Visibility */
  .our-services {
    padding: 10px 0;
  }

  .services-scroll-container {
    padding: 0 20px;
    margin: 0 -20px;
  }

  .services-grid {
    gap: 20px;
    padding: 20px 0;
  }

  .service-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 90vw;
  }

  .service-image {
    height: 180px;
    overflow: hidden;
  }

  .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .service-content {
    padding: 20px;
  }

  .service-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .service-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* About Us Mobile */
  .about-us {
    padding: 60px 0;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .about-left {
    order: 2;
    display: flex; /* center the column */
    flex-direction: column;
    align-items: center;
  }

  .about-right {
    order: 1;
    align-items: center;
  }

  .about-bottom-row {
    display: flex; /* ensure flex container */
    gap: px;
    flex-wrap: wrap;
    justify-content: center; /* center items */
  }

  .about-service-box {
    width: 120px;
    height: 120px;
    margin: 6px;
    position: relative; /* ensure child absolute image anchors to box */
  }

  /* Make top box slightly larger for hierarchy */
  .about-service-box.box-1 {
    width: 150px;
    height: 150px;
  }

  .about-service-overlay span {
    font-size: 10px;
    padding: 8px 5px 5px;
  }

  .about-service-overlay {
    padding: 15px 8px 8px;
  }

  .about-logo-container {
    width: 250px;
    height: 250px;
    margin: 0 0px;
  }

  /* Contact Section Mobile */
  .contact-section {
    padding: 60px 0;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 15px;
  }

  .contact-subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .contact-form {
    padding: 25px;
    margin: 0 10px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }

  /* Clients Mobile */
  .our-clients {
    padding: 60px 0;
  }

  .clients-scroll-container {
    padding: 0 10px;
    margin: 0 20px;
  }

  .clients-grid {
    gap: 15px;
    padding: 20px 0;
  }

  .client-logo {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex: 0 0 200px;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
  }

  .client-logo-image {
    height: 70px;
  }

  .logo-placeholder {
    font-size: 1rem;
  }

  /* Footer Mobile */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-middle {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    text-align: center;
  }
  .column-1 {
    grid-column: span 3;
    width: 300px;
    margin-bottom: 20px;
  }
  .footer-column h4 {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
  }
  .box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .footer-column {
    position: relative;
    padding: 0px 3px;
    margin-top: 15px;
    font-size: small;
    width: 100%;
  }

  .footer-column ul {
    display: grid;
    gap: 0px 15px;
    grid-template-columns: 1fr 1fr;
    font-size: small;
    margin-left: 10px;
    text-align: left;
    width: fit-content;
  }

  .footer-column ul li {
    width: fit-content;
  }

  .footer-bottom {
    margin-top: 20px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .social-links {
    position: absolute;
    top: 76%;
    right: 1px;
    justify-content: end;
  }

  /* Section Titles Mobile */
  .section-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .section-subtitle {
    font-size: 1rem;
    padding: 0 20px;
  }

  /* Container Mobile */
  .container {
    padding: 0 20px;
  }
}

/* ===========================================
   SMALL MOBILE STYLES (480px and below)
   =========================================== */

@media (max-width: 480px) {
  .hero {
    height: 60vh;
    min-height: 380px;
  }
  .hero-background {
    background-size: cover !important;
  }
  .content-spacer {
    display: none;
  }
  .hero-content {
    bottom: 20px;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.1;
  }

  .hero-logo {
    right: 15px;
    left: auto;
    top: 35%;
  }

  .hero-logo-image {
    width: 350px;
    max-width: 120px;
  }

  .hero-buttons {
    gap: 12px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2px;
  }
  .section-header {
    margin-bottom: 20px;
  }
  .section-subtitle {
    font-size: 0.9rem;
    padding: 0 15px;
  }

  /* Feature Blocks Small Mobile */
  .features {
    padding: 40px 0;
  }

  .feature-blocks {
    gap: 20px;
    padding: 0 15px;
  }

  .feature-block {
    max-width: 300px;
    height: 280px;
  }

  .feature-block h3 {
    font-size: 1.1rem;
    padding: 15px;
  }

  /* Why Choose Us Small Mobile */
  .why-choose-us {
    padding: 40px 0;
  }

  .circular-image {
    width: 180px;
    height: 180px;
  }

  .feature-point {
    gap: 4px;
  }

  .feature-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .feature-text h4 {
    font-size: 1.2rem;
  }

  .feature-text p {
    font-size: 0.9rem;
  }

  /* Services Small Mobile - Optimized for Image Visibility */
  .our-services {
    padding: 10px 0;
  }

  .services-scroll-container {
    padding: 0 15px;
    margin: 0 -15px;
  }

  .services-grid {
    gap: 15px;
    padding: 15px 0;
  }

  .service-card {
    flex: 0 0 260px;
    min-width: 260px;
    max-width: 85vw;
  }

  .service-image {
    height: 160px;
  }

  .service-content {
    padding: 15px;
  }

  .service-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .service-content p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  /* About Us Small Mobile */
  .about-us {
    padding: 40px 0;
  }

  .about-layout {
    gap: 0px;
  }

  .about-left {
    align-items: center;
  }

  .about-bottom-row {
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  .about-service-box {
    width: 110px;
    height: 110px;
    margin: 5px;
  }

  .about-service-box.box-1 {
    width: 140px;
    height: 140px;
  }

  .about-service-overlay span {
    font-size: 9px;
    padding: 6px 3px 3px;
  }

  .about-service-overlay {
    padding: 12px 6px 6px;
  }

  .about-logo-container {
    width: 200px;
    height: 200px;
  }

  /* Contact Small Mobile */
  .contact-section {
    padding: 20px 0;
  }

  .contact-title {
    font-size: 1.8rem;
  }

  .contact-subtitle {
    font-size: 0.9rem;
  }

  .contact-form {
    padding: 20px;
    margin: 0 5px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px;
    font-size: 16px;
  }

  /* Clients Small Mobile */
  .our-clients {
    padding: 40px 0;
  }

  .clients-grid {
    gap: 12px;
    padding: 15px 0;
  }

  .client-logo {
    flex: 0 0 120px;
    min-width: 120px;
    padding: 12px;
    height: 90px;
  }

  .client-logo-image {
    max-height: 50px;
  }

  .logo-placeholder {
    font-size: 0.9rem;
  }

  /* Footer Small Mobile */
  .footer {
    padding: 7px 0 15px;
  }

  .footer-middle {
    gap: 25px;
  }

  .footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .footer-column p,
  .footer-column ul li {
    font-size: 0.85rem;
  }

  .contact-details p {
    font-size: 0.75rem;
    margin-left: 15px;
    margin-bottom: 8px;
  }

  .social-link {
    width: 35px;
    height: 35px;
  }

  .social-link i {
    font-size: 0.9rem;
  }

  /* Container Small Mobile */
  .container {
    padding: 0 15px;
  }

  /* Modal Small Mobile */
  .modal-content {
    margin: 5% auto;
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-form {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions .btn {
    width: 100%;
    padding: 12px;
  }
}

/* ===========================================
   EXTRA SMALL MOBILE STYLES (360px and below)
   =========================================== */

@media (max-width: 360px) {
  .hero {
    height: 55vh;
    min-height: 340px;
  }
  .hero-background {
    background-size: cover !important;
  }
  .content-spacer {
    display: none;
  }
  .hero-content {
    bottom: 16px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-logo {
    right: 10px;
    left: auto;
    top: 30%;
  }

  .hero-logo-image {
    width: 380px;
    max-width: 100px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .feature-block {
    max-width: 280px;
    height: 240px;
  }

  .service-card {
    flex: 0 0 240px;
    min-width: 240px;
  }

  .service-image {
    height: 140px;
  }

  .about-service-box {
    width: 100px;
    height: 100px;
  }

  .about-service-box.box-1 {
    width: 120px;
    height: 120px;
  }

  .about-service-overlay span {
    font-size: 8px;
    padding: 5px 2px 2px;
  }

  .about-service-overlay {
    padding: 10px 5px 5px;
  }

  .about-logo-container {
    width: 180px;
    height: 180px;
  }

  .circular-image {
    width: 160px;
    height: 160px;
  }

  .client-logo {
    flex: 0 0 110px;
    min-width: 110px;
    padding: 10px;
    height: 80px;
  }

  .client-logo-image {
    max-height: 45px;
  }

  .container {
    padding: 0 10px;
  }
}

/* ===========================================
   MOBILE-SPECIFIC ENHANCEMENTS
   =========================================== */

/* Touch-friendly interactions */
@media (max-width: 768px) {
  /* Improve touch targets */
  .btn,
  .nav-menu a,
  .hamburger {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better image loading and visibility */
  .service-image img,
  .feature-image img,
  .circular-image img,
  .about-logo-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Improve scrolling performance */
  .services-scroll-container,
  .clients-scroll-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Better text readability */
  .service-content p,
  .feature-text p,
  .contact-subtitle,
  .section-subtitle {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Enhanced focus states for accessibility */
  .btn:focus,
  .nav-menu a:focus,
  .form-group input:focus,
  .form-group textarea:focus {
    outline: 3px solid #e74c3c;
    outline-offset: 2px;
  }

  /* Better modal experience on mobile */
  .modal-content {
    border-radius: 0;
    margin: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 10001;
    background: white;
    border-bottom: 1px solid #e9ecef;
  }

  /* Floating WhatsApp button mobile optimization */
  .floating-whatsapp {
    bottom: 15px;
    right: 15px;
  }

  .floating-whatsapp a {
    width: 55px;
    height: 55px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  }

  .floating-whatsapp i {
    font-size: 26px;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: 100vh;
  }

  .hero-background {
    background-size: cover;
    background-position: center center;
  }

  .hero-logo {
    right: 15px;
    left: auto;
    top: 50%;
  }

  .hero-logo-image {
    width: 300px;
    max-width: 120px;
  }

  .hero-content {
    bottom: 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .feature-blocks {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .feature-block {
    max-width: 200px;
    height: 200px;
  }

  .circular-image {
    width: 150px;
    height: 150px;
  }

  .about-logo-container {
    width: 200px;
    height: 200px;
  }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-image img,
  .feature-image img,
  .circular-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
