/* --- CSS Dark Theme (Grupo Milesi) --- */
:root {
    --primary-color: #000000;
    /* Fundo preto */
    --secondary-color: #FFD100;
    /* Amarelo vibrante do logo */
    --accent-color: #FFFFFF;
    /* Branco para detalhes de texto/ícones */

    /* Cores de Fundo Secundárias para criar profundidade no escuro */
    --bg-color: #000000;
    --bg-light: #121212;
    /* Cinza muito escuro em vez de branco */

    /* Valores de texto para Dark Mode */
    --text-dark: #FFFFFF;
    /* O texto principal agoa é branco para ler no preto */
    --text-light: #000000;
    /* Opcional: texto preto em cima de caixas amarelas ou brancas */
    --text-muted: #A0AAB2;
    /* Cinza suave para parágrafos secundários */

    --transition: all 0.3s ease;
    --shadow: 0 10px 30px -10px rgba(255, 209, 0, 0.15);
    /* Sombra amarela bem suave */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-color);
    /* Títulos Brancos agora */
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    /* Underline amarelo */
    border-radius: 2px;
}

.text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    /* Fica branco no hover */
}

/* Layout Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.bg-primary {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.bg-dark-alt {
    background-color: var(--bg-light);
    /* Agora é a seção de destaque com fundo cinza quase preto */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

/* Botão Amarelo */
.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    /* Texto preto no botão amarelo */
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    /* Fica só a borda amarela com texto amarelo */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 209, 0, 0.2);
}

/* Botão Branco/Vazado */
.btn-outline {
    background-color: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    /* Fundo branco e texto preto no hover */
    transform: translateY(-3px);
}

/* Header & Nav */
header {
    background: rgba(0, 0, 0, 0.95);
    /* Header preto transparente */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Separador suave */
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    /* Tamanho para logo em imagem */
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    /* Branco */
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    /* Traço amarelo */
    transition: var(--transition);
}

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

.nav-links a.btn {
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
}

.nav-links .btn::after {
    display: none;
    /* remove hover line effect on button */
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    color: var(--text-dark);
    /* Branco */
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    /* Imagem mais escura com filtro gradiente para as letras brancas e amarelas brilharem */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('https://images.unsplash.com/photo-1556761175-5973dc0f32d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--secondary-color);
    /* "Milesi" em amarelo */
}

.hero p {
    font-size: 1.25rem;
    color: #DDDDDD;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    /* Sombra dura de dark mode */
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Specialties Section */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.specialty-card {
    background: var(--bg-light);
    /* Caixa cinza escura fundo do site é preto */
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    /* Sombra suavezinha nas pontas em amarelado */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--secondary-color);
    /* Preenchimento em amarelo */
    transition: var(--transition);
    z-index: -1;
}

.specialty-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 209, 0, 0.2);
    border-color: var(--secondary-color);
}

.specialty-card:hover::before {
    height: 100%;
}

.specialty-card:hover h3,
.specialty-card:hover p,
.specialty-card:hover .icon {
    color: var(--primary-color);
    /* Tudo fica PRETO quando tiver hover porque o box vira amarelo */
}

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

.specialty-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    color: var(--accent-color);
}

.specialty-card p {
    color: var(--text-muted);
    transition: var(--transition);
}

/* Differential & Mission Section */
.mission-quote {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.mission-quote h2 {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    color: var(--accent-color);
    /* Frase base */
}

.mission-quote h2::after {
    display: none;
}

/* Services Section */
.services-container {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.services-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 209, 0, 0.15);
    border-color: var(--secondary-color);
}

.services-container .icon-box {
    margin-bottom: 1.2rem;
}

.services-container .icon-box i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.services-container:hover .icon-box i {
    transform: scale(1.1);
}

.services-list {
    list-style: none;
    margin-top: 2rem;
}

.services-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Traço discreto */
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
    /* Ajustado para premium */
    color: var(--text-muted);
    /* Texto mais claro do dark mode */
}

.services-list li:hover {
    color: var(--accent-color);
    /* Ilumina na list item hover */
}

.services-list li:last-child {
    border-bottom: none;
}

.services-list li i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 5px;
}

/* Footer */
footer {
    background: #000000;
    color: var(--text-dark);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col h3::after {
    display: none;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    /* Hover fica fundo amarelo */
    color: var(--primary-color);
    /* Icone fica preto */
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

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

    .about-image {
        order: -1;
    }
}

@media (max-width: 992px) {
    .about-grid {
        gap: 2rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 75px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .hero-premium .hero-title {
        font-size: 1.8rem;
    }

    .btn-cta {
        font-size: 0.95rem;
        padding: 12px 24px;
        width: 100%;
        display: block;
        box-sizing: border-box;
    }

    .hero {
        text-align: center;
    }

    .hero p {
        margin: 0 auto 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }
}

/* Services Page Grid Layout */
.services-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.services-page-grid .services-container {
    margin: 0 !important;
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(18, 18, 18, 0.7);
    /* Glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.services-page-grid .services-container:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 209, 0, 0.4);
    box-shadow: 0 15px 40px rgba(255, 209, 0, 0.15);
}

.services-page-grid .services-container h3 {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.services-page-grid .services-list {
    margin-top: 0;
    flex-grow: 1;
}

/* Contact Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-control::placeholder {
    color: var(--text-muted);

}

/* Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.custom-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.custom-modal-content {
    background-color: var(--bg-color);
    margin: auto;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

textarea.form-control {
    resize: vertical;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.hero-small {
    height: 40vh;
    min-height: 300px;
    padding-top: 100px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('https://images.unsplash.com/photo-1556761175-5973dc0f32d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
    text-align: center;
}

/* Estilos Premium Services Page */
.hero-premium {
    padding-top: 100px;
    /* Offset para o header menu */
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(20, 20, 20, 1) 0%, rgba(0, 0, 0, 1) 100%);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 209, 0, 0.05) 0%, transparent 40%);
    animation: rotateSlow 30s linear infinite;
    z-index: 1;
}

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

.hero-premium .hero-title {
    font-size: 3.0rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-premium .hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* CTA Premium Block */
.cta-premium {
    background: linear-gradient(135deg, rgba(30, 30, 30, 1) 0%, rgba(10, 10, 10, 1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.cta-premium::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 209, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-premium h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.cta-premium p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    font-size: 1rem;
    padding: 12px 30px;
}

/* Contact Form Responsive Container */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 992px) {
    .contact-form-container {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 1.5rem 1rem;
    }

    .form-control {
        font-size: 16px !important;
        /* Ajuste para evitar auto zoom no iOS */
        padding: 14px;
    }
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

@media (max-width: 992px) {
    .hero-buttons {
        justify-content: center;
    }

    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Alinhamento de textos do Sobre */
.about-text p {
    text-align: justify;
}

/* Alinhamento de textos dos Pilares/Especialidades */
.specialty-card p {
    text-align: center;
}

/* Redes Sociais no Mobile e Tablet */
@media (max-width: 992px) {
    .social-links {
        justify-content: center;
    }

    .social-links a:not(.btn) {
        width: 70px;
        height: 70px;
        font-size: 1.4rem;
    }

    .social-links a.btn {
        padding: clamp(6px, 1.5vw, 10px) clamp(12px, 3vw, 24px) !important;
        gap: clamp(4px, 1vw, 10px) !important;
        width: clamp(200px, 80%, 300px) !important;
        /* Estica elegantemente dependendo do celular */
        justify-content: center !important;
        white-space: nowrap;
        /* Evita quebra feia de linha em telas pequenas */
    }

    .instagram-btn-text {
        font-size: clamp(0.75rem, 1.5vw, 1rem);
    }

    .social-links a.btn i {
        font-size: clamp(1rem, 1.5vw, 1.3rem) !important;
    }
}