/**
 * ARCHITECTURAL NOTES:
 *
 * 1.  CSS Custom Properties (Variables): The :root selector establishes global design tokens 
 *     for colors and fonts. This is our "single source of truth" for styling. Changing a color
 *     here will propagate it throughout the site, ensuring brand consistency and making
 *     refactoring trivial. This is a core principle of a maintainable design system.
 *
 * 2.  Mobile-First Design: The base styles are designed for narrow viewports. Media queries 
 *     (`@media`) then progressively enhance the layout for larger screens (e.g., tablet, desktop).
 *     This is a more robust and scalable approach than designing for desktop first and then
 *     trying to "shrink" the design.
 *
 * 3.  Modularity and Reusability: Classes like `.container` act as reusable layout primitives.
 *     Component-like styles (e.g., `.service-card`) are self-contained, making them easy to
 *     understand, modify, or even move without breaking other parts of the page.
 *
 * 4.  Readability and Flow: The use of `rems` for typography and spacing allows the layout to scale
 *     proportionally with the user's base font size, improving accessibility and maintaining
 *     visual harmony. The vertical rhythm is established through consistent margins.
 */

:root {
    --primary-color: #0a2e5c; /* Deep, professional blue */
    --secondary-color: #00bfff; /* Bright, modern cyan for accents */
    --background-color: #f4f7fa; /* Light, clean gray */
    --text-color: #333;
    --card-bg-color: #ffffff;
    --header-footer-bg: #ffffff;

    --font-family: 'Poppins', sans-serif;
}

/* Base Reset & Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header & Footer */
header, footer {
    background-color: var(--header-footer-bg);
    padding: 1rem 0; /* Reduced padding for mobile */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem; /* Reduced font size for mobile */
}

footer {
    margin-top: 0; /* Removed margin-top to connect with policies section */
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #666;
    background-color: #e9eef2; /* Slightly different footer bg */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--secondary-color);
}


/* Main Content Sections */
main section {
    padding: 3rem 0; /* Reduced padding for mobile */
    text-align: center;
}

main h2 {
    font-size: 2rem; /* Reduced font size for mobile */
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

main p {
    font-size: 1rem; /* Adjusted for better readability on small screens */
    max-width: 800px;
    margin: 0 auto 1.5rem auto; /* Adjusted margin */
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(10, 46, 92, 0.8), rgba(10, 46, 92, 0.8)), url('https://www.transparenttextures.com/patterns/clean-gray-paper.png');
    background-color: var(--primary-color);
    color: #fff;
    padding: 4rem 0; /* Reduced padding for mobile */
}

#hero h2 {
    color: #fff;
    font-size: 2.2rem; /* Reduced font size for mobile */
    font-weight: 700;
}

#hero .subtitle {
    font-size: 1.1rem; /* Adjusted for mobile */
    font-weight: 300;
    opacity: 0.9;
}

/* Services Section */
#services {
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Reduced gap for mobile */
    margin-top: 2rem;
    text-align: left;
}

.service-card {
    background-color: var(--card-bg-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem; /* Reduced padding for mobile */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem; /* Reduced font size for mobile */
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--secondary-color); /* Thinner border */
    padding-left: 1rem;
}

.service-card p {
    /* TYPOGRAPHIC CONTROL: These properties prevent long words from breaking the layout on narrow screens. */
    overflow-wrap: break-word;
    word-wrap: break-word; /* Legacy fallback */
    hyphens: auto;
}


/* Products Section */
#products {
    background-color: var(--background-color);
}

/* Policies Section */
#policies {
    background-color: #e9eef2; /* Light blue-gray background */
    padding-bottom: 3rem;
    padding-top: 3rem;
}

.policy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.policy-item h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.policy-item p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.contact-email {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: var(--secondary-color);
}


/* Responsive Design - Tablet and Up */
@media (min-width: 768px) {
    header, footer {
        padding: 1.5rem 0; /* Restore padding */
        text-align: left;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    header h1 {
        font-size: 2.2rem; /* Restore font size */
    }

    main section {
        padding: 4rem 0; /* Restore padding */
        text-align: left;
    }

    main h2 {
        font-size: 2.8rem; /* Restore font size */
    }

    main p {
        font-size: 1.1rem; /* Restore font size */
        margin-left: 0;
        margin-right: 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem; /* Restore gap */
    }

    .policy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card {
        padding: 2rem; /* Restore padding */
    }

    .service-card h3 {
        font-size: 1.5rem; /* Restore font size */
    }

    #hero {
        padding: 6rem 0; /* Restore padding */
        text-align: center;
    }

    #hero h2 {
        font-size: 3rem; /* Restore font size */
    }

    #hero .subtitle {
        font-size: 1.25rem; /* Restore font size */
    }

    #hero p {
        margin: 0 auto 2rem auto;
    }

}

@media (min-width: 1024px) {
    #hero h2 {
        font-size: 3.5rem; /* Larger font size for desktops */
    }
}
