/* RESET E ESTILOS GLOBAIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: transparent;
    min-height: 500;
    padding: 0px;
    color: #333;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.section-container {
 background: transparent;
    
  max-width: 1300px;
}

.section-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.8rem;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

/* ESTILOS BASE GENÉRICOS PARA TODAS AS SEÇÕES */
.dynamic-grid-container {
  --grid-rows: 3;
  --grid-cols: 3;
  --grid-item-height: 220px;
  --grid-gap: 0px;
  --grid-transition: 0.25s cubic-bezier(0.4, 0, 0.05, 1);
  --grid-opacity: 0;

  position: relative;
  width: min(100%, 1300px);
  height: calc(var(--grid-rows) * var(--grid-item-height));
  max-width: 1300px;
  margin: 0 auto;
  overflow: hidden;
}

.dynamic-grid-container * {
  box-sizing: border-box;
}

.dynamic-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  grid-template-rows: repeat(var(--grid-rows), var(--grid-item-height));
  gap: var(--grid-gap);
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.dynamic-grid-item {
  position: relative;
  background: #f1f1f1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all var(--grid-transition);
  overflow: hidden;
  z-index: 2;
  }

.dynamic-grid-item:hover {
  background: rgba(221, 221, 221, 0.3);
}

.dynamic-grid-item h3 {
  margin: 0;
  color: #ffffff;
  mix-blend-mode: difference;
  filter: contrast(999%) brightness(150%);
  transition: opacity var(--grid-transition);
  font-size: clamp(14px, 4vw, 18px);
  text-align: center;
  padding: 0 60px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 100;
}

.dynamic-grid-item:hover h3 {
  opacity: 0;
}

/* CAMADA DE MÁSCARA GENÉRICA */
.dynamic-grid-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: clip-path var(--grid-transition);
  opacity: var(--grid-opacity);
  z-index: 3;
}

.dynamic-grid-img-row {
  display: flex;
  width: 100%;
  height: var(--grid-item-height);
}

.dynamic-grid-img {
  flex: 1;
  margin: 0;
  padding: 0;
  height: var(--grid-item-height);
}

.dynamic-grid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ESTADO ATIVO */
.grid-active .dynamic-grid-item {
  background: transparent;
}

.dynamic-grid-container:hover .dynamic-grid-item:not(:hover) h3 {
  opacity: 1;
}

/* ESTILOS ESPECÍFICOS PARA CADA SEÇÃO */

/* SEÇÃO 1 - Estilo Portfólio */
.grid-style-portfolio .dynamic-grid-item {
  background: #ffffff;
  color: white;
  font-weight: 500;
  border: 2px solid transparent;
}

.grid-style-portfolio .dynamic-grid-item:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

/* SEÇÃO 2 - Estilo Serviços */
.grid-style-servicos .dynamic-grid-item {
  background: linear-gradient(135deg, #c0c0c0 0%, #ffffff 100%);
  color: white;
  font-weight: 600;
}

.grid-style-servicos .dynamic-grid-item:hover {
  background: transparent;
  transform: scale(1);
  }

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .dynamic-grid-container {
    --grid-item-height: 150px;
  }
  
  .section-container {
    padding: 20px;
    margin: 20px auto;
  }
  
  header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .dynamic-grid-container {
    --grid-item-height: 120px;
  }
  
  .dynamic-grid-item h3 {
    font-size: 12px;
  }
  
  body {
    padding: 0px;
  }
}