/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* CSS Variables for Cosmic Theme */
:root {
    --primary-bg: #0a0b28; /* Midnight Navy */
    --accent-bg: #12144d; /* Deep Space Blue */
    --primary-accent: #2e98bb; /* Electric Blue */
    --secondary-accent: #a5dce9; /* Cosmic Purple */
    --text-primary: #f4f4f9;/* #ffffff; /* White */
    --text-secondary:#7e88be;/* #b3b3cc; /* Light Lavender Gray */
    --border-detail: #dbe2f4; /*#e0e0f0; /* Star Silver */

    /* Existing variables - review if they are still needed or should be updated */
    --header-bg: rgba(10, 11, 40, 0.8); /* Using primary-bg with some transparency */
    --footer-bg: rgba(10, 11, 40, 0.7); /* Using primary-bg with some transparency */
    --font-primary: 'Lato', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
}

header {
    background-color: var(--header-bg);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem; /* Add spacing between logo/h1 and hamburger */
}

header a {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Add spacing between logo and h1 */
}

header h1 {
    font-size: 1.8rem;
    margin-left: 0.5rem;
}

.logo-img {
    height: 50px; /* Placeholder height */
    width: auto;
    /* Add more specific styles if needed */
}

a:visited {
    color: var(--secondary-accent);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}
nav ul li a:hover,
nav ul li a:focus {
    color: var(--primary-accent); /* Updated to new primary accent */
}

/* Dropdown Menu Styles */
nav ul li.dropdown {
    position: relative; /* Required for absolute positioning of the dropdown */
}

nav ul li.dropdown .dropdown-arrow {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Fix dropdown menu width and wrapping for long items */
nav ul .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--accent-bg);
    border: 1px solid var(--border-detail);
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 0.5rem 0;
    list-style: none;
    min-width: 220px; /* Increased min-width for longer items */
    max-width: 300px; /* Prevents the menu from being too wide */
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    word-break: break-word; /* Allow long words to wrap */
    white-space: normal; /* Allow text to wrap */
}

nav ul li.dropdown:hover .dropdown-menu,
nav ul li.dropdown:focus-within .dropdown-menu { /* Show on hover or when an item inside has focus */
    display: block;
}

nav ul .dropdown-menu li {
    margin-left: 0; /* Reset margin from parent ul */
    width: 100%;
}

nav ul .dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary); /* Lighter text for dropdown items */
    font-size: 1rem; /* Slightly smaller font for dropdown items */
    white-space: normal; /* Allow text to wrap */
    word-break: break-word;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul .dropdown-menu li a:hover,
nav ul .dropdown-menu li a:focus {
    background-color: var(--primary-accent); /* Themed hover background */
    color: var(--primary-bg); /* Darker text on hover for contrast */
}

/* Style for active nav link */
nav ul li a.active {
    color: var(--primary-accent);
    font-weight: bold; /* Or any other style to indicate active state */
}

/* Ensure main nav links have consistent styling if not already applied elsewhere */
.nav-link {
    /* If you had specific styles for nav links beyond color and text-decoration, add them here */
    /* For example, padding, display: block, etc. */
}

main {
    padding: 2rem;
}

section {
    background-color: var(--accent-bg); /* Using accent-bg for sections */
    padding: 2rem;
    margin-bottom: 2rem; /* Added some margin between sections */
    border-radius: 8px; /* Added some rounding to section corners */
    border: 1px solid var(--border-detail); /* Added a subtle border */
}

section:last-child {
    /* border-bottom: none; -- Removed as sections now have distinct backgrounds */
}

section h2 {
    color: var(--secondary-accent); /* Updated to new secondary accent for headings */
    margin-bottom: 1rem;
    font-size: 2rem;
}

footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Bonus Gradient Class */
.gradient-button {
    background: linear-gradient(90deg, #00bfff, #9b30ff);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    transition: transform 0.2s ease-out;
}

.gradient-button:visited {
    color: var(--text-primary);
}
.gradient-button:hover {
    transform: scale(1.05);
}

/* Example of using text-secondary */
.subtle-text {
    color: var(--text-secondary);
}

/* Accordion Styles */
.accordion {
    width: 100%;
}

.accordion-item {
    background-color: var(--primary-bg); /* Slightly different from section bg for contrast */
    margin-bottom: 10px;
    border: 1px solid var(--border-detail);
    border-radius: 5px;
    overflow: hidden; /* Ensures content doesn't spill out before animation */
}

.accordion-header {
    background-color: transparent; /* Match item background or make distinct */
    color: var(--primary-accent);
    cursor: pointer;
    padding: 1rem 1.5rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: rgba(0, 191, 255, 0.1); /* Subtle hover on primary accent */
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0; /* no padding when collapsed */
  }

  .accordion-item.active .accordion-content {
    padding: 1.5rem;
  }

.accordion-item:not(.active) .accordion-content {
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden;
}

/* Container for the text content (description + button) in the accordion */
.accordion-text-content {
    flex: 1;
    padding: 1rem;
    text-align: left;
}

.service-image {
    width: 150px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    flex-shrink: 0;
}
.accordion-item.active .service-image {
    margin-bottom: 1rem; /* adjust value as needed */
}

/* Gradient button */
.gradient-button {
    display: inline-block;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.accordion-content p {
    margin: 0 0 1rem 0; /* Adjusted margin for paragraph in flex layout */
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Service Page Specific Styles */
main.service-page {
    padding: 1rem 2rem; /* Adjusted padding for service pages */
}

.service-hero {
    background-color: var(--accent-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-detail);
}

.service-hero-image {
    max-width: 100%;
    height: auto;
    max-height: 300px; /* Control hero image height */
    border-radius: 8px;
    margin-bottom: 1.5rem;
    object-fit: cover; /* Ensures image covers the area well */
}

.service-hero h1 {
    color: var(--primary-accent);
    font-size: 2.5rem; /* Larger title for hero section */
}

.service-details {
    background-color: var(--primary-bg); /* Or var(--accent-bg) if preferred */
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-detail);
}

.service-details h2 {
    color: var(--secondary-accent);
    font-size: 1.8rem;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.service-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.service-cta {
    background-color: var(--accent-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-detail);
}

.service-cta h2 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
}

.service-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.back-link-container {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.back-link-container a {
    color: var(--primary-accent);
    text-decoration: none;
}

.back-link-container a:hover {
    text-decoration: underline;
}

/* Testimonial Slider Styles */
.testimonial-slider {
    position: relative;
    overflow: hidden; /* Important for containing the slides */
    width: 100%;
    /* background-color: var(--primary-bg); Optional: if section bg is different */
    /* padding: 2rem 0; */ /* Adjust padding as needed */
    border-radius: 8px; /* Consistent with other sections */
}

.testimonial-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* No width here, it will be calculated by JS or be 100% * num_slides */
}

.testimonial-slide {
    min-width: 100%; /* Each slide takes full width of the container */
    box-sizing: border-box;
    padding: 2rem; /* Padding within each slide */
    text-align: center;
    display: none; /* Hidden by default, JS will show the active one */
    flex-direction: column; /* Align avatar, text, author vertically */
    align-items: center; /* Center content horizontally */
}

.testimonial-slide.active {
    display: flex; /* Show active slide */
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-accent);
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
    max-width: 700px; /* Constrain text width for readability */
}

.testimonial-author {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: bold;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.slider-nav:hover {
    background-color: var(--primary-accent); /* rgba(0, 191, 255, 0.8) */
}

.slider-nav.prev {
    left: 15px;
}

.slider-nav.next {
    right: 15px;
}

/* Hero Section Styles - Themed */
#hero {
    background-color: var(--accent-bg); /* Themed background */
    padding: 4rem 2rem; /* Consistent padding with other sections */
    /* text-align: center; /* Center align for smaller screens, will adjust for two-column - already there */
}

.hero-content {
    display: flex;
    flex-direction: column; /* Stack on small screens */
    align-items: center;
    /* justify-content: space-between; - already there */
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    text-align: left; /* Align text to the left in two-column layout */
    padding-right: 30px; /* Space between text and image */
    margin-bottom: 30px; /* Space below text on small screens */
}

.hero-text h2 {
    font-size: 2.8em;
    color: var(--primary-accent); /* Themed heading color */
    margin-bottom: 1rem; /* Consistent margin */
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.1em;
    color: var(--text-primary); /* Themed paragraph color */
    margin-bottom: 1.5rem; /* Consistent margin */
    line-height: 1.6;
}

.index-tagline {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-accent);
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
  margin-top: 0.2rem;
  text-shadow: 0 2px 8px rgba(46, 152, 187, 0.08);
  display: block;
}

.hero-text .index-tagline {
  color: var(--secondary-accent) !important;
}

.hero-image {
    flex: 1;
    max-width: 500px; /* Max width for the image container */
    display: flex; /* Added to center image if it's smaller than max-width */
    justify-content: center; /* Added to center image */
    align-items: center; /* Added to center image */
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow for depth on dark bg */
    border: 1px solid var(--border-detail); /* Consistent border */
}

.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent)); /* Themed gradient */
    color: var(--text-primary); /* Themed text color */
    padding: 0.75rem 1.5rem; /* Consistent with .gradient-button */
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 5px; /* Consistent with .gradient-button */
    border: none; /* Consistent with .gradient-button */
    transition: transform 0.2s ease-out, box-shadow 0.3s ease; /* Adjusted transition */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Adjusted shadow for dark theme */
}

.cta-button:hover {
    transform: scale(1.05); /* Consistent with .gradient-button hover */
    box-shadow: 0 6px 15px rgba(var(--primary-accent-rgb, 0, 191, 255), 0.4); /* Shadow using accent color */
}

/* Contact Page Specific Styles */
.contact-page {
    padding: 1rem 2rem; /* Consistent with service pages */
}

#contact-details-section {
    background-color: var(--accent-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-detail);
}

#contact-details-section h2 {
    color: var(--secondary-accent);
    text-align: center;
    margin-bottom: 1.5rem;
}

#contact-details-section h3 {
    color: var(--primary-accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.contact-intro {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1em;
}

.direct-contact-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--primary-bg); /* Slightly different background for this block */
    border-radius: 5px;
    border: 1px solid var(--border-detail);
}

.direct-contact-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.direct-contact-info a {
    color: var(--primary-accent);
    text-decoration: none;
}

.direct-contact-info a:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto; /* Center the form */
    background-color: var(--primary-bg); /* Form background */
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-detail);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-detail);
    border-radius: 5px;
    background-color: var(--accent-bg); /* Input field background */
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 5px rgba(var(--primary-accent-rgb, 0, 191, 255), 0.5);
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 120px;
}

.form-group .gradient-button {
    width: 100%;
    padding: 0.85rem 1.5rem; /* Slightly larger padding for main CTA */
    font-size: 1.2em;
} 

/* Increase base font size for paragraphs */
p {
  font-size: 1.2rem;
  line-height: 1.7;
} 

li {
  font-size: 1.1rem;
  line-height: 1.7;
  padding-left: 1.5em;  
  list-style-position: inside;
  color: var(--text-secondary);
} 

/* About page style*/
.about-logo,
.about-main-image {
  border-radius: 16px;
  max-width: 220px; 
  height: auto; 
  flex: 1;
} 

.about-cta {
  background-color: var(--accent-bg);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-detail);
} 

.about-hero{
    display: flex; 
    flex-direction: row;
    align-items: center; 
    gap: 2rem;
}

.about-content{
    display: flex; 
    flex-direction: row;
    align-items: center; 
    gap: 2rem;
}


/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
  }
  .hamburger span {
    display: block;
    width: 28px;
    height: 4px;
    margin: 4px 0;
    background: var(--primary-accent);
    border-radius: 2px;
    transition: 0.3s;
  }

  /* Adjust style for small screens */
@media (max-width: 480px) {
    p {
        font-size: 1rem;
      }
      li {
        font-size: 1rem;
      }
      h1 {
        font-size: 2rem;
      }
      h2 {
        font-size: 1.3rem;
      }
      h3 {
        font-size: 1.1rem;
      }

    .testimonial-slide {
        padding: 0.5rem;
    }
    .testimonial-text {
        font-size: 1rem;
    }
    
    .testimonial-author {
        font-size: 1rem;
        color: var(--text-primary);
        font-weight: bold;
    }

    .about-hero{
        flex-direction: column;
        align-items: center;
    }

    .about-content{
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        width: 100%;
        margin-bottom: 1rem;
        align-self: center;
    }

    .accordion-content,
    .accordion-item.active .accordion-content {
      flex-direction: column;
      align-items: center;
      /*max-height: none !important;
      overflow: visible !important;*/
      padding: 1.5rem !important;
    }
  
    .accordion-text-content {
      min-width: auto; /* Override the fixed min-width */
      width: 100%;
      padding-left: 0;
      padding-top: 1rem;
      text-align: center;
    }
  
    .accordion-content .service-image {
      max-width: 100%;
      width: 100%;
      margin-bottom: 1rem;
      align-self: center;
    }
  
    .accordion-content .gradient-button {
      margin-left: auto;
      margin-right: auto;
      display: table;
    }
}


@media (max-width: 768px) {
    
  .hamburger {
    display: flex;
  }
  nav#main-nav {
    position: absolute;
    top: 70px;
    right: 2rem;
    left: 2rem;
    background: var(--accent-bg);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem;
    display: none;
  }
  nav#main-nav.open {
    display: flex;
  }
  nav#main-nav ul {
    flex-direction: column;
    width: 100%;
  }
  nav#main-nav ul li {
    margin: 0 0 1rem 0;
  }
  nav#main-nav ul li:last-child {
    margin-bottom: 0;
  }
  .accordion-item.active .service-image {
    margin-right: 2rem; /* add horizontal space between image and text */
  }  
  .accordion-item.active .accordion-content {
    padding: 2rem;
  }
  .accordion-content {
    flex-direction: column;
    align-items: center;
  }

  .accordion-item.active .accordion-content {
    padding: 1.5rem;
  }

  .accordion-text-content {
    padding-left: 0;
    padding-top: 1rem;
    text-align: center;
  }

  .service-image {
    max-width: 80%;
    margin-bottom: 1rem;
    align-self: center;
  }

  .gradient-button {
    margin-left: auto;
    margin-right: auto;
    display: table;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }
  nav#main-nav {
    display: block !important;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  nav#main-nav ul {
    flex-direction: row;
  }
  /* Responsive adjustments for two-column layout */
    #hero {
        padding: 5rem 2rem; /* More padding on larger screens */
    }
    .hero-content {
        flex-direction: row; /* Side-by-side on larger screens */
        text-align: left;
    }

    .hero-text {
        margin-bottom: 0; /* Remove bottom margin when side-by-side */
        padding-right: 40px; /* Increased space for larger screens */
    }

    .hero-text h2 {
        font-size: 3.2em;
    }

} 

/* Further adjustments for very large screens if needed */
@media (min-width: 1024px) {
    #hero {
        padding: 6rem 2rem;
    }
    .hero-text h2 {
        font-size: 3.5em;
    }

     .hero-text p {
        font-size: 1.2em;
    }
}
