/*
=========================================================
Style Sheet for SecureLife PWA Insurance Website
=========================================================

TABLE OF CONTENTS
---------------------------------------------------------
1.  :root Variables & Basic Setup
2.  General Layout & Typography (container, body, etc.)
3.  Header & Navigation
4.  Footer
5.  Buttons & Generic UI Elements
6.  Home Page Hero Section
7.  Product Grid & Cards (Used on Home & Products page)
8.  Quote Form Styles
9.  Refined Product Detail Page Styles
    - Product Hero & Intro
    - Detail Sections (Overview, Features, Benefits)
    - Lists & CTA Banner
10. Responsive Design (Media Queries)

---------------------------------------------------------
*/

/* --- 1. :root Variables & Basic Setup --- */
:root {
    --primary-color: #0056b3;      /* A strong, trustworthy blue */
    --secondary-color: #007bff;    /* A slightly brighter blue for interactions */
    --accent-color: #28a745;       /* Green for success, checkmarks */
    --dark-color: #343a40;         /* Dark grey for text and footers */
    --light-color: #f8f9fa;        /* Very light grey for backgrounds */
    --text-color: #495057;         /* Softer grey for body text */
    --border-color: #dee2e6;       /* Standard border color */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* --- 2. General Layout & Typography --- */
body {
    font-family: var(--font-family);
    margin: 0;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    line-height: 1.3;
}

.page-content {
    padding: 3rem 0;
}

/* --- 3. Header & Navigation --- */
header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-color);
}
.logo:hover {
    text-decoration: none;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    font-weight: 600;
    font-size: 1rem;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}
header nav ul li a:hover {
    text-decoration: none;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- 4. Footer --- */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 3rem;
}

/* --- 5. Buttons & Generic UI Elements --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}
.btn-primary {
    background-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #004494;
}
.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}
.category-badge {
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

/* --- 6. Home Page Hero Section --- */
.hero {
    background-color: var(--dark-color);
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero-background.jpg'); /* Optional: Add a subtle background image */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 6rem 1rem;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}
.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

/* --- 7. Product Grid & Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
.product-grid.full-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}
.product-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}
.product-card p {
    flex-grow: 1; /* Makes sure the cards are equal height */
}
.product-card .btn {
    margin-top: auto; /* Pushes button to the bottom */
}


/* --- 8. Quote Form Styles --- */
.styled-form {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Crucial for padding and width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}
#form-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    display: none;
    border: 1px solid transparent;
}
#form-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
#form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* --- 9. Refined Product Detail Page Styles --- */
.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}
.product-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.product-intro h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.product-intro .detail-badge {
    font-size: 1rem;
}
.product-short-desc {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
}
.detail-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}
.detail-section:first-of-type {
    padding-top: 0;
}
.detail-section h2 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.detail-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.features-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.styled-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.styled-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
    font-size: 1.05rem;
}
.styled-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}
.cta-banner {
    background-color: var(--light-color);
    text-align: center;
    padding: 3rem;
    border-radius: 8px;
    margin-top: 3rem;
}
.cta-banner h3 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--dark-color);
}
.cta-banner p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 10. Responsive Design (Media Queries) --- */
@media (max-width: 992px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .product-image-container {
        order: -1; /* Move image to top on tablets */
        margin-bottom: 1rem;
    }
    .features-benefits-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    header nav {
        flex-direction: column;
        gap: 1rem;
    }
    header nav ul {
        padding-left: 0;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap; /* Allow nav items to wrap if needed */
    }
    header nav ul li {
        margin-left: 10px;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .styled-form {
        padding: 1.5rem;
        margin-left: 0;
        margin-right: 0;
    }
    .product-intro h1 {
        font-size: 2.2rem;
    }
    .detail-section h2 {
        font-size: 1.8rem;
    }
}