/* Custom CSS for GW Perícias - UPDATED VERSION 3.0 - ACCESSIBILITY & LGPD */

/* Global Styles */
:root {
    --primary-color: #0d4a30;
    --secondary-color: #2c712d;
    --accent-color: #4c9a2a;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-color: #062615;
    --light-color: #f8f9fa;
    --text-primary: #0d4a30;
    --text-secondary: #666666;
    --white: #ffffff;
    --heading-font: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* Remove default margins and ensure no gaps */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    padding-top: 110px; /* Increased to match taller navbar */
    color: var(--text-primary);
    margin: 0; /* Remove any default margin */
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100000;
    border-radius: 4px;
    font-weight: bold;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Focus management for better accessibility */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast for better readability */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* LGPD Cookie Banner Styles */
.cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
    border-top: 3px solid var(--accent-color);
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Gradient backgrounds for enhanced design */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Override Bootstrap primary color classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 74, 48, 0.4);
    color: var(--white);
}

/* Contact Submit Button - Override Bootstrap */
.contact-submit-btn.btn-primary,
.contact-submit-btn.btn-primary:hover,
.contact-submit-btn.btn-primary:focus,
.contact-submit-btn.btn-primary:active {
    color: var(--white) !important;
    background-color: var(--primary-color) !important;
}

.contact-submit-btn.btn-primary:hover {
    background-color: var(--secondary-color) !important;
}

/* Headings and titles */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

h1, h2 {
    font-family: var(--heading-font);
}

.display-4, .display-5 {
    color: var(--primary-color);
    font-family: var(--heading-font);
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
}

/* Icons */
.fas, .fab {
    color: inherit;
}

/* Text colors */
.text-warning {
    color: var(--accent-color) !important;
}
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: all 0.3s ease;
    background: var(--primary-color) !important;
    border-bottom: 3px solid var(--accent-color);
    padding-top: 1.8rem;  /* Increased more padding to make navbar taller */
    padding-bottom: 1.8rem;  /* Increased more padding to make navbar taller */
    margin-bottom: -5px; /* Increased negative margin to eliminate gap */
    z-index: 1030; /* Ensure it stays on top */
}

.navbar-brand {
    font-size: 1.6rem;  /* Slightly larger font */
    font-weight: 700;
}

.navbar-brand img {
    height: 50px;  /* Increased logo height */
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    margin-top: -3px; /* Pull up to eliminate any gap with navbar */
    padding-top: 7rem; /* Ensure enough padding for content */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/logo%20GW%20pericias.png') no-repeat center center;
    background-size: 800px auto;
    opacity: 0.05;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: var(--white) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 800;
}

.hero-section .lead {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 640px;
}

.hero-image {
    position: relative;
    z-index: 1;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding-top: 150px !important; /* Increased to match taller navbar */
    margin-top: -5px; /* Increased to match navbar margin */
}

/* Cards and Components */
.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-top: 3px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

/* Stats Section */
.stats-section .stat-item {
    padding: 2rem 1.5rem;
    background: var(--white);
    border-top: 3px solid var(--accent-color);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stats-section .stat-item:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.stats-section .stat-item i {
    color: var(--accent-color) !important;
}

.stats-section .stat-item h3 {
    color: var(--primary-color);
    font-family: var(--heading-font);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 74, 48, 0.4);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    border: none;
    color: var(--dark-color);
}

.btn-warning:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 154, 42, 0.4);
    color: var(--dark-color);
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 154, 42, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Form validation */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 154, 42, 0.25) !important;
}

/* Alerts and notifications */
.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(76, 154, 42, 0.1);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

/* Contact Section */
.contact-info .card {
    border-left: 4px solid var(--accent-color);
}

/* Process Steps */
.process-step {
    position: relative;
}

.step-number {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--primary-color) !important;
}

/* Testimonials */
.testimonial-card {
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stars {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Team Section */
.specialist-avatar {
    transition: all 0.3s ease;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(76, 154, 42, 0.2);
}

.specialist-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(76, 154, 42, 0.3);
}

.specialist-avatar img {
    transition: all 0.3s ease;
    filter: grayscale(55%) contrast(108%) brightness(102%);
}

.specialist-avatar:hover img {
    transform: scale(1.1);
    filter: grayscale(20%) contrast(108%) brightness(102%);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

footer .text-warning {
    color: var(--accent-color) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 3rem 0 !important;
    }
    
    .page-header {
        padding-top: 130px !important; /* Increased for mobile with taller navbar */
        margin-top: -5px; /* Match navbar margin */
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .stats-section .stat-item {
        padding: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Map Placeholder */
.map-placeholder {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    border-radius: 10px;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    font-size: 30px;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* WhatsApp Modal */
.whatsapp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.whatsapp-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.whatsapp-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border-radius: 15px 15px 0 0;
}

.whatsapp-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.whatsapp-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.whatsapp-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-modal-body {
    padding: 20px;
}

.whatsapp-modal-body textarea {
    width: 100%;
    min-height: 120px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.whatsapp-modal-body textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

.whatsapp-char-count {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.whatsapp-modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 15px 15px;
}

.whatsapp-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.whatsapp-modal-footer .btn-success {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
}

.whatsapp-modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive WhatsApp */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float i {
        font-size: 26px;
    }
    
    .whatsapp-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .whatsapp-modal-header,
    .whatsapp-modal-body,
    .whatsapp-modal-footer {
        padding: 15px;
    }
    
    .whatsapp-modal-footer {
        flex-direction: column;
    }
    
    .whatsapp-modal-footer .btn {
        width: 100%;
    }
}

/* Specialist Contact Button Styling */
.contact-specialist .btn-primary {
    background-color: var(--dark-color) !important;
    border-color: var(--dark-color) !important;
    color: var(--white) !important;
    font-weight: bold;
}

.contact-specialist .btn-primary:hover,
.contact-specialist .btn-primary:focus,
.contact-specialist .btn-primary:active {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Contact Submit Button Styling */
.contact-submit-btn {
    background-color: var(--dark-color) !important;
    border-color: var(--dark-color) !important;
    color: var(--white) !important;
    font-weight: bold;
}

.contact-submit-btn:hover,
.contact-submit-btn:focus,
.contact-submit-btn:active {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.contact-submit-btn i {
    color: var(--white) !important;
}

/* Garantir que o texto permança legível em todos os estados */
.contact-submit-btn,
.contact-submit-btn:hover,
.contact-submit-btn:focus,
.contact-submit-btn:active,
.contact-submit-btn:visited,
button.contact-submit-btn,
button.contact-submit-btn:hover,
button.contact-submit-btn:focus,
button.contact-submit-btn:active {
    color: var(--white) !important;
}

.contact-submit-btn i,
.contact-submit-btn:hover i,
.contact-submit-btn:focus i,
.contact-submit-btn:active i,
button.contact-submit-btn i,
button.contact-submit-btn:hover i,
button.contact-submit-btn:focus i,
button.contact-submit-btn:active i {
    color: var(--white) !important;
}

/* Sobrescrever qualquer regra do Bootstrap */
.btn.contact-submit-btn,
.btn.contact-submit-btn:hover,
.btn.contact-submit-btn:focus,
.btn.contact-submit-btn:active,
.btn.contact-submit-btn:not(:disabled):not(.disabled):active {
    color: var(--white) !important;
}

/* Equipment photo placeholder (used until GW supplies original photos) */
.equipment-photo-placeholder {
    background: var(--light-color);
    border: 2px dashed #ced4da;
    border-radius: 10px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

.equipment-photo-placeholder i {
    font-size: 2.5rem;
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.equipment-photo-placeholder small {
    font-size: 0.75rem;
    line-height: 1.3;
}

.equipment-card .equipment-photo {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: var(--light-color);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
}

.equipment-card .badge-category {
    background-color: var(--primary-color);
    color: var(--accent-color);
    font-weight: 500;
}

/* Featured service (flagship offering highlighted among equal-weight cards) */
.service-detail--featured {
    position: relative;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(76, 154, 42, 0.06) 0%, transparent 12%);
    border-radius: 4px;
}

.service-detail--featured::before {
    content: 'Destaque';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

/* Asymmetric accent panel behind the "Sobre" decorative icon (breaks the stacked-block rhythm) */
.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    inset: 10% -10% 10% 10%;
    background: linear-gradient(135deg, rgba(76, 154, 42, 0.08) 0%, rgba(13, 74, 48, 0.04) 100%);
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    z-index: 0;
}

.about-image i {
    position: relative;
    z-index: 1;
}

/* FAQ / accordion recolored to the brand palette instead of Bootstrap's default blue */
.accordion-button {
    font-family: var(--heading-font);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(76, 154, 42, 0.12);
    box-shadow: inset 0 -1px 0 rgba(76, 154, 42, 0.4);
}

.accordion-button:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(76, 154, 42, 0.25);
}

.accordion-button::after {
    filter: sepia(1) saturate(4) hue-rotate(75deg) brightness(0.9);
}

