/* Variáveis e Cores */
:root {
    --brand-orange: #ea580c;
    --brand-blue: #0284c7;
    --brand-green: #047d57;
    --brand-dark: #0f172a;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--slate-600);
    line-height: 1.6;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 3rem 0;
}

section.hero + .section {
    padding-top: 1rem;
}

.bg-slate-50 {
    background-color: var(--slate-50);
}

.section-dark {
    background-color: var(--slate-900);
    color: rgba(255, 255, 255, 0.8);
}

.section-dark h2 {
    color: var(--brand-orange) !important;
    text-align: center;
}

.section-dark p {
    color: rgba(255, 255, 255, 0.7);
}

.bg-slate-50 .stat-card h3,
.section-dark .stat-card h3 {
    color: white;
}

.bg-slate-50 .stat-card p,
.section-dark .stat-card p {
    color: rgba(255, 255, 255, 0.7);
}

/* Garante que textos em cards brancos em seções de fundo claro/cinza apareçam em azul escuro */
.bg-slate-50 [style*="background:white"] p,
.bg-slate-50 [style*="background: white"] p,
.text-dark-blue {
    color: var(--brand-dark) !important;
}

.bg-slate-50 [style*="background:white"] h3,
.bg-slate-50 [style*="background: white"] h3 {
    color: var(--brand-dark) !important;
}

/* timeline customization */
.timeline-grid .stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-grid .stat-icon {
    margin-left: auto;
    margin-right: auto;
}

.timeline-grid .stat-card strong,
.timeline-grid .stat-card p {
    color: white !important;
}

.timeline-grid .stat-card h3 {
    color: var(--brand-green) !important;
}

.bg-brand-dark {
    background-color: var(--brand-dark);
    color: white;
}

/* Tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--slate-900);
    font-weight: 800;
    line-height: 1.2;
}

.text-brand-orange {
    color: var(--brand-orange);
}

.text-brand-green {
    color: var(--brand-green);
}

.text-brand-blue {
    color: var(--brand-blue);
}

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

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--slate-100);
}

.header-inner {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-blue);
    letter-spacing: -0.05em;
}

.logo svg {
    width: 32px;
    height: 32px;
    color: var(--brand-orange);
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-600);
}

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

.btn-cta {
    background-color: var(--brand-orange);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    background: var(--slate-100);
    border: none;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 0.5rem;
    color: var(--brand-dark);
    z-index: 1001;
    /* Garante que fique acima de tudo */
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: white;
    z-index: 1000;
    gap: 2rem;
    overflow-y: auto;
    transition: 0.3s ease;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    padding: 1rem 0;
    text-align: center;
    width: 100%;
}

.mobile-link.active {
    color: var(--brand-orange);
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-toggle {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }
}

/* Footer */
footer {
    background-color: var(--brand-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 4rem 1rem 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.footer-col h3 {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a:hover {
    color: var(--brand-orange);
}

.footer-contact div {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.copyright {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

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

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2.5fr 1fr 1.5fr 1fr;
    }
}

/* Typography Overrides for Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 1.85rem !important;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .section {
        padding: 3.5rem 0;
        text-align: center;
    }

    .section h2 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .stat-icon {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .section p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .section-header {
        text-align: center;
        justify-content: center !important;
    }

    .section-footer {
        justify-content: center !important;
    }
}

/* Section Header & Footer helpers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.tag-orange {
    color: var(--brand-orange);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-footer {
    display: flex;
    justify-content: flex-end; /* Default desktop */
    margin-top: 2rem;
}

.btn-text-icon {
    font-weight: 700;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.btn-text-icon:hover {
    color: var(--brand-orange);
    transform: translateX(4px);
}

/* License Cards (About Page) */
.license-card {
    background: var(--slate-50);
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid var(--brand-orange);
    transition: 0.3s;
}

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

.license-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.license-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
    font-size: 1.1rem;
}

@media (min-width: 1024px) {
    .license-content {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }
}

/* Home Components */
.hero {
    position: relative;
    padding: 0.5rem 0 0;
    overflow: hidden;
    text-align: left;
}

@media (min-width: 1024px) {
    .hero {
        padding: 1rem 0 6rem;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    color: var(--brand-green);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-left: 4px solid var(--brand-orange);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-align: center;
    width: 100%;
}

.hero-desc {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .hero-actions {
        justify-content: center;
    }
}

.btn-secondary {
    background-color: var(--slate-100);
    color: var(--slate-700);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: #1e293b;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.stat-card:hover {
    border-color: var(--brand-orange);
    transform: translateY(-5px);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-blue {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.icon-green {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.icon-orange {
    color: var(--brand-orange);
    background: rgba(234, 88, 12, 0.15);
}

/* Service Grid Generic */
.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Fancy Service Cards (used in servicos.html) */
.fancy-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--slate-100);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fancy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: currentColor;
    opacity: 0.8;
}

.fancy-icon-wrapper {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
    transition: 0.4s;
}

.theme-blue {
    color: var(--brand-blue);
}

.theme-orange {
    color: var(--brand-orange);
}

.theme-green {
    color: var(--brand-green);
}

.theme-dark {
    color: var(--brand-dark);
}

.theme-blue .fancy-icon-wrapper {
    background: rgba(2, 132, 199, 0.1);
    color: var(--brand-blue);
}

.theme-orange .fancy-icon-wrapper {
    background: rgba(234, 88, 12, 0.1);
    color: var(--brand-orange);
}

.theme-green .fancy-icon-wrapper {
    background: rgba(5, 150, 105, 0.1);
    color: var(--brand-green);
}

.theme-dark .fancy-icon-wrapper {
    background: rgba(15, 23, 42, 0.1);
    color: var(--brand-dark);
}

.fancy-card:hover {
    transform: translateY(-8px);
}

.fancy-card:hover .fancy-icon-wrapper {
    border-radius: 50%;
    transform: scale(1.1) rotate(5deg);
}

.service-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--slate-100);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.service-card:hover {
    box-shadow: var(--shadow-xl);
}

.service-img {
    aspect-ratio: 4/3;
    background: var(--slate-100);
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 1.5rem;
}

.segments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .segments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .segments-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.segment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.segment-icon {
    width: 5rem;
    height: 5rem;
    background: var(--slate-50);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-700);
    transition: 0.3s;
}

.segment-item:hover .segment-icon {
    background: var(--brand-orange);
    color: white;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 4.5rem;
    }
}

@media (max-width: 640px) {
    .whatsapp-float {
        width: 3.5rem;
        height: 3.5rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* About Page */
.about-banner {
    background-color: var(--brand-dark);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .about-banner {
        padding: 5rem 0;
    }
}

.about-banner h1 {
    color: white;
    margin: 1rem 0;
    font-size: 2rem;
}

@media (min-width: 768px) {
    .about-banner h1 {
        font-size: 3rem;
    }
}

.about-banner p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
}

/* Contact Banner with Image Support */
.contact-banner {
    text-align: center;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #1e293b 100%);
    padding: 4rem 1rem; /* Padding equilibrado para mobile sem imagem */
    overflow: hidden;
}

.banner-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.banner-text p {
    margin: 0 auto;
}

.banner-image {
    display: none; /* Escondido por padrão (mobile) */
}

.banner-image img {
    max-width: 100%;
    height: auto;
    max-height: 280px;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4));
    animation: fadeInUp 0.8s ease-out;
    display: block;
}

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

@media (min-width: 1024px) {
    .contact-banner {
        padding: 0;
        height: 320px; /* Reduzido de 400px */
    }

    .banner-flex {
        flex-direction: row;
        justify-content: center; 
        align-items: center; 
        gap: 6rem;
        height: 100%;
    }

    .banner-text {
        text-align: left;
        flex: 0 1 auto;
        max-width: 500px;
        padding-bottom: 0;
    }

    .banner-image {
        flex: 0 1 auto;
        align-self: flex-end; 
        height: 100%;
        display: flex;
        align-items: flex-end;
    }

    .banner-image img {
        max-height: 300px; /* Reduzido proporcionalmente de 380px */
        margin-bottom: 0;
    }
}

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

@media(min-width: 768px) {
    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
    /* Centraliza o terceiro card quando em 2 colunas */
    .timeline-grid div:last-child:nth-child(odd) {
        grid-column: 1 / span 2;
        width: 100%;
        max-width: calc(50% - 1rem); /* Metade menos metade do gap */
        margin-left: auto;
        margin-right: auto;
    }
}

@media(min-width: 1024px) {
    .timeline-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1100px;
        margin: 0 auto;
    }
    /* Reseta o spam de coluna do tablet para o desktop */
    .timeline-grid div:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
        margin: 0;
    }
}

/* Contact Page */
.contact-grid {
    display: grid;
    gap: 4rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: var(--slate-50);
    border: none;
    border-radius: 0.75rem;
    font-family: inherit;
}

.form-input:focus {
    outline: 2px solid var(--brand-orange);
}

.btn-submit {
    width: 100%;
    background: var(--brand-orange);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 1.125rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    transform: scale(1.02);
}

@media(min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 7fr 5fr;
    }
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Custom Modal Success */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

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

.modal-content {
    background: #1a1a1a;
    color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    max-width: 450px;
    width: 90%;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s ease-out;
}

.modal-content h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    background: #bfdbfe;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
    padding: 0.75rem 2.5rem;
    border-radius: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.modal-btn:hover {
    background: #93c5fd;
    transform: scale(1.05);
}

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