/* Mobile Responsive Styles for AetherTech Dynamics
 * This file should be included after the main stylesheet
 */

/* Base Mobile Viewport */
@media screen and (max-width: 1024px) {
  /* General adjustments for tablets and smaller devices */
  .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Slightly reduce font sizes */
  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 2em;
  }

  /* Adjust spacing */
  section {
    padding: 40px 0;
  }
}

/* Medium devices (tablets) */
@media screen and (max-width: 768px) {
  /* Header and Navigation */
  header {
    padding: 10px 0;
  }

  /* Top bar adjustments */
  .top-bar .container {
    flex-direction: column;
    align-items: center;
  }

  .social-icons {
    margin-top: 5px;
  }

  /* Logo and navigation adjustments */
  .site-header .container {
    flex-direction: column;
    align-items: center;
  }

  .logo {
    margin-bottom: 15px;
  }

  /* Convert navigation to mobile-friendly dropdown */
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-top: 10px;
  }

  /* Hero section adjustments */
  .hero-section {
    text-align: center;
    padding: 60px 0;
  }

  .hero-section h1 {
    font-size: 2.2em;
  }

  .hero-section p {
    font-size: 1.1em;
  }

  /* CTA buttons stack on mobile */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons a {
    width: 100%;
    margin: 5px 0;
  }

  /* Services section adjustments */
  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* About section adjustments */
  .about-section .container {
    flex-direction: column;
  }

  .about-content,
  .about-image {
    width: 100%;
  }

  .about-image {
    margin-top: 30px;
    order: 2;
  }

  /* Testimonials adjustments */
  .testimonial {
    padding: 20px;
  }

  /* Footer adjustments */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-section {
    width: 100%;
    margin-bottom: 30px;
  }

  .footer-section:last-child {
    margin-bottom: 0;
  }

  .footer-links h3::after,
  .footer-contact h3::after,
  .footer-newsletter h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact p {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }

  .footer-legal {
    justify-content: center;
  }
}

/* Small devices (phones) */
@media screen and (max-width: 480px) {
  /* Further reduce font sizes */
  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.7em;
  }

  h3 {
    font-size: 1.3em;
  }

  p {
    font-size: 0.95em;
  }

  /* Adjust padding */
  section {
    padding: 30px 0;
  }

  /* Hero section */
  .hero-section {
    padding: 40px 0;
  }

  .hero-section h1 {
    font-size: 1.8em;
  }

  /* Newsletter form */
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 4px;
  }

  .newsletter-form button {
    width: 100%;
    border-radius: 4px;
  }

  /* Service cards */
  .service-card {
    padding: 15px;
  }

  /* Back to top button */
  #back-to-top {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
  }
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.mobile-nav-overlay.show {
  display: block;
}

/* Hamburger Menu Icon */
.hamburger-icon {
  display: none;
  cursor: pointer;
  padding: 10px;
}

@media screen and (max-width: 768px) {
  .hamburger-icon {
    display: block;
  }

  .hamburger-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #1e3a5f;
    margin: 5px 0;
    transition: all 0.3s ease;
  }

  .hamburger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger-icon.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Products Page Specific */
@media screen and (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    margin-bottom: 20px;
  }

  .product-details {
    flex-direction: column;
  }

  .product-image {
    width: 100%;
    margin-bottom: 20px;
  }

  .product-info {
    width: 100%;
  }
}

/* About Page Specific */
@media screen and (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-container {
    padding-left: 30px;
  }

  .timeline-item {
    padding-bottom: 30px;
  }
}

@media screen and (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Services Page Specific */
@media screen and (max-width: 768px) {
  .service-details {
    flex-direction: column;
  }

  .service-image,
  .service-description {
    width: 100%;
  }

  .service-image {
    margin-bottom: 20px;
  }

  .pricing-table {
    overflow-x: auto;
  }
}

/* Events Page Specific */
@media screen and (max-width: 768px) {
  .events-list {
    grid-template-columns: 1fr;
  }

  .event-card {
    margin-bottom: 20px;
  }

  .event-details {
    flex-direction: column;
  }

  .event-image {
    width: 100%;
    margin-bottom: 20px;
  }

  .event-info {
    width: 100%;
  }
}

/* Scholarship Page Specific */
@media screen and (max-width: 768px) {
  .scholarship-details {
    flex-direction: column;
  }

  .scholarship-image,
  .scholarship-info {
    width: 100%;
  }

  .scholarship-image {
    margin-bottom: 20px;
  }

  .application-steps {
    padding-left: 20px;
  }
}

/* Contact Page Specific */
@media screen and (max-width: 768px) {
  .contact-container {
    flex-direction: column;
  }

  .contact-form,
  .contact-info {
    width: 100%;
  }

  .contact-info {
    margin-top: 30px;
  }

  .map-container {
    height: 300px;
  }
}

/* Form Improvements for Mobile */
@media screen and (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .form-group {
    margin-bottom: 15px;
  }

  button[type="submit"] {
    width: 100%;
  }
}

/* Touch-friendly improvements */
@media (hover: none) {
  /* Increase tap target sizes */
  nav a,
  .btn,
  .footer-links a,
  .social-icons a {
    padding: 12px;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Adjust hover states for touch */
  .service-card:hover,
  .btn:hover,
  a:hover {
    transform: none;
  }
}
