/* =========================================
   1. Variables & Reset
   ========================================= */
:root {
    /* Colors */
    --color-primary: #D70F15;
    --color-primary-dark: #b00c11;
    --color-secondary: #D70F15;
    /* As per source */
    --color-text: #555555;
    /* Darkened for readability, source was #BABAB9 which is too light for body text */
    --color-text-light: #BABAB9;
    --color-heading: #1a1a1a;
    --color-white: #ffffff;
    --color-light-bg: #f9f9f9;
    --color-border: #e1e1e1;

    /* Fonts */
    --font-primary: 'Gilroy', sans-serif;
    --font-secondary: 'Roboto Slab', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Font Face */
@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* =========================================
   2. Utilities & Components
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-primary);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

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

/* =========================================
   3. Header
   ========================================= */
.header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--color-heading);
}

.nav-link:hover {
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Blog Post Image */
.blog-post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

/* =========================================
   4. Hero Section
   ========================================= */
.hero {
    background: linear-gradient(135deg, rgba(240, 244, 248, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-height: 500px;
    object-fit: cover;
}

/* Page Headers for subpages */
.page-header {
    background-color: var(--color-light-bg);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

/* =========================================
   5. Features
   ========================================= */
.features {
    background-color: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

/* =========================================
   6. CTA Section
   ========================================= */
.cta-section {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.cta-section h2 {
    color: var(--color-white);
}

.cta-section .btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.cta-section .btn-primary:hover {
    background-color: #f1f1f1;
}

/* =========================================
   7. Footer
   ========================================= */
.footer {
    background-color: #000;
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer h3 {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: var(--spacing-md);
    font-size: 0.9rem;
    color: #888;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .header .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 1.5rem 0;
        gap: 1.5rem;
        border-top: 1px solid var(--color-border);
    }

    .header .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .header .nav-menu li {
        width: 100%;
        text-align: center;
    }

    /* Adjust button in mobile menu */
    .header .nav-menu .btn {
        width: 80%;
        margin: 0 auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero p {
        margin: 0 auto var(--spacing-md);
    }
}

/* =========================================
   8. Quote Form Section
   ========================================= */
.quote-section {
    background-color: var(--color-primary-dark);
    /* Company Palette (Dark Red) */
    color: #ffffff;
    padding: var(--spacing-xl) 0;
}

.quote-section h2 {
    color: #ffffff;
    text-align: left;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    font-size: 2rem;
    line-height: 1.3;
}

.quote-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1rem;
    color: #fff;
}

.form-group label span {
    color: #ff4d4d;
    /* Red asterisk default */
}

.quote-section .form-group label span {
    color: #ffd700;
    /* Yellow asterisk on dark red bg */
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border-radius: 6px;
    border: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: #f0f2f5;
    color: #333;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(215, 15, 21, 0.3);
    /* Focus ring using primary color */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.quote-submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.quote-submit-btn:hover {
    background-color: var(--color-primary-dark);
}

@media (min-width: 768px) {
    .quote-section h2 {
        font-size: 2.2rem;
    }
}

/* =========================================
   9. Modal (Judicial Demand)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.modal-product-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
}

.modal-product-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #333;
}

.modal-product-info p {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

/* Fix for labels inside modal (white bg) */
.modal-content .form-group label {
    color: #333;
}

/* =========================================
   10. Import Process Section (Snippet)
   ========================================= */
.import-process {
    margin-top: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.import-image {
    flex: 1;
}

.import-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.import-text {
    flex: 1;
}

.import-text h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--color-heading);
    line-height: 1.2;
}

.section-underline {
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    margin-bottom: 20px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .import-process {
        flex-direction: column;
        text-align: center;
        /* Generally looks better centered on mobile if stacked */
        gap: var(--spacing-md);
    }

    .section-underline {
        margin: 0 auto 20px auto;
        /* Center the underline */
    }

    .import-text p {
        text-align: center !important;
        /* Override inline justify for mobile if desired, or keep as is */
    }

    .import-text .btn {
        width: 100%;
        /* Full width button on mobile */
    }
}

/* =========================================
   11. Audience Section (Quem Atendemos)
   ========================================= */
.audience-section {
    background-color: var(--color-light-bg);
    padding: var(--spacing-xl) 0;
}

.audience-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    /* Smooth rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: none;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.2rem;
}

.icon-patient {
    background-color: #E63946;
}

.icon-doctor {
    background-color: #27AE60;
}

.icon-lawyer {
    background-color: #34495E;
}

.audience-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--color-heading);
    font-weight: 700;
}

.audience-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.link-arrow {
    color: #E63946;
    /* Matching the red accent */
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    /* Optional stylization */
    letter-spacing: 0.5px;
}

.link-arrow:hover {
    gap: 12px;
    /* Slide effect */
    color: #c02835;
}

/* =========================================
   12. Patient Page Styles
   ========================================= */
.process-steps {
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    background-color: var(--color-primary);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(215, 15, 21, 0.3);
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--color-heading);
    font-size: 1.1rem;
}

.step-content p {
    color: #555;
    font-size: 0.95rem;
}

.faq-list {
    margin-top: 2rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.faq-item p {
    color: #555;
    line-height: 1.6;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.doc-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-5px);
}

.doc-card h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.doc-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* =========================================
   13. Blog Styles
   ========================================= */
/* =========================================
   13. Blog Styles
   ========================================= */
.blog-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.blog-card {
    background: #fff;
    border-radius: 20px;
    /* Reduced from potential image rounding, looks like 20px */
    overflow: hidden;
    box-shadow: none;
    /* Starter state, imagery does heavy lifting */
    transition: var(--transition);
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 20px;
    /* Rounded corners for the image wrapper explicitly */
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image-wrapper img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

.blog-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ffffff;
    color: #e63946;
    /* Red text */
    padding: 6px 16px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.blog-content {
    padding: 25px 5px;
    /* Less side padding, aligns with image usually */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
    align-items: center;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    font-size: 1rem;
    color: #999;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2c3e50;
    /* Darker heading */
    line-height: 1.3;
    font-weight: 700;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--color-primary);
}

.blog-excerpt {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    flex-grow: 1;
}

.read-more-btn {
    display: none;
    /* Hidden as per design reference */
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}