/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1f8a44;
    --secondary-color: #166534;
    --text-color: #1f2937;
    --light-bg: #f2f8f2;
    --border-color: #d6e5d7;
    --success-color: #15803d;
    --danger-color: #ef4444;
    --container-max-width: 1560px;
    --container-gutter: 24px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: min(calc(100% - (var(--container-gutter) * 2)), var(--container-max-width));
    margin: 0 auto;
    padding: 0;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo-symbol-link {
    width: 210px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}

.logo-symbol {
    width: 100%;
    max-width: 210px;
    height: auto;
    max-height: 74px;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    position: static;
    transform: none;
}

.header-main nav {
    margin-left: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 36px;
    flex-wrap: nowrap;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 5px 10px;
}

nav a:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url('../img/portfolio/obra.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-home {
    position: relative;
    overflow: hidden;
    background: #0f3b25;
}

.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.9s ease;
    animation-name: heroBackgroundCycle;
    animation-duration: var(--hero-duration, 16s);
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-delay: var(--hero-delay, 0s);
}

.hero-bg-slide.active {
    opacity: 1;
}

@keyframes heroBackgroundCycle {
    0% {
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    22% {
        opacity: 1;
    }
    30% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInDown 1s;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-kicker {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.14);
}

.service-strips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.service-strip {
    background: #fff;
    border-top: 5px solid var(--primary-color);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.service-strip h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.service-strip p {
    color: #4b5563;
    margin-bottom: 14px;
}

.service-strip a {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
}

.home-showcase {
    background: linear-gradient(180deg, #eff8ef 0%, #ffffff 100%);
}

.home-mosaic {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mosaic-item {
    border-radius: 10px;
    overflow: hidden;
    min-height: 170px;
    background: #d9eadb;
    display: block;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.mosaic-item:hover img {
    transform: scale(1.06);
}

.mosaic-item.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.home-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
}

.home-cta h2 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 40px;
}

.home-cta p {
    font-size: 18px;
    margin-bottom: 26px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

/* Sections */
section {
    padding: 88px 0;
}

section:not(.hero):nth-of-type(even) {
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-color);
}

/* Grid de produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--border-color);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-info p {
    color: #6b7280;
    margin-bottom: 15px;
    font-size: 14px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

/* Clientes/Portfolio */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

@media (min-width: 1280px) {
    .service-strips {
        grid-template-columns: repeat(3, minmax(320px, 1fr));
    }

    .clients-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.client-card {
    background: white;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.client-card:hover {
    transform: scale(1.05);
}

/* Galeria de servicos */
.portfolio-slider {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #10291b;
    margin-bottom: 28px;
    min-height: 360px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.portfolio-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

.portfolio-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.portfolio-slide-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.portfolio-slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(7, 31, 18, 0.05), rgba(7, 31, 18, 0.82));
    color: #fff;
}

.portfolio-slide-caption h3 {
    margin-bottom: 4px;
}

.portfolio-slide-caption p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 5;
}

.slider-btn:hover {
    background: rgba(22, 101, 52, 0.9);
}

.slider-prev {
    left: 14px;
}

.slider-next {
    right: 14px;
}

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.slider-dot.active {
    background: #fff;
}

.portfolio-slider.single .slider-btn,
.portfolio-slider.single .slider-dots {
    display: none;
}

.services-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.gallery-media {
    position: relative;
}

.gallery-image,
.gallery-placeholder {
    width: 100%;
    height: 210px;
}

.gallery-image {
    display: block;
    object-fit: cover;
}

.gallery-zoom-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: none;
    background: rgba(17, 24, 39, 0.86);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.gallery-zoom-btn:hover {
    background: rgba(31, 138, 68, 0.95);
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    font-size: 64px;
}

.gallery-info {
    padding: 18px;
}

.gallery-info h3 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.gallery-info p {
    color: #6b7280;
    margin-bottom: 8px;
}

.gallery-info small {
    color: #6b7280;
}

/* Proposta comercial no portfolio */
.proposal-section {
    background: linear-gradient(180deg, #f6fbf6 0%, #edf7ee 100%);
}

.proposal-wrap {
    display: grid;
    gap: 24px;
}

.proposal-head {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.proposal-code {
    display: inline-block;
    background: #dcfce7;
    color: #14532d;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.proposal-subtitle {
    max-width: 900px;
    color: #475569;
    margin: 0 auto;
    text-align: center;
}

.proposal-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.proposal-kpi-card {
    background: #0f3b25;
    color: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 6px 16px rgba(15, 59, 37, 0.24);
}

.proposal-kpi-card span {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.proposal-kpi-card strong {
    font-size: 24px;
    line-height: 1.2;
}

.proposal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.proposal-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.proposal-card h3 {
    margin-bottom: 10px;
    color: #0f5132;
}

.proposal-list {
    padding-left: 18px;
    color: #334155;
}

.proposal-list li {
    margin-bottom: 6px;
}

.proposal-table-wrap {
    overflow-x: auto;
}

.proposal-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.proposal-table th,
.proposal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

.proposal-table th {
    background: #ecfdf3;
    color: #14532d;
    font-weight: 700;
}

.proposal-table-summary th,
.proposal-table-summary td {
    font-size: 16px;
}

.proposal-note {
    margin-top: 12px;
    color: #334155;
}

.proposal-signoff {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    color: #334155;
}

/* Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.image-lightbox.open {
    display: flex;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mensagens de alerta */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsivo - Tablets e celulares (até 768px) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Header top: ocultar em mobile para economizar espaço */
    .header-top {
        display: none !important;
    }

    .header-main {
        padding: 10px 0;
    }

    .header-main .container {
        flex-wrap: wrap;
        gap: 0;
        position: relative;
    }

    /* Mostrar botão hambúrguer */
    .hamburger {
        display: flex !important;
        margin-left: auto;
    }

    /* Nav oculto por padrão no mobile */
    .header-main nav {
        display: none !important;
        width: 100%;
        margin-left: 0;
        background: var(--secondary-color);
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0;
        border-radius: 0 0 8px 8px;
        order: 3;
    }

    .header-main nav.nav-open {
        display: block !important;
    }

    nav ul {
        flex-direction: column !important;
        gap: 0 !important;
    }

    nav ul li a {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 16px;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-kicker {
        font-size: 11px;
    }

    /* Seções */
    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    /* Grids */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-strips {
        grid-template-columns: 1fr;
    }

    .home-mosaic {
        grid-template-columns: 1fr 1fr;
    }

    .services-gallery {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .clients-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* CTA */
    .home-cta h2 {
        font-size: 26px;
    }

    .home-cta p {
        font-size: 16px;
    }

    /* Portfolio slider */
    .portfolio-slider,
    .portfolio-slide-image {
        min-height: 230px;
        height: 230px;
    }

    /* Proposta */
    .proposal-grid {
        grid-template-columns: 1fr;
    }

    .proposal-kpi-card strong {
        font-size: 20px;
    }

    .proposal-table {
        min-width: 560px;
    }

    .proposal-head {
        padding: 18px;
    }

    /* Footer */
    .footer-content {
        gap: 24px;
    }

    footer {
        padding: 40px 0 16px;
    }
}

/* Responsivo - Celulares pequenos (até 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        text-align: center;
    }

    section {
        padding: 36px 0;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 22px;
    }

    .home-mosaic {
        grid-template-columns: 1fr;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .product-image {
        height: 180px;
        font-size: 60px;
    }

    .product-price {
        font-size: 20px;
    }

    .cart-summary {
        padding: 20px 14px;
    }

    .cart-total {
        font-size: 18px;
    }

    .feature-icon {
        font-size: 38px;
    }

    .feature-card {
        padding: 22px 16px;
    }

    .gallery-image,
    .gallery-placeholder {
        height: 170px;
    }

    .portfolio-slider,
    .portfolio-slide-image {
        min-height: 190px;
        height: 190px;
    }

    .home-cta h2 {
        font-size: 20px;
    }

    .home-cta p {
        font-size: 15px;
    }

    .service-strip {
        padding: 18px 16px;
    }

    .service-strip h3 {
        font-size: 18px;
    }
}
