/* Basic reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scroll for navigation links */
}

body, h1, h2, h3, h4, h5, h6, ul, li, p, form {
    list-style-type: none;
}

/* Make all heading tags the same size */
h1, h2, h3, h4, h5, h6 {
    font-size: 2.3rem; /* Set the desired size for all headings */
    color: #004080; /* Maintain consistent color */
    font-weight: 700; /* Consistent font weight */
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Body styling */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4f8;
    color: #0f3252;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Header styling */
header {
    background-color: white;
    color: #004080;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo img {
    max-width: 150px;
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05);
}

/* Hero Section Styling */
.tax-planning-image {
    background-image: url('taxplanning.jpg'); /* Replace with your image URL */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    border-radius: 0;
}

.tax-planning-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 64, 128, 0.5); /* Dark overlay */
    z-index: 1;
}

.tax-planning-image h1 {
    color: white;
    font-size: 3rem; /* Specific styling for h1 in this section */
    font-weight: bold;
    z-index: 2; /* Text on top of overlay */
    text-align: center;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8); /* Enhanced text shadow */
    line-height: 1.2;
    margin: 0 20px;
}

/* Smooth Divider Between Sections */
.section-divider {
    width: 100%;
    height: 80px;
    background: url('divider.svg') no-repeat center;
    margin-bottom: -80px;
    position: relative;
    z-index: 1;
}

/* Navigation styles */
nav ul {
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #004080;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(0, 64, 128, 0.1);
    border-radius: 5px;
}

/* Main content with CSS Grid Layout */
main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Section styling with subtle gradient */
section {
    background: linear-gradient(145deg, #ffffff, #f7f9fc); /* Soft gradient */
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUpSection 0.8s ease forwards;
}

@keyframes fadeInUpSection {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Section content */
section h2 {
    font-size: 2.3rem;
    color: #004080;
    margin-bottom: 20px;
    font-weight: 700;
}

section p {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 20px 0;
}

/* Section button with micro-interaction */
.button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #004080;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s;
}

.button:hover {
    background-color: #003366;
    transform: scale(1.05); /* Slight zoom effect on hover */
}

/* Alternating section background colors */
section:nth-child(odd) {
    background-color: #f9f9f9;
}

section:nth-child(even) {
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
}

/* Footer styling with Back-to-Top button */
footer {
    background: white;
    color: #004080;
    padding: 50px 0;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.back-to-top {
    position: absolute;
    top: -50px;
    right: 30px;
    background-color: #004080;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.back-to-top:hover {
    background-color: #003366;
}

.footer-links a {
    color: #004080;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Social media icons */
.social-media img {
    width: 30px;
    margin: 0 10px;
    filter: brightness(0) invert(0.5);
    transition: transform 0.3s ease;
}

.social-media img:hover {
    transform: scale(1.1);
}

/* Responsive styles */
@media only screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .tax-planning-image {
        height: 300px; /* Adjusted height for mobile */
        background-attachment: scroll; /* Avoid 'fixed' on mobile */
        background-size: contain; /* Adjust background scaling for smaller screens */
    }

    .tax-planning-image h1 {
        font-size: 3rem;
    }

    main {
        padding: 30px;
    }

    footer {
        font-size: 0.85rem;
    }
}