/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* JC Brand Colors */
    --jc-primary: #1d2b44;
    --jc-secondary: #2a3f5f;
    --jc-accent: #e70914;
    --jc-neutral: #f8f9fa;
    --jc-text: #1a1a1a;
    
    /* Legacy aliases */
    --primary-color: #1d2b44;
    --secondary-color: #2a3f5f;
    --accent-color: #e70914;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #d32f2f;
    --success-color: #388e3c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo img {
    width: 200px;
    height: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background-color: var(--bg-light);
}

.btn-cta {
    background-color: var(--accent-color);
    color: var(--bg-white) !important;
    font-weight: 600;
}

.btn-cta:hover {
    background-color: #c20711;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--bg-white);
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

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

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

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

.btn-secondary:hover {
    background-color: #1d2b44;
    transform: translateY(-2px);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card.featured {
    border: 2px solid var(--accent-color);
}

.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
}

.feature-card ul {
    list-style: none;
}

.feature-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.cta-section h2 {
    margin-bottom: 1rem;
    color: var(--bg-white);
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Contactos Section */
.contactos {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.contactos h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-nav {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-nav a {
    color: var(--bg-white);
    text-decoration: underline;
}

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

/* Form Styles */
.form-page {
    padding: 3rem 0;
    background-color: var(--bg-light);
}

.form-page h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.cadastro-form {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.error-message {
    display: block;
    margin-top: 0.25rem;
    color: var(--error-color);
    font-size: 0.875rem;
    min-height: 1.25rem;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Plan Summary */
.plan-summary {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    margin: 2rem 0;
}

.plan-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary-content p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-content .total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    padding-top: 0.5rem;
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

/* Legal Note */
.legal-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 4px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Success Page */
.success-page {
    padding: 4rem 0;
    background-color: var(--bg-light);
    min-height: 70vh;
}

.success-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    margin: 0 auto 2rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.client-info {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    text-align: left;
}

.client-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.client-info p {
    margin-bottom: 0.5rem;
}

.document-actions {
    margin: 3rem 0;
}

.document-actions h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.next-steps {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
    text-align: left;
}

.next-steps h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.75rem;
}

.action-links {
    margin-top: 2rem;
}

/* Document Page */
.document-page {
    background-color: var(--bg-white);
    padding: 2rem 0;
}

.document-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-white);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--jc-primary);
    margin-bottom: 2rem;
    position: relative;
}

.document-header::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--jc-primary);
}

.document-logo img {
    width: 180px;
}

.document-company-info {
    text-align: right;
    font-size: 0.9rem;
    line-height: 1.4;
}

.document-title {
    text-align: center;
    margin-bottom: 2rem;
}

.document-title h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.document-number,
.document-date {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.document-section {
    margin-bottom: 2rem;
}

.document-section h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.info-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--bg-light);
}

.info-table td:first-child {
    width: 200px;
    color: var(--text-light);
}

.service-table,
.financial-table {
    width: 100%;
    border-collapse: collapse;
}

.service-table th,
.service-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.service-table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

.financial-table tr {
    border-bottom: 1px solid var(--bg-light);
}

.financial-table td {
    padding: 0.75rem;
}

.financial-table .amount {
    text-align: right;
    font-weight: 600;
}

.total-row {
    background-color: var(--bg-light);
    font-size: 1.125rem;
}

.total-row .total {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.document-legal {
    background-color: var(--bg-light);
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    margin: 2rem 0;
    font-size: 0.9rem;
}

.document-signature {
    margin-top: 3rem;
}

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

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

.signature-line {
    border-top: 2px solid var(--text-dark);
    margin: 3rem 1rem 0.5rem;
}

/* Signature Image Styles */
.signature-image {
    height: 112px;
    width: auto;
    max-width: 360px;
    margin: 1rem auto 0.5rem;
    display: block;
    object-fit: contain;
}

@media print {
    .signature-image {
        height: 40mm;
        max-height: 40mm;
    }
}

.signature-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.document-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.875rem;
}

.print-actions {
    text-align: center;
    margin: 2rem 0;
}

.print-actions .btn {
    margin: 0 0.5rem;
}

/* Contract Specific */
.contract-section {
    margin-bottom: 2rem;
}

.contract-section h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contract-section ul {
    padding-left: 1.5rem;
}

.contract-section li {
    margin-bottom: 0.5rem;
}

/* Legal Pages */
.legal-page {
    padding: 3rem 0;
    background-color: var(--bg-white);
}

.legal-page h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-page ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .document-container {
        padding: 1.5rem;
    }

    .document-header {
        flex-direction: column;
        gap: 1rem;
    }

    .document-company-info {
        text-align: left;
    }

    .signature-blocks {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .cadastro-form {
        padding: 1.5rem;
    }

    fieldset {
        padding: 1rem;
    }

    .hero {
        padding: 3rem 0;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus Visible for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
