/* ===== GOOGLE FONTS & FONT AWESOME ===== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Poppins:wght@300;400;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
    --primary-color: #8B0000; /* Vermelho Sangue */
    --primary-color-hover: #a10000;
    --dark-color: #121212;
    --dark-grey: #1e1e1e;
    --light-grey: #333333;
    --text-color: #f0f0f0;
    --text-color-secondary: #a0a0a0;
    --header-font: 'Oswald', sans-serif;
    --body-font: 'Poppins', sans-serif;
    --header-height: 4rem;
    --transition-speed: 0.3s ease;
}

/* ===== BASE STYLES & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--dark-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--header-font);
    color: var(--text-color);
    text-transform: uppercase;
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

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

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color-secondary);
    margin-bottom: 4rem;
    font-weight: 300;
}

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

.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    font-family: var(--header-font);
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-speed);
}

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

.btn:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    color: var(--text-color);
    transform: translateY(-3px);
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.preloader-icon {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-grey);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== HEADER & NAVBAR ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-speed);
}
.header.scrolled {
    background: var(--dark-grey);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo {
    font-family: var(--header-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}
.logo:hover { color: var(--text-color); }

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--header-font);
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-speed);
}
.nav-link:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all var(--transition-speed);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/hero-bg.jpg') no-repeat center center/cover;
    position: relative;
    padding: 0 1rem;
}
.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.typing-text {
    color: var(--primary-color);
}
.cursor {
    display: inline-block;
    background-color: var(--primary-color);
    animation: blink 0.7s infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-color-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== ANIMATIONS ON SCROLL ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ABOUT SECTION ===== */
.about .grid {
    grid-template-columns: 1fr;
    align-items: center;
}
.about-image img {
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.stat-item {
    background: var(--dark-grey);
    padding: 1.5rem;
    text-align: center;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}
.stat-item h4 {
    font-size: 2rem;
    color: var(--primary-color);
}
.stat-item p {
    color: var(--text-color-secondary);
}

/* ===== SPECIALTIES SECTION ===== */
.specialties {
    background: var(--dark-grey);
}
.specialties-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.specialty-card {
    background: var(--dark-color);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 5px;
    transition: var(--transition-speed);
    border-bottom: 3px solid transparent;
}
.specialty-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary-color);
}
.specialty-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.specialty-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
    text-align: center;
    margin-bottom: 3rem;
}
.filter-btn {
    margin: 0 0.5rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--text-color-secondary);
    border: 1px solid var(--light-grey);
    cursor: pointer;
    transition: var(--transition-speed);
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.portfolio-item img {
    transition: transform 0.4s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.portfolio-item:hover img {
    transform: scale(1.1);
}
.portfolio-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(139, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-speed);
}
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-overlay i {
    font-size: 3rem;
    color: var(--text-color);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}
.lightbox.show {
    opacity: 1;
    pointer-events: all;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: -40px; right: 0;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}


/* ===== PROCESS SECTION ===== */
.process { background: var(--dark-grey); }
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--light-grey);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    right: -25px;
    background-color: var(--dark-color);
    border: 3px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--dark-color);
    position: relative;
    border-radius: 6px;
}
.timeline-item:nth-child(odd) {
    text-align: right;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonial-slider {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
    height: 350px; /* Adjust as needed */
}
.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.testimonial-slide.active {
    opacity: 1;
}
.client-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 1rem;
}
.stars {
    color: #f9d71c; /* Gold */
    margin-bottom: 1rem;
}
.testimonial-text {
    font-style: italic;
    color: var(--text-color-secondary);
    margin-bottom: 1rem;
}
.client-name {
    font-family: var(--header-font);
    font-weight: bold;
}
.slider-nav {
    text-align: center;
    margin-top: 1rem;
}
.slider-nav button {
    background: transparent;
    border: 1px solid var(--light-grey);
    color: var(--text-color);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: var(--transition-speed);
}
.slider-nav button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== CONTACT SECTION ===== */
.contact { background: var(--dark-grey); }
.contact .grid { grid-template-columns: 1fr; }
.contact-info h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.info-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.info-item i { font-size: 1.5rem; color: var(--primary-color); }

.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%;
    padding: 1rem;
    background: var(--light-grey);
    border: 1px solid var(--dark-grey);
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--body-font);
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: var(--text-color-secondary);
}
.contact-form button { width: 100%; }

/* ===== FAQ SECTION ===== */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item {
    background: var(--dark-grey);
    margin-bottom: 10px;
    border-radius: 5px;
}
.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-family: var(--header-font);
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-header::after {
    content: '\f078'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform var(--transition-speed);
}
.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed), padding var(--transition-speed);
}
.accordion-content p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-color-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: #000;
    padding: 4rem 0 2rem;
    text-align: center;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.social-links a {
    font-size: 1.5rem;
    color: var(--text-color-secondary);
}
.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}
.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid var(--light-grey);
    padding-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

/* ===== FLOATING BUTTONS ===== */
.back-to-top, .whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: -50px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: bottom 0.4s, background-color 0.3s;
    z-index: 999;
}
.whatsapp-float {
    bottom: 1.5rem;
    background: #25D366;
}
.back-to-top.show {
    bottom: 7rem;
}
.back-to-top:hover, .whatsapp-float:hover {
    background-color: var(--primary-color-hover);
}
.whatsapp-float:hover {
    background-color: #128C7E;
}

/* ========================================= */
/* ===== RESPONSIVENESS (MEDIA QUERIES) ===== */
/* ========================================= */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .hero-title { font-size: 4rem; }
    .hero-subtitle { font-size: 1.5rem; }
    .section-title { font-size: 3rem; }

    .about .grid { grid-template-columns: 1fr 1.5fr; }
    .about-image { order: -1; }

    .contact .grid { grid-template-columns: 1fr 1fr; }
    .contact-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1.5rem;
    }
    .form-group-full { grid-column: 1 / 3; }

    /* Show desktop nav, hide hamburger */
    .navbar { display: block; }
    .nav-list { display: flex; }
    .hamburger-menu { display: none; }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }

    .timeline::after { left: 50%; }
    .timeline-item { width: 50%; }
    .timeline-item:nth-child(odd) { left: 0; }
    .timeline-item:nth-child(even) { left: 50%; }
    .timeline-icon { right: -25px; }
    .timeline-item:nth-child(even) .timeline-icon { left: -25px; }
}

/* Mobile Nav Styles */
@media (max-width: 767px) {
    .navbar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--dark-grey);
        transition: left var(--transition-speed);
    }
    .navbar.active {
        left: 0;
    }
    .nav-list {
        flex-direction: column;
        align-items: center;
        padding-top: 4rem;
        gap: 3rem;
    }
    .nav-link { font-size: 1.5rem; }

    .hamburger-menu {
        display: block;
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .timeline::after {
        left: 25px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-icon {
        left: 0;
    }
}