/* ============================================================
   GESCON - GESTÃO EMPRESARIAL E CONTABILIDADE
   Stylesheet Principal
   ============================================================ */

/* ============================================================
   1. RESET E VARIÁVEIS CSS
   ============================================================ */

:root {
    --primary-color: #001F3F;
    --secondary-color: #FFD700;
    --dark-color: #0a0e27;
    --light-color: #f8f9fa;
    --accent-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --gray-100: #f5f5f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-800);
    background-color: var(--light-color);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================================
   2. TIPOGRAFIA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ============================================================
   3. NAVBAR / HEADER
   ============================================================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    transition: transform var(--transition-speed) ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Menu Principal */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-list {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.navbar-item {
    position: relative;
}

.navbar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 1rem 1.5rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    border-bottom: 3px solid transparent;
}

.navbar-link:hover,
.navbar-link.active {
    background-color: rgba(255, 215, 0, 0.1);
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '';
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed) ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--gray-200);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.dropdown-menu a:hover {
    background-color: var(--gray-100);
    color: var(--secondary-color);
    padding-left: 2rem;
}

/* CTA Button */
.navbar-cta {
    display: flex;
    gap: 1rem;
}

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

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

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

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

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

/* Mobile Menu Toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

/* ============================================================
   4. SCROLL TO TOP BUTTON
   ============================================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #ffc700;
    transform: translateY(-5px);
}

/* ============================================================
   5. MAIN CONTENT
   ============================================================ */

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

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

/* ============================================================
   6. HERO SECTION
   ============================================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,215,0,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)" /></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease 0.4s both;
}

/* ============================================================
   7. SEÇÕES GENÉRICAS
   ============================================================ */

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto;
}

/* ============================================================
   8. CARDS
   ============================================================ */

.card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
    border-top: 4px solid var(--secondary-color);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-text {
    color: var(--gray-600);
    line-height: 1.8;
}

/* ============================================================
   9. GRID LAYOUT
   ============================================================ */

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================================
   10. FOOTER
   ============================================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    animation: fadeIn 0.8s ease;
}

.footer-title {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.footer-links,
.footer-contact,
.footer-legal {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li,
.footer-legal li {
    margin-bottom: 0.75rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--secondary-color);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.footer-contact i {
    color: var(--secondary-color);
    margin-top: 0.25rem;
    min-width: 20px;
}

.footer-legal li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--secondary-color);
    transition: all var(--transition-speed) ease;
    margin-right: 0.5rem;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

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

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-credit {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-credit a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* ============================================================
   11. FORMULÁRIO
   ============================================================ */

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* ============================================================
   12. ANIMAÇÕES
   ============================================================ */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================================
   13. RESPONSIVIDADE
   ============================================================ */

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-speed) ease;
    }
    
    .navbar-menu.active {
        max-height: 500px;
    }
    
    .navbar-list {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-item {
        width: 100%;
    }
    
    .navbar-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all var(--transition-speed) ease;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.1);
    }
    
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
    }
    
    .navbar-cta {
        width: 100%;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    body {
        font-size: 14px;
    }
    
    .navbar-logo {
        gap: 0.5rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* ============================================================
   14. UTILITÁRIOS
   ============================================================ */

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
