/* 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: #0d69c5;
    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;
}

/* Pain point Section */
.pain-point-missed-calls {
  padding: 3rem 2rem;
  text-align: left;
  background-color: #ffffff; /* Lighter blue background */
  /* --- ADD THIS --- */
  margin: 0 auto; /* Centers the block if it has max-width (good practice) */
  max-width: 1200px; /* Example: Give the section a max-width */
  /* or if you just want space on sides without centering a narrower block: */
  /* margin: 0 2rem; */ /* Add 2rem margin on left and right */
  /* --- END ADDITION --- */
}

.pain-point-missed-calls h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #034d96;
}

.pain-point-missed-calls p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  max-width: 720px; /* Limit width for readability */
  /* --- FIX THIS --- */
  /* margin-left: 20px; /* Center the paragraph - Incorrect way */
  margin: 0 auto; /* Correct way to center a block element with max-width */
  /* --- END FIX --- */
}

/* Pain point Section */
.pain-point-customer-service {
  padding: 3rem 2rem;
  text-align: left;
  background-color: #ffffff; /* Lighter blue background */
   /* --- ADD THIS --- */
  margin: 0 auto; /* Centers the block if it has max-width (good practice) */
  max-width: 1200px; /* Example: Give the section a max-width */
  /* or if you just want space on sides without centering a narrower block: */
  /* margin: 0 2rem; */ /* Add 2rem margin on left and right */
  /* --- END ADDITION --- */
}

.pain-point-customer-service h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #034d96;
}

.pain-point-customer-service p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  max-width: 800px; /* Limit width for readability */
  /* --- FIX THIS --- */
  /* margin-left: 20px; /* Center the paragraph - Incorrect way */
  margin: 0 auto; /* Correct way to center a block element with max-width */
  /* --- END FIX --- */
}

/* Experience Section */
.experience {
  padding: 3rem 2rem;
  text-align: center;
  background-color: #e0f2f7; /* Lighter blue background */
}

.experience h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #034d96;
}

.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 Container: Controls the layout of the main sections (columns wrapper + bottom row) */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 0.95em;
    line-height: 1.6;

    display: flex;
    flex-direction: column; /* Stack the main sections vertically */
    gap: 30px; /* Space between the columns wrapper and the bottom row */
}

/* Container for the three main columns: Controls their side-by-side or stacked layout */
.footer-columns-container {
    display: flex;
    flex-direction: row; /* Arrange columns horizontally by default (large screens) */
    flex-wrap: wrap; /* Allow columns to wrap if they don't fit */
    justify-content: space-between; /* Distribute space between columns */
    gap: 30px; /* Adds space BETWEEN the columns */
    width: 100%; /* Ensure this container takes full width within the footer */
}

/* Styling for each footer column */
.footer-column {
    /* flex-grow, flex-shrink, flex-basis */
    /* Allow columns to grow, don't shrink below 250px, start with a base size */
    /* Use min-width here as it often plays better with flex-wrap than just flex-basis */
    flex: 1; /* Allow column to grow and shrink */
    min-width: 250px; /* Minimum width before wrapping */
    max-width: 350px; /* Optional: Prevent columns from getting too wide */
    text-align: left; /* Align text within each column on large screens */
}

/* Styling for specific column types (optional, but good for targeting) */
.footer-column.contact-info {
    /* Specific styles */
}

/* Styling for the footer button */
.free-stuff-btn-footer {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    /* margin-left: auto; -- Removed, align using text-align on parent if needed */
}

.free-stuff-btn-footer:hover {
    background-color: #0056b3;
}

/* Styling for the bottom footer row (copyright, legal links) */
.footer-bottom {
    width: 100%; /* Ensures this section spans the full width below the columns */
    text-align: center; /* Center the text in the bottom row */
    margin-top: 0; /* Margin handled by footer's gap */
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.85em;

    /* Make this a flex container to control the layout of its children (paragraphs) */
    display: flex;
    flex-direction: column; /* Stack paragraphs vertically by default */
    align-items: center; /* Center the stacked paragraphs */
    gap: 10px; /* Space between the paragraphs */
}

/* Remove default paragraph margins within footer-bottom */
.footer-bottom p {
    margin: 0;
}

/* Styling for links within the footer (general) */
.footer a {
    color: #00bfff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Styling for the navigation list within the footer-nav column */
.footer-column.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column.footer-nav li {
    margin-bottom: 10px;
}

/* Styling for strong tags used as headings within columns */
.footer-column strong {
    display: block;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #ddd;
}

/* Styling for Social Links Section */
.social-links {
    margin-top: 20px;
}

.social-links strong {
    margin-bottom: 10px;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
}

.social-links img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

/* Remove margin from the last social link */
.social-links a:last-child {
    margin-right: 0;
}

/* Styling for External Links Section */
.external-links {
    margin-top: 20px;
    font-size: 0.9em;
}

.external-links a {
    display: block; /* Stack external links vertically */
    margin-bottom: 5px;
}

/* Styling for legal links within the footer-bottom paragraphs (large screens) */
.footer-bottom p a {
    margin: 0 10px; /* Space between legal links */
    display: inline-block; /* Keep links side-by-side if space allows */
}



/* 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: Still stacks main sections, only adjust gap/padding if needed */
    footer {
        /* flex-direction: column and gap are already set in base styles */
        align-items: center; /* Center the column container and bottom row */
        gap: 40px; /* Increase space BETWEEN the main sections on small screens */
        padding: 30px 15px; /* Adjust padding */
    }

    /* Column Container: Now stack its children (the columns) */
    .footer-columns-container {
        flex-direction: column; /* Stack the columns vertically */
        align-items: center; /* Center the stacked columns within the container */
        gap: 40px; /* Increase space BETWEEN the stacked columns */
        width: 100%; /* Ensure container takes full width */
    }

    /* Individual Columns: Take full width within their stacked container */
    .footer-column {
        flex: 1 1 100%; /* Allow columns to take full width when stacked */
        max-width: 100%; /* Ensure they don't exceed container width */
        text-align: center; /* Center text within stacked columns */
    }

    /* Redundant text-align, but doesn't hurt */
    .footer-column.contact-info,
    .footer-column.footer-nav,
    .footer-column.footer-cta {
         text-align: center;
    }

    .footer-column.footer-nav ul {
        padding: 0;
    }

    .footer-column.footer-nav li {
         margin-bottom: 8px;
    }

    .social-links {
        text-align: center;
    }
    .social-links a {
         margin: 0 10px;
    }

    .external-links {
        text-align: center;
    }

    /* Footer Bottom: Already stacking internal items, adjust gap if needed */
    .footer-bottom {
         margin-top: 0; /* Margin handled by footer gap */
         /* flex-direction: column and align-items are already set in base */
         gap: 10px; /* Space between paragraphs */
    }

     /* Style for legal links within the footer-bottom paragraphs on small screens */
     .footer-bottom p a {
        margin: 5px 0; /* Add vertical margin */
        display: block; /* Make links stack vertically */
    }


}

/* === 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 === */
