/*
* styles.css
*
* This file contains the main Cascading Style Sheets (CSS) rules for the IncomeTAX HUB website.
* CSS controls the visual presentation of your HTML content, defining colors, fonts, layout, and responsiveness.
*/

/* --- Global Variables (CSS Custom Properties) --- */
/*
* Using CSS variables (custom properties) allows for easy theme management and consistency.
* If you want to change a primary color, you only need to change it here.
*/
:root {
    --color-primary: #FF3B30;     /* A vibrant red, commonly associated with alerts or action, for accents and calls to action. */
    --color-dark: #1C1C1E;        /* A very dark grey, almost black, serving as the primary background color for a modern, deep look. */
    --color-light: #FFFFFF;       /* Pure white, ideal for text on dark backgrounds and for clean, highlighted elements. */
    --color-text-light: #E0E0E0;  /* A soft light grey for general text on dark backgrounds, providing good readability without harsh contrast. */
    --color-text-dark: #3A3A3C;   /* A darker grey for text on light backgrounds, ensuring legibility. */
    --color-background-secondary: #2C2C2E; /* A slightly lighter dark grey for contrasting sections or elements against the primary dark background. */

    --font-family-body: 'Inter', sans-serif; /* A modern, clean sans-serif font suitable for tech and fintech themes. */
    --font-family-heading: 'Poppins', sans-serif; /* A strong, modern sans-serif font for headlines to give visual impact. */
}

/* --- Base Body Styles --- */
/*
* These styles apply to the entire body of the document, establishing default font, background, and text colors.
* 'margin: 0; padding: 0;' removes default browser spacing.
* 'box-sizing: border-box;' ensures consistent box model behavior across all elements.
*/
body {
    margin: 0; /* Remove default body margin */
    padding: 0; /* Remove default body padding */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    font-family: var(--font-family-body); /* Apply the chosen body font */
    background-color: var(--color-dark); /* Set the primary dark background color */
    color: var(--color-text-light); /* Set the default text color for the body */
    line-height: 1.6; /* Improve readability by increasing line spacing */
    -webkit-font-smoothing: antialiased; /* Enhance font rendering on macOS/iOS */
    -moz-osx-font-smoothing: grayscale; /* Enhance font rendering on macOS/iOS */
}

/* --- Header Styles --- */
/*
* The header typically contains the site title/logo and navigation.
* 'display: flex' and 'justify-content: space-between' are used for flexible alignment of logo and potential navigation.
*/
header {
    background-color: var(--color-background-secondary); /* Use a slightly different dark shade for header background */
    color: var(--color-light); /* Ensure header text/elements are light */
    padding: 1rem 2rem; /* Add vertical and horizontal padding */
    display: flex; /* Enable flexbox for alignment of children */
    align-items: center; /* Vertically align items in the center */
    justify-content: space-between; /* Distribute space between items (logo and potential nav) */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    position: sticky; /* Make the header stick to the top on scroll */
    top: 0;
    z-index: 1000; /* Ensure header is above other content */
}

/* --- Logo Container Styles --- */
/*
* Styles for the div containing the logo. This allows for flexible placement and styling of the logo itself.
*/
header .logo {
    display: flex; /* Use flexbox to align logo image and text if present */
    align-items: center; /* Vertically align items within the logo container */
}

/* --- Logo Image Styles --- */
/*
* Styles specifically for the logo image placeholder.
* Adjust 'height' to control the logo's size.
*/
header .logo img {
    height: 50px; /* Increased from 40px for better visibility */
    margin-right: 15px; /* Space between logo and site title (if title is text) */
    background-color: var(--color-light); /* Add a light background to make dark parts of the logo visible */
    border-radius: 50%; /* Make the background circular */
    padding: 2px; /* Add a little space around the logo */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* --- Navigation Styles --- */
.mobile-cta {
    display: none; /* Hide mobile CTA on desktop */
}

nav ul {
    list-style: none; /* Remove default bullet points */
    margin: 0;
    padding: 0;
    display: flex; /* Align navigation items horizontally */
    align-items: center; /* Vertically align items */
}

nav ul li {
    margin-left: 2rem; /* Space between navigation items */
}

nav ul li a {
    color: var(--color-text-light);
    text-decoration: none; /* Remove underline from links */
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

/* --- Navigation Link Hover Effect --- */
nav ul li a:hover {
    color: var(--color-primary); /* Change color on hover */
}

/* Add a subtle underline effect on hover */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-primary);
    transform: scaleX(0); /* Initially hidden */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav ul li a:hover::after {
    transform: scaleX(1); /* Reveal on hover */
    transform-origin: bottom left;
}


/* --- Call-to-Action (CTA) Button Styles --- */
.button-cta {
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

/* --- CTA Button Hover Effect --- */
.button-cta:hover {
    background-color: #D93228; /* A slightly darker red on hover */
    transform: translateY(-2px); /* Add a subtle lift effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Hamburger Menu Styles --- */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010; /* Ensure it's above other header elements */
    position: relative; /* Needed for absolute positioning of lines */
}

.hamburger-line {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--color-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: absolute; /* Position lines for transformation */
    left: 0; /* Align lines to the left */
}

/* Position the three lines within the hamburger button */
.hamburger-menu .hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-menu .hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu .hamburger-line:nth-child(3) {
    bottom: 0;
}

/* Transform to 'X' when menu is open */
.hamburger-menu.open .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0; /* Hide middle line */
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    bottom: auto; /* Unset bottom property */
}


/* --- Heading (H1, H2) Styles --- */
/*
* These rules define the look of your main headings.
* Using 'var(--font-family-heading)' provides a distinct font for headings.
*/
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading); /* Apply the chosen heading font */
    color: var(--color-light); /* Headings typically stand out with a light color on dark backgrounds */
    font-weight: 700; /* Bold headings for impact */
    margin-top: 0; /* Remove default top margin for better spacing control */
    margin-bottom: 1rem; /* Add some space below headings */
}

h1 {
    font-size: 1.5rem; /* Adjusted font size for header title */
    margin: 0; /* No margin for H1 within the header to control layout */
    letter-spacing: 0.05em; /* Slightly increased letter spacing for a modern look */
    /* text-transform: uppercase; */ /* Removed to allow for mixed case branding */
}

h2 {
    font-size: 2rem; /* Slightly smaller than H1 for main section titles */
    color: var(--color-primary); /* Use primary accent color for section headings */
}

/* --- Main Content Area Styles --- */
/*
* The 'main' tag holds the dominant content of the <body>.
* 'padding' adds space around the content.
* 'text-align: center' is a common choice for landing pages, creating a focused feel.
*/
main {
    padding: 2rem; /* Add padding around the main content area */
    text-align: center; /* Center-align text and inline content within main */
    max-width: 1200px; /* Limit the maximum width of the content for readability */
    margin: 0 auto; /* Center the main content block on larger screens */
}

/* --- Section Styles --- */
/*
* 'section' elements group related content.
* 'margin-bottom' creates separation between different content sections.
*/
section {
    margin-bottom: 3rem; /* Space between different sections of the page */
    padding: 2rem; /* Inner padding for sections */
    background-color: var(--color-background-secondary); /* Background for sections to stand out */
    border-radius: 8px; /* Slightly rounded corners for a modern feel */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* More pronounced shadow for sections */
}

/* --- Paragraph Styles --- */
/*
* Basic styling for paragraph text.
*/
p {
    font-size: 1.1rem; /* Slightly larger font size for body text */
    color: var(--color-text-light); /* Use light text color for paragraphs */
    margin-bottom: 1rem; /* Space below paragraphs */
}

/* --- Footer Styles --- */
/*
* The footer contains copyright information and other boilerplate.
*/
footer {
    background-color: #121212; /* Even darker background for footer */
    color: var(--color-text-light);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0% 100%); /* Angled top edge for style */
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.footer-about, .footer-links, .footer-social {
    flex: 1;
    min-width: 200px; /* Ensure columns don't get too squished */
}

.footer-about .logo img {
    height: 50px;
    background-color: var(--color-light);
    border-radius: 50%;
    padding: 2px;
    margin-bottom: 1rem;
}

.footer-about p {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.footer-links h4 {
    font-family: var(--font-family-heading);
    color: var(--color-light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--color-primary);
}

.footer-social h4 {
    font-family: var(--font-family-heading);
    color: var(--color-light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-social a {
    display: inline-block;
    margin-right: 1rem;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 1.5rem; /* Larger for icon placeholders */
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding-top: 1rem;
    margin-top: 2rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #777;
    margin: 0;
}


/* --- Utility Classes (Example) --- */
/*
* Utility classes are small, single-purpose classes that can be reused.
*/
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

/* --- Responsive Design (Example Media Query) --- */
/*
* Media queries allow styles to change based on screen size, making the site responsive.
* This example makes padding smaller on very small screens.
*/
@media (max-width: 768px) {
    header nav, .header-actions {
        display: none;
    }

    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }

    /* Show mobile CTA and hide the desktop one */
    .mobile-cta {
        display: block;
        margin-bottom: 1.5rem; /* Add space below the mobile button */
    }

    /* Style the navigation for mobile */
    nav {
        position: absolute;
        top: 72px; /* Position below the header (accounting for new logo size) */
        left: 0;
        width: 100%;
        background-color: var(--color-background-secondary);
        flex-direction: column;
        align-items: center;
        display: none; /* Hidden by default */
        border-bottom: 1px solid var(--color-primary);
    }

    /* When the menu is open */
    nav.open {
        display: flex;
        padding-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    nav ul li {
        margin: 1rem 0;
    }

    header, footer {
        padding: 1rem;
    }

    footer {
        clip-path: none; /* Remove angled top on mobile for simplicity */
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-social a {
        margin: 0 0.5rem;
    }

}