/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- IMPORTANT: Adjusted html, body height to allow natural scrolling --- */
html, body {
  width: 100%;
  /* Removed 'height: 100%;' from html, body to ensure content can flow and scroll */
  min-height: 100%; /* Ensures body is at least viewport height */
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #001f3f;  /* Deep navy background */
  color: #f1f1f1;              /* Off-white text */
  line-height: 1.5;
  overflow-x: hidden; /* Prevent horizontal scrolling by default */
  -webkit-text-size-adjust: 100%; /* Prevent font size inflation on iOS */
  text-size-adjust: 100%;
}

a {
  color: #66b2ff;              /* Light blue links */
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: #cce6ff;              /* Lighter blue hover */
}

/* Header Top Bar */
.header-top {
  background-color: #002b5c;  /* Dark navy header */
  padding: 15px 40px;
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 60px;
  display: flex;
  flex-direction: column; /* Stacks contact details and nav vertically */
  align-items: center;
}

/* Contact Details within Header */
.header-top .contact-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allows items to wrap to next line */
  justify-content: center;
  width: 100%; /* Ensure it takes full width of header-top */
  text-align: center;
}
.header-top .contact-details a {
  font-weight: 600;
  color: #f1f1f1;
}

/* Main Navigation Container */
.navbar {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 15px;
  position: relative; /* Crucial for positioning the hamburger button */
  padding: 0 20px; /* Added horizontal padding to the nav bar itself */
}

.navbar ul {
  list-style: none;
  display: flex; /* Default for desktop */
  gap: 40px;
  align-items: center;
  padding: 0;
  width: auto; /* Allow content to define width on desktop */
}
.navbar ul li {
  position: relative;
}
.navbar ul li a {
  font-size: 18px;
  font-weight: 500;
  color: #f1f1f1;
  padding: 8px;
  display: block; /* Make links block-level for larger clickable area */
}
.navbar ul li a:hover {
  color: #66b2ff;
}

/* Standard Dropdowns */
.navbar ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;  /* Medium navy dropdown */
  border-radius: 20px;
  padding: 10px 0;
  list-style: none;
  min-width: 200px;
  z-index: 100;
  flex-direction: column;
}
.navbar ul li:hover > ul {
  display: flex;
}
.navbar ul li ul li {
  padding: 8px 20px;
}
.navbar ul li ul li a {
  color: #cce6ff;
}
.navbar ul li ul li a:hover {
  color: #f1f1f1;
}

/* Services Dropdown - Stylish Mega Dropdown */
.navbar ul li.services-dropdown {
  position: relative;
}
.navbar ul li.services-dropdown:hover .mega-menu {
  display: grid;
}
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;
  padding: 20px;
  border-radius: 15px;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  min-width: 300px;
  z-index: 99;
}
.mega-menu li {
  padding: 6px 10px;
  background-color: #002244;
  border-radius: 8px;
  text-align: center;
}
.mega-menu li a {
  display: block;
  color: #cce6ff;
  font-size: 15px;
  font-weight: 500;
}
.mega-menu li:hover {
  background-color: #004080;
}
.mega-menu li a:hover {
  color: #ffffff;
}

/* Hamburger Toggle Button (Hidden on Desktop) */
.nav-toggle {
    display: none; /* Hidden by default on larger screens */
    font-size: 2em;
    background: none;
    border: none;
    color: #f1f1f1; /* Changed from #333 to match your site's color scheme */
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

/* Hero / Contact Section */
#contact {
  position: relative;
  padding: 100px 0; /* Adjusted in media query for mobile */
  background-color: #001f3f;
  overflow: hidden; /* Keep this if you want the background image to be clipped at edges */
}
#contact::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  width: 60%;
  height: 100%;
  background: url('MAIDSERVANT IMAGES/3.png.jpeg') no-repeat center center;
  background-size: cover;
  border: 5px solid #336699;  /* Blue accent border */
  border-top-left-radius: 500px;
  border-bottom-left-radius: 500px;
  z-index: 1;
}
#contact .form-container {
  position: relative;
  background-color: rgba(0,19,36,0.85); /* Translucent navy form bg */
  border-radius: 40px;
  padding: 40px;
  width: 380px;
  max-width: 90%; /* Flexible width */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  z-index: 2;
  margin-left: 5%; /* Adjusted in media query for mobile */
}
#contact .form-container h2 {
  color: #f1f1f1;
  margin-bottom: 20px;
}
#contact .form-container input,
#contact .form-container select,
#contact .form-container textarea {
  width: 100%;
  background-color: #002b5c;    /* Dark form input bg */
  border: none;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #f1f1f1;
}
#contact .form-container input::placeholder,
#contact .form-container textarea::placeholder {
  color: #99bbff;
}
#contact .form-container button {
  width: 100%;
  padding: 14px;
  background-color: #336699;    /* Blue button */
  color: #f1f1f1;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
#contact .form-container button:hover {
  background-color: #4d85b6;
}
#contact .form-container .loading {
  margin-top: 10px;
  font-size: 14px;
  color: #66b2ff;
  text-align: center;
}

/* Banner Text */
.banner-text {
  margin: 80px auto;
  max-width: 1000px;
  padding: 30px 20px;
  position: relative;
  text-align: center;
}
.banner-text::before,
.banner-text::after {
  content: '';
  position: absolute;
  width: 80%;
  height: 1px;
  background-color: #336699;
  left: 50%;
  transform: translateX(-50%);
}
.banner-text::before { top: 0; }
.banner-text::after { bottom: 0; }
.banner-text p {
  color: #cce6ff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}

/* Address Section */
.address-section .address-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 0 auto;
  max-width: 1200px;
}
.address-section .card {
  background-color: #002b5c;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 6px 15px rgba(139, 214, 254, 0.7);
  color: #83f8f8;
}
.address-section .card h3 {
  margin-bottom: 10px;
  color: #99bbff;
}
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    text-align: center;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
  }

  .services-grid a {
    text-decoration: none;
    color: black;
    width: 150px;
    transition: transform 0.3s ease;
  }

  .services-grid a:hover {
    transform: scale(1.05);
  }

  .services-grid img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
  }

  .services-grid p {
    margin: 0;
    font-weight: bold;
  }

/* About Section */
.about-section {
  padding: 3rem 1rem;
  background-color: #abc8e2; /* adjust to your blue */
}
.about-section__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
}
.about-section__badges {
  display: flex;
  gap: 1rem;
  flex: 1 1 200px;
}
.about-section__badge {
  max-height: 80px;
}
.about-section__text--highlight {
  background: #0A5E71;
  color: rgb(241, 239, 239);
  border-radius: 12px;
  padding: 1.5rem;
  flex: 2 1 300px;
}
.about-section__mission {
  background: white;
  color: black;
  border-radius: 12px;
  padding: 1.5rem;
  flex: 2 1 300px;
}
.about-section__features {
  display: flex;
  gap: 1rem;
  flex: 1 1 200px;
}
.about-section__feature {
  text-align: center;
  font-weight: bold;
}
.about-section__feature img {
  display: block;
  margin: 0 auto 0.5rem;
  max-height: 60px;
}
.about-section__cities {
  display: flex;
  gap: 2rem;
  flex: 1 1 200px;
  justify-content: center;
}
.about-section__city {
  text-align: center;
}
.about-section__city img {
  display: block;
  margin: 0 auto 0.5rem;
  max-height: 60px;
}

/* Register Section */
.register-section {
  padding: 3rem 1rem;
  background-color: #B0CCE2; /* same blue as above */
}
.register-section__title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #033E60;
  font-weight: bold;
}
.register-section__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}
.register-section__salaries {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.salary-card {
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
  text-align: center;
}
.salary-card--dark {
  background-color: #0A5E71;
}
.salary-card--medium {
  background-color: #4A8A7F;
}
.salary-card--light {
  background-color: #67B0E8;
}
.salary-card h3 {
  margin: 0 0 0.5rem;
}
.salary-card p {
  margin: 0;
}
.salary-card a {
  color: inherit;
  text-decoration: none;
}
.salary-card a:hover {
  text-decoration: underline;
}
.register-section__details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.details-text p {
  margin: 0 0 0.5rem;
  color: #000;
}
.details-icon {
  text-align: center;
}
.details-icon img {
  max-width: 100px;
  height: auto;
}
.registration-box {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  color: #000;
}
.registration-box h3 {
  text-align: center;
  margin-top: 0;
}
.register-section__footer {
  text-align: center;
  margin-top: 2rem;
  color: #000;
  font-weight: bold;
}

/* Offer Section */
.offer-section {
  padding: 3rem 1rem;
  background-color: #B0CCE2;
}
.offer-section h1 {
  text-align: center;
  font-size: 2rem;
  color: #033E60;
  margin-bottom: 1.5rem;
}
.offer-table {
  width: 100%;
  border-collapse: collapse;
}
.offer-table th,
.offer-table td {
  padding: 1rem;
  border: 1px solid #ccc;
}
.offer-table th {
  background: #fff;
  color: #033E60;
  font-weight: bold;
  text-align: left;
}
.offer-table td {
  vertical-align: middle;
}
.offer-table td.offer-yes,
.offer-table td.offer-no {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
}
.offer-table td.offer-yes {
  color: #033E60;
}
.offer-table td.offer-no {
  color: red;
}

/* Terms & Conditions Section */
.terms-section {
  padding: 3rem 1rem;
  background-color: #E3EBF5; /* light grey-blue background */
}
.terms-section h1 {
  background-color: #AEC8E7;     /* pale blue header bar */
  color: #1F1F3D;               /* dark slate text */
  text-align: center;
  font-size: 2.5rem;
  margin: 0 -1rem 1.5rem;       /* span full width, then separate from body */
  padding: 1.5rem 1rem;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.terms-section p {
  margin: 0 0 1rem;
  color: #1F1F3D;
  line-height: 1.6;
  font-size: 1rem;
}
.terms-section p strong {
  font-weight: bold;
  color: #163951; /* dark blue for emphasis */
}

/* --- IMPORTANT: Corrected Jobs Section for Scrolling --- */
/* The 'overflow: hidden;' on `.jobs-section` was preventing scrolling. */
/* Changed to `overflow: visible;` to allow content to flow. */
.jobs-section {
  position: relative;
  width: 100%;
  min-height: 100vh;  /* Full screen height */
  background-size: cover;
  padding: 4rem 1rem;
  overflow: visible; /* Changed from hidden to visible to allow scrolling */
  z-index: 1;
}
.jobs-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(22, 13, 88, 0.85); /* semi-dark navy overlay */
  z-index: -1;
}

/* --- Consolidated Footer Styles --- */
footer {
  clear: both; /* Ensures it sits below any floated elements */
  margin-top: 3rem;   /* space above the footer */
  padding: 2rem 1rem; /* inner padding */
  background-color: #002b5c;
  color: #bbbbbb; /* Adjusted to a lighter grey for better contrast */
  text-align: center;
  font-size: 14px;
}

/* --- Utility Class --- */
.section {
  padding: 60px 20px; /* Base padding */
  width: 100%; /* Ensure it takes full width */
  max-width: none; /* Remove any max-width that might be restricting it on small screens */
  margin: 0 auto; /* Keep it centered */
}

/* ========================================================= */
/* RESPONSIVE STYLES (Media Queries)                         */
/* ========================================================= */

/* General Mobile/Tablet Adjustments (Screens <= 768px) */
@media (max-width: 768px) {
    /* Header Top Bar */
    .header-top {
        padding: 10px 0; /* Adjust padding for mobile header */
        flex-direction: column;
    }
    .header-top .contact-details {
        flex-direction: column; /* Stack contact details vertically */
        gap: 5px; /* Reduce gap */
        padding: 0 10px; /* Add some side padding */
    }
    .header-top .contact-details a {
        font-size: 0.9em; /* Smaller font size */
    }

    /* Main Navigation (Hamburger Menu preparation) */
    .navbar {
        justify-content: flex-end; /* Push button to one side */
        align-items: center; /* Vertically align button if needed */
        min-height: 60px; /* Give navbar a minimum height to contain button */
        padding: 10px 20px; /* Adjust padding for navbar itself on mobile */
        margin-top: 0; /* Remove top margin */
    }

    /* Show hamburger icon */
    .nav-toggle {
        display: block; /* Show hamburger icon */
        position: absolute; /* Position relative to .navbar */
        top: 10px; /* Adjust vertical position */
        right: 20px; /* Adjust horizontal position */
    }

    /* Hide main nav list by default, stack items when active */
    .navbar ul {
        display: none; /* Hidden by default for mobile menu (JS will toggle 'active') */
        flex-direction: column; /* Stack navigation items vertically */
        width: 100%;
        position: absolute; /* Position below navbar */
        top: 100%; /* Place it exactly below the .navbar */
        left: 0;
        background-color: #003366; /* Background for expanded menu */
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        z-index: 99; /* Ensure it's above other content */
        padding-bottom: 10px; /* Add padding at bottom */
        gap: 0; /* Remove gap when stacked */
    }
    .navbar ul.active { /* Class toggled by JavaScript */
        display: flex; /* Show menu when active */
    }
    .navbar ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Separator */
        padding: 15px 0; /* Larger touch target */
        margin: 0; /* Remove any default margins */
    }
    .navbar ul li:last-child {
        border-bottom: none;
    }
    .navbar ul li a {
        font-size: 1.1em;
        padding: 0; /* Reset padding as parent li provides it */
    }

    /* Dropdowns within the mobile menu */
    .navbar ul li ul, .mega-menu {
        position: static; /* Make dropdowns flow naturally within the stacked menu */
        width: 100%;
        box-shadow: none;
        background-color: transparent; /* Match parent menu background */
        padding: 0;
        border-radius: 0;
        grid-template-columns: 1fr; /* Stack mega menu items */
    }
    .mega-menu li {
        background-color: rgba(0, 34, 68, 0.5); /* Slightly darker for distinction */
        border-radius: 5px; /* Slight radius for inner items */
        margin: 5px 10px; /* Add margin for spacing and indent */
        text-align: left; /* Align text left within dropdown items */
        padding-left: 20px; /* Indent dropdown items */
        padding-right: 10px;
    }

    /* Hero / Contact Section */
    #contact {
        padding: 50px 0; /* Reduce vertical padding */
        display: flex; /* Use flexbox to control layout */
        flex-direction: column; /* Stack items */
        align-items: center; /* Center items */
    }
    #contact::before {
        width: 100%; /* Background image takes full width */
        left: 0; /* Align to left */
        top: 0; /* Anchor to top */
        height: 100%; /* Take full vertical height of section */
        border-radius: 0; /* Remove specific border radius */
        border: none; /* Remove border */
        opacity: 0.3; /* Make it more subtle if it's too dominant */
    }
    #contact .form-container {
        margin: 0 auto; /* Center form */
        padding: 25px;
        width: 90%; /* More fluid width */
    }

    /* Banner Text */
    .banner-text {
        margin: 40px auto; /* Adjust margin */
        padding: 20px 10px;
        max-width: 100%; /* Allow it to stretch */
    }
    .banner-text::before, .banner-text::after {
        width: 90%; /* Ensure lines extend well */
    }
    .banner-text p {
        font-size: 18px; /* Smaller font size */
    }

    /* Address Section */
    .address-section .address-cards {
        grid-template-columns: 1fr; /* Stack cards vertically */
        gap: 15px;
        padding: 0 15px; /* Add some side padding to the grid container */
    }
    .address-section .card {
        padding: 15px;
    }

    /* About Section */
    .about-section__row {
        flex-direction: column; /* Stack rows vertically */
        gap: 1rem; /* Adjust gap */
    }
    .about-section__badges,
    .about-section__text--highlight,
    .about-section__mission,
    .about-section__features,
    .about-section__cities {
        flex: auto; /* Reset flex-grow/shrink to auto */
        width: 100%; /* Ensure they take full width */
    }

    /* Register Section */
    .register-section__grid {
      grid-template-columns: 1fr; /* Stack into one column on narrow screens */
    }

    /* Offer Section Table */
    .offer-table {
        display: block; /* Allows table to scroll horizontally itself */
        overflow-x: auto; /* Add horizontal scrollbar if table content is too wide */
        white-space: nowrap; /* Prevents text wrapping within cells if it breaks layout */
    }
    .offer-table thead, .offer-table tbody, .offer-table th, .offer-table td, .offer-table tr {
        /* These can be problematic if you want full vertical stacking of cells.
           Often better to leave as `display: table-row/cell` and rely on overflow-x.
           If you want full vertical stacking, specific `table-layout: fixed;` and width % might be needed.
           For now, stick to horizontal scroll as it's less complex. */
        /* display: block; */
    }
    .offer-table th, .offer-table td {
        white-space: normal; /* Allow text to wrap within cells again for better readability */
    }

    /* Service Pages Specific Styles (maid-banner, maid-service-section) */
    .maid-banner {
        padding: 1.5rem 1rem 0.5rem;
    }
    .maid-banner h1 {
        font-size: 2em;
    }
    .maid-banner p {
        font-size: 1em;
    }
    .maid-service-section {
        flex-direction: column; /* Stack image and content */
        gap: 1rem;
        padding: 1.5rem;
    }
    .maid-image {
        flex: auto;
        width: 100%;
    }
    .maid-image img {
        max-width: 100%;
    }
    .maid-content {
        flex: auto;
        width: 100%;
        padding: 1rem;
    }
    .maid-content h2 {
        font-size: 1.3em;
    }
    .maid-content p, .maid-content ul li {
        font-size: 0.95em;
    }


    /* General Section Padding */
    .section {
        padding: 30px 15px; /* Increase horizontal padding slightly on tablets */
    }
}

/* Specific Mobile Phone Adjustments (Screens <= 480px) */
@media (max-width: 480px) {
    /* Header Top Bar */
    .header-top {
        padding: 10px 0;
    }
    .header-top .contact-details a {
        font-size: 0.8em;
    }

    /* Navbar padding and button position for smaller phones */
    .navbar {
        padding: 5px 10px;
        min-height: 50px;
    }
    .nav-toggle {
        font-size: 1.8em;
        top: 8px;
        right: 10px;
    }

    /* Typography */
    h1 {
        font-size: 1.8em; /* Smaller headings for compact screens */
    }
    h2 {
        font-size: 1.4em;
    }
    p {
        font-size: 0.9em; /* Slightly smaller base text */
    }

    /* Payment Section */
    .payment-section {
.stretch-blue {
  background-color: rgb(102, 102, 226);
  width: 100%;
  padding: 30px;
  text-align: center;
}
.stretch-blue img {
  max-width: 100%;
  height: auto;
}

    /* Contact form */
    #contact .form-container {
        padding: 20px;
        width: 95%; /* Wider on very small screens */
    }
    #contact .form-container h2 {
        font-size: 1.5em;
    }

    /* Banner Text */
    .banner-text p {
        font-size: 16px;
    }

    /* Address Cards */
    .address-section .card {
        padding: 10px;
        font-size: 0.9em;
    }
    .address-section .card h3 {
        font-size: 1.1em;
    }

    /* Register Section */
    .register-section__title {
        font-size: 1.6rem;
    }
    .salary-card h3 {
        font-size: 1.1rem;
    }
    .salary-card p {
        font-size: 0.9rem;
    }

    /* Service Pages Specific Styles (maid-banner, maid-service-section) */
    .maid-banner h1 {
        font-size: 1.8em;
    }
    .maid-banner p {
        font-size: 0.9em;
    }
    .maid-content h2 {
        font-size: 1.2em;
    }
    .maid-content p, .maid-content ul li {
        font-size: 0.9em;
    }

    /* General Section Padding */
    .section {
        padding: 20px 10px; /* Smaller padding for very small screens */
    }
}

/* Fix for Services dropdown closing issue */
.services-dropdown:hover .mega-menu {
  display: grid;
}


/* Services Dropdown Fix */
.services-dropdown {
  position: relative;
}

.services-dropdown:hover .mega-menu {
  display: grid !important;
}

/* --- Services Dropdown Final Styling --- */
.services-dropdown {
  position: relative;
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;
  padding: 20px;
  border-radius: 15px;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  min-width: 300px;
  z-index: 99;
}

/* Show on hover - Desktop Only */
@media (min-width: 769px) {
  .services-dropdown:hover .mega-menu {
    display: grid;
  }
}

.mega-menu li {
  padding: 6px 10px;
  background-color: #002244;
  border-radius: 8px;
  text-align: center;
  transition: background 0.3s;
}

.mega-menu li a {
  display: block;
  color: #cce6ff;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s;
}

.mega-menu li:hover {
  background-color: #004080;
}

.mega-menu li a:hover {
  color: #ffffff;
}