/* Estilos Gerais */
:root {
    --primary-color: #e67e22;  /* Laranja - cor principal */
    --primary-dark: #d35400;
    --secondary-color: #34495e;  /* Azul escuro */
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --accent-color: #e74c3c;  /* Vermelho para destaques */
    --text-color: #333;
    --text-light: #7f8c8d;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-padding-top: 36px;
}

section,
.catalog-header {
    scroll-margin-top: 36px;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

.scroll-area {
    width: 300px;
    height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
}

/* ======== CHROME / EDGE / SAFARI / OPERA ======== */
.scroll-area::-webkit-scrollbar {
width: 10px;
}

.scroll-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6a11cb, #2575fc);
    border-radius: 10px;
}

.scroll-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a0fb0, #1e62d0);
}

/* ======== FIREFOX ======== */
.scroll-area {
    scrollbar-width: thin; /* thin | auto | none */
    scrollbar-color: #6a11cb #f1f1f1; /* thumb | track */
}

/* ======== FALLBACK GERAL ======== */
/* Caso algum navegador antigo não suporte, pelo menos mantém contraste aceitável */
.scroll-area {
    background-color: #fff;
    color: #333;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark-color) !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar.scrolled .navbar-brand img {
    height: 35px;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 600;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.navbar-dark .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover::before,
.navbar-dark .navbar-nav .nav-link.active::before {
    width: 80%;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Header */
.catalog-header {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.catalog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(44, 62, 80, 0.8), rgba(52, 73, 94, 0.7));
    z-index: 1;
}

.catalog-header .container {
    position: relative;
    z-index: 2;
}

.catalog-header h1 {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.catalog-header .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    border-radius: 50px;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Seção Sobre */
#sobre {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

#sobre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('imagens/outros/concrete-texture.png');
    opacity: 0.05;
    z-index: -1;
}

#sobre img {
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-radius: 10px !important;
}

#sobre img:hover {
    transform: scale(1.02);
}

#sobre .icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
}

#sobre h5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* Seção Serviços */
#serviços {
    padding: 100px 0;
    background-color: #f9f9f9;
    position: relative;
}

#serviços::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: url('imagens/outros/wave.svg') center/cover no-repeat;
    z-index: 1;
}

.card {
    border: none;
    border-radius: 15px !important;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    background-color: white;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 30px;
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 20px;
}

.card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.card p {
    color: var(--text-light);
}

/* Seção Projetos */
#projetos {
    padding: 100px 0;
    background-color: white;
}

.carousel {
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    overflow: hidden;
}

.carousel-inner {
    border-radius: 15px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

/* Modal de Imagem */
.modal-content {
    border: none;
    overflow: hidden;
}

.modal-body img {
    max-height: 70vh;
    width: auto;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
}

/* Seção Contatos */
#contactos {
    padding: 100px 0;
    background-color: #f9f9f9;
    position: relative;
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 640px;
}

.contact-info h5 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.contact-info p {
    color: var(--text-light);
}

.social-links {
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 980px;
}

.social-links .btn {
    min-width: 150px;
    min-height: 46px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    margin-right: 0;
    font-weight: 700;
    color: var(--secondary-color);
    background-color: #fff;
    border-color: rgba(230, 126, 34, 0.55);
    transition: var(--transition);
}

.social-links .btn i {
    font-size: 1.1rem;
}

.social-links .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Formulário de Contato */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    width: 100%;
    max-width: 1120px;
    margin: 8px auto 0;
    padding: 0 18px;
}

.contact-form-column {
    display: flex;
    flex-direction: column;
}

.contact-form-card,
.contact-form-card .card-body {
    flex: 1;
}

.contact-form-card .card-body {
    display: flex;
    flex-direction: column;
}

.contact-form-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card {
    border: none;
    border-radius: 15px !important;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.form-control, .form-select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(230, 126, 34, 0.25);
}

textarea.form-control {
    min-height: 120px;
    flex: 1;
}

button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    width: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Mapa */
.map-container {
    position: relative;
    min-height: 560px;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    background-color: white;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(20%) contrast(110%) brightness(90%);
}

/* Footer */
footer {
    padding: 80px 0 30px;
    position: relative;
    background: linear-gradient(to right, var(--dark-color), var(--secondary-color));
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

footer h5 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

footer p, footer li {
    color: rgba(255, 255, 255, 0.7);
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
    padding-left: 5px;
}

footer ul {
    list-style: none;
    padding-left: 0;
}

footer ul li {
    margin-bottom: 10px;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Botão Voltar ao Topo */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) !important;
}

/* Animações */
.animate__animated {
    animation-duration: 1s;
}

/* Responsividade */
@media (max-width: 992px) {
    html {
        scroll-padding-top: 32px;
    }

    section,
    .catalog-header {
        scroll-margin-top: 32px;
    }

    .navbar-brand span {
        display: none;
    }

    .navbar-collapse {
        margin-top: 12px;
        padding: 12px;
        background-color: rgba(255, 255, 255, 0.98);
        border-radius: 10px;
        box-shadow: var(--shadow);
    }

    .navbar-dark .navbar-nav .nav-link {
        display: block;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        line-height: 1.35;
    }

    .navbar-dark .navbar-nav .nav-link::before {
        display: none;
    }

    .navbar-nav .nav-item + .nav-item {
        margin-top: 4px;
    }
    
    .catalog-header h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-info {
        max-width: none;
    }

    .map-container {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .catalog-header {
        min-height: 500px;
    }
    
    .catalog-header h1 {
        font-size: 2.5rem;
    }
    
    .catalog-header .lead {
        font-size: 1.2rem;
    }
    
    #sobre, #serviços, #projetos, #contactos {
        padding: 60px 0;
    }
    
    footer {
        padding: 60px 0 20px;
    }
    
    footer .col-md-6 {
        text-align: center !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 10px 0;
    }
    
    .catalog-header h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .modal-dialog {
        max-width: 95% !important;
    }

    .contact-layout {
        padding: 0 6px;
    }

    .social-links {
        align-items: stretch;
        padding: 0 6px;
    }

    .social-links .btn {
        flex: 1 1 100%;
    }
}

/* Efeitos de hover e animações */
.card:hover .icon-box {
    transform: rotate(15deg) scale(1.1);
}

.icon-box {
    transition: var(--transition);
}

/* Efeito de onda no footer */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('imagens/outros/wave.svg');
    background-size: 1000px 100px;
    animation: wave 10s linear infinite;
}

.wave2 {
    animation: wave2 15s linear infinite;
    opacity: 0.5;
    animation-delay: -5s;
    bottom: 10px;
}

.wave3 {
    animation: wave 20s linear infinite;
    opacity: 0.2;
    animation-delay: -2s;
    bottom: 15px;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1000px; }
}

@keyframes wave2 {
    0% { background-position-x: 0; }
    100% { background-position-x: -1000px; }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.cookie-consent {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

.cookie-box {
  background: #fff;
  padding: 24px;
  max-width: 420px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center;
}

.cookie-box h3 {
  margin-bottom: 10px;
}

.cookie-box p {
  font-size: 14px;
  color: #555;
}

.cookie-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111;
}

.btn:hover {
  opacity: 0.9;
}

.cookie-link {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}
