/* Declaração de variáveis globais */
:root {
  --primary-color: #ffffff;
  --secondary-color: #000000;
  --text-color: #f5f5f5;
  --text-dark: #333333;
  --bg-color: #000000;
  --bg-light: #111111;
  --accent-color: #222222;
  --border-color: #333333;
  --shadow-light: rgba(255, 255, 255, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --security-gradient: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);

  /* Novas variáveis para temas */
  --header-bg: rgba(0, 0, 0, 0.95);
  --card-bg: var(--bg-color);
  --form-bg: var(--bg-light);
  --input-bg: var(--bg-color);
  --whatsapp-green: #25d366;
  --whatsapp-hover: #128c7e;
}

/* Estilos gerais */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--secondary-color);
}

body {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  min-block-size: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Botão Flutuante do WhatsApp - Redesenhado */
.whatsapp-float {
  position: fixed;
  inset-block-end: 25px;
  inset-inline-end: 25px;
  background: var(--security-gradient);
  color: var(--primary-color);
  inline-size: 50px;
  block-size: 50px;
  border: 2px solid var(--whatsapp-green);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  z-index: 999;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--whatsapp-green);
  transition: left 0.4s ease;
  z-index: -1;
}

.whatsapp-float:hover::before {
  left: 0;
}

.whatsapp-float:hover {
  color: var(--secondary-color);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 10px 25px rgba(37, 211, 102, 0.3),
    0 0 0 8px rgba(37, 211, 102, 0.1);
}

.whatsapp-float i {
  z-index: 2;
  position: relative;
  transition: var(--transition);
}

/* Animação de Scanner de Segurança */
@keyframes securityScan {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw);
    opacity: 0;
  }
}

.security-scanner {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 100vh;
  background: linear-gradient(to bottom, transparent, var(--whatsapp-green), transparent);
  animation: securityScan 8s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  inline-size: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
  background: var(--security-gradient);
  border: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Melhorias de layout responsivo */
.container {
  inline-size: 90%;
  max-inline-size: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Estilos de botões aprimorados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 35px;
  background: var(--security-gradient);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.btn:active {
  transform: translateY(0);
}

/* Estilos de seções aprimorados */
.section {
  padding: 120px 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-block-end: 60px;
  text-align: center;
  position: relative;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-title::after {
  content: '';
  position: absolute;
  inset-block-end: -20px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inline-size: 100px;
  block-size: 2px;
  background: var(--security-gradient);
}

.section-title::before {
  content: '///';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: var(--primary-color);
  letter-spacing: 5px;
}

/* Header e Navegação aprimorados */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 5px 30px var(--shadow-dark);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 3px;
  text-transform: uppercase;
  position: relative;
  z-index: 1001;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--security-gradient);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-inline-start: 40px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 10px 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  inline-size: 0;
  block-size: 2px;
  background: var(--security-gradient);
  transition: var(--transition);
}

.nav-links a:hover::after {
  inline-size: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001;
  inline-size: 30px;
  block-size: 25px;
  position: relative;
}

.hamburger div {
  inline-size: 100%;
  block-size: 3px;
  background-color: var(--primary-color);
  position: absolute;
  inset-inline-start: 0;
  transition: all 0.3s ease;
}

.hamburger div:nth-child(1) {
  inset-block-start: 0;
}

.hamburger div:nth-child(2) {
  inset-block-start: 50%;
  transform: translateY(-50%);
}

.hamburger div:nth-child(3) {
  inset-block-end: 0;
}

/* Hero Section aprimorado */
.hero {
  block-size: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block-start: 80px;
  background: var(--security-gradient);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 98px,
      rgba(255, 255, 255, 0.03) 100px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 98px,
      rgba(255, 255, 255, 0.03) 100px
    );
  animation: securityGrid 20s linear infinite;
}

@keyframes securityGrid {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.hero-content {
  max-inline-size: 900px;
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-block-end: 30px;
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-block-end: 40px;
  color: var(--primary-color);
  font-weight: 200;
  letter-spacing: clamp(4px, 2vw, 8px);
  text-transform: uppercase;
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-block-end: 50px;
  opacity: 0.9;
  max-inline-size: 700px;
  line-height: 1.8;
  letter-spacing: 1px;
}

/* Projetos Section aprimorado */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3vw, 30px);
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 15px 40px var(--shadow-dark);
  transition: var(--transition);
  block-size: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 60px var(--shadow-dark);
  border-color: var(--primary-color);
}

.project-img {
  inline-size: 100%;
  block-size: 250px;
  object-fit: cover;
  filter: grayscale(20%);
  transition: var(--transition);
}

.project-card:hover .project-img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.project-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.project-title {
  font-size: 1.8rem;
  margin-block-end: 15px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.project-category {
  display: inline-block;
  padding: 8px 16px;
  background: var(--security-gradient);
  color: var(--primary-color);
  font-size: 0.8rem;
  border: 1px solid var(--primary-color);
  margin-block-end: 20px;
  align-self: flex-start;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.project-description {
  margin-block-end: 25px;
  opacity: 0.9;
  flex-grow: 1;
  line-height: 1.7;
  letter-spacing: 0.5px;
}

/* Estilos do footer aprimorados */
.footer {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 60px 0 30px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--security-gradient);
}

.footer-logo-img {
  max-inline-size: 200px;
  filter: brightness(0) invert(1);
  transition: var(--transition);
}

.footer-logo-img:hover {
  filter: brightness(0) invert(0.8);
  transform: scale(1.05);
}

.copyright {
  opacity: 0.7;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Media Queries para Monitores Ultrawide */
@media screen and (min-width: 1920px) {
  .container {
    max-inline-size: 1600px;
  }

  .hero-title {
    font-size: 5rem;
    letter-spacing: 6px;
  }

  .section-title {
    font-size: 3.5rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-inline-size: 1400px;
  }

  .project-img {
    block-size: 400px;
  }
}

/* Media Queries para Tablets */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .hero-title {
    font-size: clamp(2.8rem, 5vw, 3.8rem);
    letter-spacing: 3px;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .project-img {
    block-size: 320px;
  }

  .container {
    padding: 0 25px;
  }
}

/* Media Queries para Desktop */
@media screen and (max-width: 992px) {
  .section-title {
    font-size: 2.5rem;
    letter-spacing: 2px;
  }

  .hero-content {
    padding: 0 25px;
  }

  .about-content {
    text-align: center;
    padding: 0 25px;
  }
}

@media screen and (max-width: 768px) {
  .nav-links {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-end: 0;
    inline-size: 100%;
    background: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    clip-path: circle(0 at 90% -10%);
    transition: all 0.5s ease-out;
    pointer-events: none;
    border-top: 1px solid var(--border-color);
  }

  .nav-links.active {
    clip-path: circle(150% at 90% -10%);
    pointer-events: all;
  }

  .nav-links li {
    margin: 20px 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 6px);
  }

  .hamburger.active div:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active div:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -6px);
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
    letter-spacing: 4px;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .project-img {
    block-size: 280px;
  }

  .project-content {
    padding: 20px;
  }

  .project-title {
    font-size: 1.4rem;
  }

  .project-description {
    font-size: 1rem;
  }

  .whatsapp-float {
    inline-size: 45px;
    block-size: 45px;
    font-size: 18px;
  }
}

@media screen and (max-width: 576px) {
  .section {
    padding: 80px 0;
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .btn {
    padding: 12px 25px;
    letter-spacing: 1px;
  }

  .section-title {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .project-img {
    block-size: 300px;
    object-fit: cover;
    object-position: center;
  }

  .project-content {
    padding: 25px;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-description {
    font-size: 1rem;
    line-height: 1.6;
  }

  .whatsapp-float {
    inline-size: 40px;
    block-size: 40px;
    font-size: 16px;
    inset-block-end: 20px;
    inset-inline-end: 20px;
  }
}

/* Animações específicas de segurança */
@keyframes securityAlert {
  0%, 100% {
    border-color: var(--border-color);
  }
  50% {
    border-color: var(--whatsapp-green);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
  }
}

.security-highlight {
  animation: securityAlert 2s ease-in-out infinite;
}

/* Efeitos de hover para elementos de segurança */
.project-card,
.social-link,
.btn {
  position: relative;
}

.project-card::after,
.social-link::after,
.btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--whatsapp-green), var(--primary-color), var(--whatsapp-green));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::after,
.social-link:hover::after,
.btn:hover::after {
  opacity: 0.3;
}