/* ========================================
   VARIÁVEIS E RESET
======================================== */

:root {
    --primary-color: #006d77;
    --secondary-color: #8a9a5b;
    --dark-gray: #343a40;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER
======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo-text h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.logo-text span {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========================================
   DROPDOWN MENU
======================================== */

.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 0.7rem;
    margin-left: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background: #ffffff;
    min-width: 260px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 999;
}

@media (min-width: 993px) {
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(0, 109, 119, 0.08);
    color: var(--primary-color);
}

.dropdown-menu i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* ========================================
   CONTACT BUTTONS
======================================== */

.contact-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: 1rem;
}

.btn-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-contact:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-contact i {
    font-size: 1.2rem;
}

.btn-contact .contact-name {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

.btn-contact .contact-phone {
    font-size: 0.9rem;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   HERO TOOL
======================================== */

.hero-tool {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 109, 119, 0.9), rgba(52, 58, 64, 0.8));
    background-image: url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1920');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.hero-icon i {
    font-size: 3rem;
    color: var(--white);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* ========================================
   TOOL SECTION
======================================== */

.tool-section {
    padding: 4rem 0;
    background: var(--light-gray);
    min-height: calc(100vh - 300px);
}

.tool-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ========================================
   PAINEL DE CONTROLES
======================================== */

.tool-controls {
    background: var(--light-gray);
    padding: 2rem;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.tool-controls h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-controls h3 i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.tool-controls h4 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin: 2rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-controls h4 i {
    color: var(--primary-color);
}

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

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.control-group label i {
    color: var(--primary-color);
    font-size: 1rem;
}

.control-group input[type="text"],
.control-group input[type="email"],
.control-group input[type="tel"],
.control-group textarea,
.control-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}

.control-group input:focus,
.control-group textarea:focus,
.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.1);
}

.control-group textarea {
    resize: vertical;
    min-height: 60px;
}

.btn-upload,
.btn-remove,
.btn-clear {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    background: rgba(0, 109, 119, 0.05);
}

.btn-remove,
.btn-clear {
    border-style: solid;
    border-color: #dc3545;
    color: #dc3545;
    width: auto;
    padding: 0.5rem 1rem;
}

.btn-remove:hover,
.btn-clear:hover {
    background: rgba(220, 53, 69, 0.05);
}

.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 2rem 0;
}

/* ========================================
   PDF INFO
======================================== */

.pdf-info {
    margin-top: 1rem;
}

.pdf-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.pdf-preview i {
    font-size: 2rem;
    color: #dc3545;
}

.pdf-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pdf-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.pdf-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ========================================
   CHECKBOX GROUP
======================================== */

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.125rem;
    cursor: pointer;
}

.checkbox-group span {
    flex: 1;
    line-height: 1.5;
}

/* ========================================
   ALERT
======================================== */

.alert {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert-info {
    background: #e7f3ff;
    border-left: 4px solid #2196f3;
}

.alert i {
    font-size: 1.25rem;
    color: #2196f3;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.alert p {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

.control-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

/* ========================================
   PREVIEW E EXPORTAÇÃO
======================================== */

.tool-preview {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.preview-header h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-header h3 i {
    color: var(--primary-color);
}

/* ========================================
   PDF VIEWER
======================================== */

.pdf-viewer {
    min-height: 500px;
    background: var(--white);
    border: 2px dashed #e0e0e0;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.pdf-placeholder {
    text-align: center;
    color: var(--text-light);
}

.pdf-placeholder i {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: #dc3545;
}

.pdf-placeholder p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pdf-placeholder small {
    font-size: 1rem;
}

/* ========================================
   STATUS E RESULTADO
======================================== */

.status-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--light-gray);
    border-radius: 15px;
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.status-card h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.status-card p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ========================================
   INSTRUÇÕES
======================================== */

.instructions {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.instructions h4 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions h4 i {
    color: var(--primary-color);
}

.instructions ol {
    margin-left: 1.5rem;
    color: var(--text-dark);
}

.instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ========================================
   BOTÕES
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn i {
    font-size: 1rem;
}

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

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

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

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

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-large i {
    font-size: 1.3rem;
}

/* ========================================
   CTA SECTION
======================================== */

.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-gray));
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

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

.cta-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   FOOTER
======================================== */

.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    font-family: var(--font-serif);
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-col p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-info li span {
    text-align: justify;
    line-height: 1.6;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1200px) {
    .tool-wrapper {
        grid-template-columns: 350px 1fr;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .contact-buttons {
        gap: 0.5rem;
        margin-left: 0.75rem;
    }
    
    .btn-contact {
        min-width: 100px;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        padding-left: 1rem;
    }
    
    .nav.active .nav-dropdown .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .contact-buttons {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-top: 2rem;
        gap: 1rem;
    }
    
    .btn-contact {
        width: 100%;
        min-width: unset;
        padding: 1rem;
        justify-content: center;
    }
    
    .btn-contact i {
        font-size: 1.5rem;
    }
    
    .btn-contact .contact-name {
        font-size: 0.9rem;
    }
    
    .btn-contact .contact-phone {
        font-size: 0.85rem;
    }
    
    .tool-wrapper {
        grid-template-columns: 1fr;
    }
    
    .tool-controls {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .pdf-viewer {
        padding: 1rem;
        min-height: 350px;
    }
    
    .tool-controls,
    .tool-preview {
        padding: 1.5rem;
    }
}
/* ========================================
MODAL SIGNATÁRIO
======================================== */
.modal-signatario {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    font-family: var(--font-serif);
    color: var(--text-dark);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--light-gray);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ========================================
LISTA DE SIGNATÁRIOS
======================================== */
.signatarios-list {
    margin-top: 1.5rem;
}

.signatarios-list h5 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signatario-card {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

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

.signatario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.signatario-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.signatario-index {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.signatario-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-remove {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-edit:hover {
    background: #005761;
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #c82333;
}

.signatario-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.signatario-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signatario-details i {
    color: var(--primary-color);
    font-size: 0.9rem;
}