/* 
 * ARA Consultoria e Projetos - Official Stylesheet
 * Industrial Engineering Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@600;700;800&display=swap');

:root {
  /* Brand Colors */
  --color-primary: #0F172A;
  /* Dark Metallic Blue (Slate 900) */
  --color-secondary: #3e8cad;
  /* Adjusted Metallic Blue */
  --color-accent: #64748B;
  /* Blue-ish Gray (Slate 500) */
  --color-text-main: #1E293B;
  /* Slate 800 */
  --color-text-light: #475569;
  /* Slate 600 */
  --color-bg-light: #F1F5F9;
  /* Slate 100 */
  --color-bg-white: #FFFFFF;

  /* UI Colors */
  --color-border: #E2E8F0;
  /* Slate 200 */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  /* Tinted shadow */
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Spacing */
  --spacing-section: 6rem;
  --container-width: 1200px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-text-main);
  line-height: 1.6;
  background-color: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* Fix horizontal scroll globally */
}

/* Ensure images and SVGs don't cause overflow */
img,
svg {
  max-width: 100%;
  height: auto;
}

main {
  flex: 1;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--spacing-section) 0;
}

.bg-light {
  background-color: var(--color-bg-light);
}

.text-center {
  text-align: center;
}

.primary-btn {
  display: inline-block;
  background-color: var(--color-secondary);
  color: var(--color-primary);
  padding: 1rem 2rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid var(--color-secondary);
}

.primary-btn:hover {
  background-color: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.outline-btn {
  display: inline-block;
  background-color: transparent;
  color: var(--color-bg-white);
  padding: 1rem 2rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid var(--color-bg-white);
}

.outline-btn:hover {
  background-color: var(--color-bg-white);
  color: var(--color-primary);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Header */
header {
  background-color: #ffffff;
  /* Solid white */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}



.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  /* Reduced height for sleekness */
  position: relative;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 1001;
}

/* CRITICAL FIX: Constrain Logo Image */
.logo img {
  height: 115px;
  /* Large size to overlap */
  width: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.1));
  margin-top: 10px;
  /* Push down slightly to enhance overlap */
}

.logo:hover img {
  transform: scale(1.05);
}

.logo span {
  color: var(--color-secondary);
}

/* Mobile Menu Button */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--color-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Active Hamburger State (X shape) */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

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

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover {
  color: var(--color-secondary);
}

/* Hero Section */
.hero {
  height: 90vh;
  min-height: 600px;
  background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6)), url('../images/hero-estrutura-metalica-ara.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  color: var(--color-bg-white);
  padding-top: 110px;
  /* Adjusted for new header */
}

.hero-content {
  max-width: 700px;
  animation: fadeInUp 1s ease-out;
  /* Slide up effect for container */
}

.hero-cta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.page-header {
  height: 50vh;
  min-height: 300px;
  background-image: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8)), url('../images/hero-estrutura-metalica-ara.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--color-bg-white);
  padding-top: 110px;
  text-align: center;
  animation: fadeIn 1.2s ease-out;
  /* Fade in backing */
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-bg-white);
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-bg-white);
  /* Animation inherited from hero-content or specific if needed */
}

.hero p,
.page-header p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  font-weight: 400;
  animation: fadeInUp 1s ease-out 0.3s backwards;
  /* Staggered delay */
}

.nav-links a.active {
  color: var(--color-secondary);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item h3 {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.stat-item p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Default 2 columns desktop/tablet */
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--color-bg-white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--color-secondary);
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(62, 140, 173, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--color-secondary);
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Featured Projects */
.projects-header {
  margin-bottom: 4rem;
  text-align: center;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--color-bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.project-image {
  height: 250px;
  background-color: #ddd;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
}

.project-category {
  font-size: 0.8rem;
  color: var(--color-secondary);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.project-info p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Why Choose Us */
.features-section {
  background-color: var(--color-primary);
  color: var(--color-bg-white);
}

.features-section h2 {
  color: var(--color-bg-white);
  text-align: center;
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.feature-item h3 {
  color: var(--color-bg-white);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-item p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Contact */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  margin-top: 3rem;
  text-align: left;
  background: var(--color-bg-white);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

textarea.form-control {
  height: 150px;
  resize: vertical;
}

.contact-info {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

/* Contact Page Actions */
.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-actions button {
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 54px;
  /* Fix height */
}

.whatsapp-btn {
  border: none;
  background-color: #25D366;
  color: #fff;
  border: 2px solid #25D366;
}

.whatsapp-btn:hover {
  background-color: #20BA56;
  border-color: #20BA56;
  color: #fff;
}

.email-btn {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.email-btn:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.info-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

/* Footer */
footer {
  background-color: #111;
  color: #888;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-about h3 {
  color: var(--color-bg-white);
  margin-bottom: 1.5rem;
}

.footer-about p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  /* Make logo white for dark footer */
}

.footer-links h4,
.footer-contact h4 {
  color: var(--color-bg-white);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links a:hover {
  color: var(--color-bg-white);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: block;
    position: relative;
    /* Ensure it stays in flow or absolute as needed, but block is fine in flex container */
    margin-left: auto;
    /* Push to right if needed */
  }

  .nav-links {
    position: fixed;
    /* Fixed to cover screen or scroll with it */
    top: 90px;
    right: 0;
    width: 280px;
    height: calc(100vh - 90px);
    background-color: #fff;
    /* Ensure solid background */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    /* Higher than header content but below button maybe? */
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.25rem;
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
    display: block;
  }

  .hero {
    padding-top: 140px;
    height: auto;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
    padding-bottom: 3rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 1rem;
    /* Consistent spacing */
    align-items: stretch;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-cta a {
    text-align: center;
    width: 100%;
    display: flex;
    /* Better for centering content inside button */
    justify-content: center;
    align-items: center;
  }

  .contact-info {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Force 1 column for services on mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Stack contact buttons on mobile */
  .contact-actions {
    grid-template-columns: 1fr;
  }
}

/* Project Gallery Styles */
.project-detail-header {
  background-color: var(--color-bg-light);
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.project-detail-header h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.project-detail-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--color-text-light);
  font-weight: 500;
  margin-bottom: 2rem;
}

.project-description {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.3s ease;
  height: 300px;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 50%;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

/* Back Button */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  /* Highest priority */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  background-color: #20BA56;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

/* Safe area for mobile footer to avoid overlapping with floating buttons */
footer {
  padding-bottom: 100px;
  /* Extra space at bottom */
}