/* Basic Resets and Body Styling */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;

  /* --- Sticky Footer Setup --- */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* --- End Sticky Footer Setup --- */
}

/* Container for layout width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styling */
header {
  background: #004080;
  color: white;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.8em;
}

/* Style for the logo image inside the H1 */
header h1 img {
    height: 1.2em; /* Set height relative to the current font size of H1 */
    width: auto;  /* Maintain aspect ratio */
    vertical-align: middle; /* Align the image vertically with the text */
    margin-right: 10px; /* Add some space between the image and the text */
    /* Remove any default browser border or padding if necessary */
    border: none;
    padding: 0;
}

/* Navigation Styling */
nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

nav a:hover,
nav a.active {
  color: #cce5ff;
  border-bottom: 2px solid #cce5ff;
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding: 20px 0;
}

/* Hero Section Styling */
.hero {
  background: #cce5ff;
  padding: 60px 20px;
  text-align: center;
  color: #004080;
  margin-bottom: 40px;
}

.hero h2 {
    margin-top: 0;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

/* Services Section Styling */
.services .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.services h2 {
    text-align: center;
    color: #004080;
    margin-bottom: 20px;
}

.service-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.service-card {
  background: white;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  flex: 1 1 300px;
  max-width: 350px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.service-card h3 {
    color: #004080;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.service-card p {
    font-size: 0.95em;
}

/* Network Gallery Section - Styles for Static Images */
.network-gallery {
    background: #e9ecef;
    padding: 40px 0;
    margin-bottom: 40px;
}

.network-gallery .container {
     text-align: center; /* Center h2 and p */
     display: flex; /* Make container a flex item */
     flex-direction: column; /* Stack items vertically */
     align-items: center; /* Center items horizontally in the column */
     gap: 20px; /* Space between items (h2, image-row, p) */
}

.network-gallery h2 {
    color: #004080;
    margin-bottom: 0; /* Gap handled by container's gap */
}

/* Style the container holding the three images */
.network-gallery .image-row {
    display: flex; /* Make the image-row a flex container */
    flex-wrap: wrap; /* Allow images to wrap to the next line */
    justify-content: center; /* Center images when they are fewer than a full row */
    gap: 20px; /* Space between the images */
    width: 100%; /* Ensure the row takes full container width */
    margin-bottom: 0; /* Gap handled by container's gap */
}

/* Style for individual images within the row */
.network-gallery .image-row img {
    width: 100%; /* Default to full width on small screens */
    max-width: 350px; /* Limit max width per image */
    height: 200px; /* Set a fixed height for uniformity */
    object-fit: cover; /* Crop image to cover the area if aspect ratios differ */
    border-radius: 8px; /* Rounded corners for images */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow */
    flex: 1 1 250px; /* Flex properties: grow, shrink, basis. Images will try to be at least 250px wide before wrapping */
}


.gallery-description {
    max-width: 800px;
    margin: 0 auto; /* Gap handled by container's gap */
    font-style: italic;
    color: #555;
}


/* Infrastructure Details Section */
.infrastructure-details {
    padding: 40px 0;
    margin-bottom: 40px;
}

.infrastructure-details .container {
    max-width: 900px;
}

.infrastructure-details h2 {
     color: #004080;
     border-bottom: 2px solid #cce5ff;
     padding-bottom: 10px;
     margin-bottom: 20px;
}

.infrastructure-details ul {
    list-style: disc;
    margin-left: 20px;
    padding: 0;
}

.infrastructure-details ul li {
    margin-bottom: 10px;
}

/* Generic Page Content Styling (for About, Contact etc.) */
.page-content {
    padding: 40px 20px;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    margin-bottom: 40px;
}

.page-content h2 {
    color: #004080;
    margin-top: 0;
    border-bottom: 2px solid #cce5ff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.page-content a {
    color: #004080;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

/* Contact Page specific styles */
.page-content .map-placeholder {
    margin: 20px 0;
    border: 1px solid #ccc;
}

/* Footer Styling */
footer {
  text-align: center;
  background: #004080;
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
}

footer p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}


/* --- Responsive Adjustments --- */

/* On smaller screens (e.g., mobile phones) */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
    padding: 10px 15px;
  }

  header h1 {
      font-size: 1.5em;
  }

  nav {
    margin-top: 15px;
  }

  nav a {
    margin: 0 8px;
    display: inline-block;
    padding: 5px 0;
  }

  main {
      padding: 15px 0;
  }

  .hero {
    padding: 40px 15px;
    margin-bottom: 30px;
  }

  .hero h2 {
      font-size: 2em;
  }

  .hero p {
      font-size: 1em;
  }

  .services .container,
  .network-gallery .container,
  .infrastructure-details .container {
       padding: 0 15px;
  }

  .services h2,
  .network-gallery h2,
  .infrastructure-details h2 {
      font-size: 1.5em;
  }

  .service-cards {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .service-card {
    width: 100%;
    max-width: 350px;
    padding: 20px;
  }

  .network-gallery {
      padding: 30px 0;
      margin-bottom: 30px;
  }

  /* Responsive style for images in network gallery on small screens */
  .network-gallery .image-row {
    flex-direction: column; /* Stack images vertically */
    align-items: center; /* Center stacked images */
    gap: 15px; /* Space between stacked images */
  }

  .network-gallery .image-row img {
      width: 100%; /* Images take up full width */
      max-width: 400px; /* Still limit max width */
      height: 180px; /* Adjust height for mobile */
      flex-basis: auto; /* Revert flex basis for stacking */
  }


  .infrastructure-details {
      padding: 30px 0;
      margin-bottom: 30px;
  }

  .page-content {
    padding: 30px 15px;
    margin: 15px auto;
    margin-bottom: 30px;
  }

  footer {
      padding: 15px 0;
  }
}

/* Optional: Further adjustments for very small screens */
@media (max-width: 480px) {
    nav a {
        margin: 0 5px;
        font-size: 0.9em;
    }

    .hero h2 {
        font-size: 1.6em;
    }

    .hero p {
        font-size: 0.9em;
    }

    .services h2,
    .network-gallery h2,
    .infrastructure-details h2 {
        font-size: 1.3em;
    }

    .network-gallery .image-row img {
         height: 150px; /* Reduce image height further on very small screens */
    }
}

/* Styles for Larger screens (Desktop) - override mobile stacking */
@media (min-width: 769px) {
    .network-gallery .image-row {
        flex-direction: row; /* Arrange images horizontally */
        justify-content: center; /* Center the row of images */
        align-items: stretch; /* Make items equal height (if heights were auto) */
    }

    .network-gallery .image-row img {
        flex: 1 1 0; /* Allow images to grow/shrink and try to be equal width */
        /* Combined with gap, this creates a responsive grid-like layout */
        height: 200px; /* Explicitly set fixed height */
    }
}