/* Responsive rules moved from style.css */

/* NAVBAR - Hamburger and mobile nav */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #003087;
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  /* position toggle on the right */
  .navbar .nav-container {
    position: relative;
  }

  .nav-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* make nav visible on mobile */
  .navbar nav {
    display: block;
    position: relative;
    z-index: 1350;
  }

  /* sidebar off-canvas (hidden by default) */
  .navbar ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -280px;
    /* hidden */
    height: 100vh;
    width: 260px;
    background: white;
    padding: 80px 16px 20px 16px;
    gap: 18px;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
    border-radius: 0;
    z-index: 1200;
    transition: right 320ms cubic-bezier(.2, .8, .2, 1);
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
  }

  .navbar ul li a {
    display: block;
    padding: 10px 12px;
    font-size: 1em;
    pointer-events: auto;
    cursor: pointer;
  }

  /* overlay (hidden until nav open) - controlled by `.visible` class */
  .nav-overlay {
    display: none;
  }

  .nav-overlay.visible {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.107);
    z-index: 1100;
    cursor: pointer;
  }

  /* when nav open, slide sidebar in (sidebar above overlay) */
  body.nav-open .navbar ul {
    right: 0;
    z-index: 1200;
  }
}

@media (max-width: 480px) {
  .nav-toggle {
    display: block;
  }

  .navbar .nav-container {
    position: relative;
  }

  .nav-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* make nav visible on mobile */
  .navbar nav {
    display: block;
    position: relative;
    z-index: 1350;
  }

  /* slightly narrower sidebar on small phones */
  .navbar ul {
    width: 220px;
    right: -240px;
    padding-top: 70px;
    z-index: 1200;
    pointer-events: auto;
  }

  .navbar ul li a {
    pointer-events: auto;
    cursor: pointer;
  }

  /* overlay only on left side of sidebar */
  .nav-overlay.visible {
    right: 220px;
  }

  body.nav-open .navbar ul {
    right: 0;
  }
}

/* HOME SECTION (tablet / mobile) */
@media (max-width: 768px) {
  .home {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .home-left {
    width: 100%;
    padding: 100px 20px 40px 20px;
  }

  .home-content h1 {
    font-size: 2em;
  }

  .home-content p {
    font-size: 1em;
  }

  .home-floating-logo {
    width: 420px;
    display: block;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto 12px auto;
    opacity: 1 !important;
  }

  /* hide fiber animation on tablet to avoid watermark/background effect */
  .fiber {
    display: none;
  }
}

@media (max-width: 480px) {
  .home-left {
    padding: 80px 15px 30px 15px;
  }

  .home-content h1 {
    font-size: 1.5em;
  }

  .home-content p {
    font-size: 0.9em;
  }

  /* keep logo visible but smaller and centered */
  .home-floating-logo {
    width: 240px;
    display: block;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto 15px auto;
    opacity: 1 !important;
    pointer-events: none;
  }

  /* hide fiber animation on small devices */
  .fiber {
    display: none;
  }
}

/* WHY CHOOSE US */
@media (max-width: 768px) {
  .why-choose-us-section {
    padding: 60px 20px;
  }

  .why-choose-us-grid {
    gap: 20px;
  }

  .why-choose-us-card {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .why-choose-us-section {
    padding: 40px 15px;
  }

  .why-choose-us-card {
    width: 100%;
    padding: 20px;
  }

  .why-choose-us-card h4 {
    font-size: 0.95em;
  }

  .why-choose-us-card p {
    font-size: 0.9em;
  }
}

/* SERVICES */
@media (max-width: 768px) {
  .services-section {
    padding: 60px 20px;
  }

  .services-grid {
    gap: 20px;
  }

  .services-card {
    width: 100%;
    max-width: 320px;
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .services-section {
    padding: 40px 15px;
  }

  .services-card {
    width: 100%;
    padding: 20px;
  }

  .services-card h4 {
    font-size: 0.95em;
  }

  .services-card p {
    font-size: 0.9em;
  }
}

/* OUR PARTNERS */
@media (max-width: 768px) {
  .our-partners-section {
    padding: 60px 20px;
    background-attachment: scroll;
  }

  .carousel-wrapper {
    gap: 10px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .our-partners-card {
    width: 150px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .our-partners-section {
    padding: 60px 20px;
    background-attachment: scroll;
    padding: 80px 0;
    background-image: url('../img/fiber-optic.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
  }

  .carousel-wrapper {
    flex-direction: column;
    gap: 15px;
  }

  .carousel-btn {
    display: none;
  }

  .carousel-container {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    touch-action: pan-y pinch-zoom;
  }

  .carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    gap: 0;
    /* Remove gap on mobile */
  }

  .our-partners-card {
    flex: 0 0 100%;
    /* Show exactly 1 card */
    width: 100%;
    max-width: 100%;
    /* Take full container width */
    height: auto;
    min-height: 180px;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
    /* Remove any margin */
  }

  .our-partners-card h4 {
    font-size: 0.95em;
  }

  /* Make dots more visible on mobile */
  .carousel-dots {
    margin-top: 20px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
    margin: 0 6px;
  }
}

/* AREA CHECKER */
@media (max-width: 768px) {
  .area-checker-section {
    padding: 50px 20px;
    height: 600px;
    max-height: 700px;
  }

  .checker-form {
    gap: 10px;
  }

  .checker-form select,
  .checker-form input {
    width: 100%;
    max-width: 250px;
  }

  .checker-form button {
    width: 100%;
    max-width: 100px;
  }

  .checker-form button:hover {
    background-color: #003087;
  }


}

@media (max-width: 480px) {
  .area-checker-section {
    padding: 40px 15px 100px 15px;
    height: 600px;
    max-height: 700px;
  }

  .area-checker-section h2 {
    font-size: 1.5em;
  }

  .area-checker-section p {
    font-size: 0.9em;
  }

  .checker-form {
    flex-direction: column;
    gap: 10px;
  }

  .checker-form select,
  .checker-form input {
    width: 100%;
    padding: 12px 15px;
  }

  .checker-form button {
    width: 100%;
    padding: 12px 20px;
  }

  .checker-form button:hover {
    background-color: #003087;
  }
}

/* PRICING */
@media (max-width: 768px) {
  .pricing-section {
    padding: 60px 20px;
  }

  .pricing-grid {
    gap: 15px;
    margin-bottom: 50px;
  }

  .price-card {
    width: 100%;
    max-width: 280px;
    padding: 30px;
  }

  .price-card.featured {
    transform: scale(1.05);
  }

  .price-card h3 {
    font-size: 2em;
  }
}

@media (max-width: 480px) {
  .pricing-section {
    padding: 40px 15px;
  }

  .pricing-grid {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .price-card {
    width: 100%;
    padding: 25px;
  }

  .price-card.featured {
    transform: scale(1);
  }

  .price-card h3 {
    font-size: 1.5em;
  }

  .price-card p {
    font-size: 0.95em;
  }

  .apply-button {
    display: flex;
    justify-content: center;
  }

  .apply-button button {
    width: 100%;
    max-width: 300px;
  }
}

/* FAQ */
@media (max-width: 768px) {
  .faq-section {
    padding: 60px 20px;
  }

  .faq-layout {
    flex-direction: column;
    gap: 30px;
  }

  .faq-left {
    width: 100%;
    margin-top: 0;
  }

  .faq-right {
    width: 100%;
    max-height: none;
    overflow-y: visible;
  }

  .faq-left h2 {
    font-size: 2em;
  }
}

@media (max-width: 480px) {
  .faq-section {
    padding: 40px 15px;
  }

  .faq-left h2 {
    font-size: 1.5em;
  }

  details {
    padding: 15px;
    margin-bottom: 10px;
  }

  summary {
    font-size: 0.95em;
  }

  details p {
    font-size: 0.9em;
  }
}

/* VIDEO GUIDE */
@media (max-width: 768px) {
  .video-guide-section {
    padding: 60px 20px;
    background-attachment: scroll;
    padding: 80px 0;
    background-image: url('../img/server.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;

  }

  .video-guide-grid {
    gap: 20px;
  }

  .video-guide-placeholder {
    width: 100%;
    max-width: 400px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .video-guide-section {
    padding: 40px 15px;
  }

  .video-guide-grid {
    flex-direction: column;
    gap: 15px;
  }

  .video-guide-placeholder {
    width: 100%;
    height: 200px;
    font-size: 0.9em;
  }
}

/* GUIDE */
@media (max-width: 768px) {
  .guide-section {
    padding: 60px 20px;
  }

  .guide-steps {
    max-width: 100%;
    margin-top: 30px;
  }

  .step h4 {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .guide-section {
    padding: 40px 15px;
  }

  .guide-steps {
    max-width: 100%;
    margin-top: 20px;
  }

  .guide-steps a {
    text-decoration: none;
    color: #00c0ce;
  }

  .step {
    gap: 15px;
    margin-bottom: 20px;
  }

  .step-icon {
    min-width: 40px;
    height: 40px;
    font-size: 1.2em;
  }

  .step h4 {
    font-size: 0.95em;
  }

  .step-text p {
    font-size: 0.9em;
  }
}

/* CONTACT & FOOTER */
@media (max-width: 768px) {
  .contact-section {
    padding: 60px 20px;
  }

  .contact-grid {
    gap: 30px;
  }

  .contact-item {
    flex: 1;
    min-width: 200px;
  }

  .footer-logo {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 40px 15px;
  }

  .contact-grid {
    flex-direction: column;
    gap: 25px;
  }

  .contact-item p {
    font-size: 0.9em;
  }

  footer {
    padding: 20px 15px;
  }

  footer p {
    font-size: 0.8em;
  }

  .footer-logo {
    width: 200px;
  }
}

/* Global heading adjustments */
@media (max-width: 768px) {
  h2 {
    font-size: 1.8em;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 1.4em;
  }

  p {
    font-size: 0.95em;
  }
}