/* style.css */

/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f8fb;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3 {
    color: #034d96;
}

a {
    text-decoration: none;
    color: #3498db;
}

/* Header & Navigation */
header {
    background-color: #a5d8f9;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #444;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 5px;
}

.nav-links a:hover {
    color: #3498db;
    background-color: #b3d9fa; /* Light blue background on hover */
}

.free-stuff-btn, .free-stuff-btn-footer {
    background-color: #2f3ad0;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-left: 1rem; /* Space it from nav links */
}

.free-stuff-btn:hover, .free-stuff-btn-footer:hover {
    background-color: #2980b9;
}

.hamburger {
    display: none; /* Initially hidden on larger screens */
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.4s;
}

/* === START: Dropdown Menu Styles === */

/* Style the parent list item that contains the dropdown */
.nav-links li.has-dropdown {
    position: relative; /* Needed for absolute positioning of the dropdown */
}

/* Style the indicator arrow */
.dropdown-indicator {
    font-size: 0.7em; /* Make arrow smaller */
    margin-left: 5px;
    transition: transform 0.3s ease;
    display: inline-block; /* Ensure it takes space */
}

/* Rotate arrow when dropdown is active/open (controlled by JS via aria-expanded) */
.nav-links li.has-dropdown > a.dropdown-toggle[aria-expanded="true"] .dropdown-indicator {
    transform: rotate(180deg);
}

/* Style the dropdown menu itself */
.dropdown-menu {
    display: block; /* Use opacity/visibility for control */
    position: absolute;
    top: 100%; /* Position below the parent link */
    left: 0;
    background-color: #ffffff; /* White background - contrasts well */
    min-width: 260px; /* Adjust width as needed for your service names */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Keep subtle shadow */
    z-index: 1001; /* Ensure it's above other content */
    border-radius: 0 0 5px 5px; /* Match your button radius */
    padding: 10px 0; /* Padding top/bottom */
    list-style: none; /* Remove default list styling */
    /* Use your primary blue for the top border accent */
    border-top: 3px solid #3498db;

    /* Use opacity/visibility for smoother transitions & JS control */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    margin: 0; /* Reset margin */
}

/* Show dropdown via JS adding .is-active class */
.dropdown-menu.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Desktop Hover Enhancement (using your existing colors) --- */
/* Apply hover effect ONLY on devices that support hover */
@media (hover: hover) and (min-width: 769px) { /* Match your mobile breakpoint + 1 */
    .nav-links li.has-dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Rotate arrow on hover for immediate feedback */
    .nav-links li.has-dropdown:hover > a.dropdown-toggle .dropdown-indicator {
         transform: rotate(180deg);
    }
     /* Reset rotation if not expanded AND not hovered */
    .nav-links li.has-dropdown > a.dropdown-toggle[aria-expanded="false"]:not(:hover) .dropdown-indicator {
        transform: rotate(0deg);
    }
    /* Prevent main 'Services' link background hover when dropdown is open */
    .nav-links li.has-dropdown:hover > a.dropdown-toggle {
         background-color: transparent !important; /* Prevent hover background */
         color: #3498db; /* Keep hover color */
    }
}


/* Style the individual links within the dropdown */
.dropdown-menu li {
    padding: 0; /* Reset padding if any inherited */
    margin: 0; /* Reset margin if any inherited */
    width: 100%; /* Ensure list items take full width */
}

.dropdown-menu li a {
    display: block; /* Make links take full width */
    padding: 10px 20px; /* Padding for each item */
    color: #444; /* Use your standard nav link color */
    white-space: nowrap; /* Prevent wrapping */
    font-weight: normal; /* Standard weight */
    font-size: 0.95rem; /* Slightly smaller is common */
    border-radius: 0; /* Override main nav link radius */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Use your existing hover styles for consistency */
.dropdown-menu li a:hover {
    background-color: #f0f8ff; /* Your light blue background */
    color: #3498db; /* Your primary blue */
}

/* === END: Dropdown Menu Styles === */

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2rem;
    background-color: #e8f4fa; /* Light background */
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.cta-btn:hover {
    background-color: #2980b9;
}

.hero-image {
    flex: 1;
    text-align: right;
    padding-left: 2rem; /* Spacing between text and image */
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Rounded corners for the image */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Subtle shadow */
}


/* Articles Section */
.articles {
    padding: 3rem 2rem;
    text-align: center;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensure image doesn't overflow */
    transition: transform 0.2s ease; /* Add a hover effect */
}

.article-card:hover {
    transform: translateY(-5px); /* Lift the card slightly on hover */
}

.article-card img {
    width: 100%;
    height: 150px;  /* Fixed height for consistency */
    object-fit: cover; /* Ensure the image covers the area */
    border-bottom: 1px solid #eee;
}

.article-card h3 {
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
}

.article-card p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* Services Overview */
.services-overview {
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f9f9f9;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    width: 150px; /* Adjust as needed */
    text-align: center;
}

.service-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

.service-item h3 {
    font-size: 1rem;
    margin: 0;
}


/* Experience Section */
.experience {
  padding: 3rem 2rem;
  text-align: center;
  background-color: #e0f2f7; /* Lighter blue background */
}

.experience h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.experience p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  max-width: 800px; /* Limit width for readability */
  margin: 0 auto;  /* Center the paragraph */
}


/* Table for ebooks */
.row {
    display: flex;
  }
  
  .column {
    padding: 10px; /* Add some padding for visual clarity */
  }
  
  .left {
    flex: 1 1 30%; /* First column takes up 30% of the space */
  }
  
  .right {
    flex: 1 1 70%; /* Second column takes up 70% of the space */
  }


/* Footer */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: left;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;

}
.free-stuff-btn-footer {
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        display: none; /* Initially hide the links */
        background-color: #f8f8f8;
    }

    .nav-links.active {
        display: flex; /* Show links when active */
    }


    .nav-links li {
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
    }

    .hamburger {
        display: flex; /* Show hamburger on smaller screens */
    }
    .free-stuff-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .hero {
        flex-direction: column;
    }

    .hero-image {
        text-align: center;
        padding-left: 0;
        margin-top: 1rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    footer {
        flex-direction: column;
        gap: 0.5rem;
    }
/* === START: Responsive Dropdown Styles === */

    /* On mobile, style the dropdown container when main nav is open */
    .nav-links.active .dropdown-menu {
        position: static; /* Change position from absolute */
        box-shadow: none; /* Remove shadow */
        border: none; /* Remove borders */
        padding: 5px 0 5px 20px; /* Indent dropdown items */
        background-color: transparent; /* Inherit background */
        min-width: auto; /* Reset min-width */
        border-top: none; /* Remove top border */
        width: 100%; /* Take full width */

        /* Visibility controlled ONLY by .is-active */
        opacity: 0;
        visibility: hidden;
        transform: none; /* Reset transform */
        max-height: 0; /* Use max-height for smooth slide toggle */
        overflow: hidden; /* Hide content when collapsed */
        transition: max-height 0.3s ease-out, opacity 0.3s ease; /* Animate height */
    }

    /* Show mobile dropdown when active */
     .nav-links.active .dropdown-menu.is-active {
        opacity: 1;
        visibility: visible;
        max-height: 500px; /* Adjust as needed - should be large enough for content */
     }

    /* Style links within the mobile dropdown */
    .nav-links.active .dropdown-menu li a {
        padding: 10px 25px; /* Adjust mobile padding */
        font-size: 0.9rem;
        color: #444; /* Match nav link color */
        white-space: normal; /* Allow wrapping */
        text-align: left; /* Align text left within the centered list item */
    }

    .nav-links.active .dropdown-menu li a:hover {
         background-color: #f0f8ff; /* Keep hover effect */
         color: #3498db;
    }

    /* Ensure arrow indicator is displayed on mobile too */
    .nav-links li.has-dropdown > a.dropdown-toggle .dropdown-indicator {
         display: inline-block; /* Keep it visible */
    }

   /* Adjust the main 'Services' link padding on mobile if needed when it has a dropdown */
   .nav-links.active li.has-dropdown > a.dropdown-toggle {
        /* padding-bottom: 0.5rem; */ /* Optional: reduce bottom padding slightly */
   }


    /* === END: Responsive Dropdown Styles === */
}