/* 
 * TGC Corporate Website - Styles
 * Estética 2025: Minimalista, tonos profundos, tipografía limpia.
 */

:root {
  /* Paleta de Colores */
  --color-primary: #0b2545;
  /* Azul Petróleo */
  --color-primary-dark: #061629;
  --color-accent: #b76e3a;
  /* Cobre */
  --color-accent-hover: #d68a52;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #f8f9fa;
  --color-white: #ffffff;
  --color-border: #e0e0e0;

  /* Espaciado y Layout */
  --container-width: 1200px;
  --section-padding: clamp(3rem, 5vw, 6rem);
  --grid-gap: 2rem;

  /* Tipografía */
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --h1-size: clamp(2.5rem, 5vw, 4rem);
  --h2-size: clamp(2rem, 4vw, 3rem);
  --h3-size: 1.5rem;
  --body-size: 1rem;

  /* Efectos */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* Tipografía */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--h1-size);
  font-weight: 800;
}

h2 {
  font-size: var(--h2-size);
  font-weight: 700;
  margin-bottom: 2rem;
}

h3 {
  font-size: var(--h3-size);
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

/* Utilidades */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section {
  padding: var(--section-padding) 0;
}

.text-center {
  text-align: center;
}

.text-copper {
  color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-med);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Topbar */
#topbar {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

#topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

/* Header & Nav */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: padding var(--transition-med);
  padding: 1rem 0;
}

#header.scrolled {
  padding: 0.5rem 0;
}

#header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-primary);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
}

/* Hero */
#hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a3c63 100%);
  color: var(--color-white);
  overflow: hidden;
  padding-top: 4rem;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    linear-gradient(rgba(11, 37, 69, 0.8), rgba(11, 37, 69, 0.7)),
    url('assets/img/hero.png') center/cover no-repeat;
  opacity: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Services Grid */
.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--grid-gap);
}

.service-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-med);
  border-top: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--color-accent);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(183, 110, 58, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-accent);
}

.accordion-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.service-card.active .accordion-details {
  max-height: 500px;
  /* Suficiente para el contenido */
  margin-top: 1rem;
}

.accordion-toggle {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-top: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accordion-toggle::after {
  content: '+';
  font-weight: bold;
}

.service-card.active .accordion-toggle::after {
  content: '-';
}

/* Operations - List visual */
.operations-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.op-item {
  background: var(--color-white);
  padding: 1.5rem;
  border-left: 3px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

/* Investments - Dark section */
#investments {
  background-color: var(--color-primary);
  color: var(--color-white);
}

#investments h2 {
  color: var(--color-white);
}

#investments p {
  color: rgba(255, 255, 255, 0.8);
}

.investment-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: var(--radius-md);
}

/* Sustainability & HR */
.icon-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.icon-box {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Timeline FEL/SIC */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  width: 50%;
  padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 3px solid var(--color-white);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -9px;
}

/* Contact Form */
#contact {
  background-color: #eee;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background-color: #e0e0e0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

/* Footer */
#footer {
  background-color: var(--color-primary-dark);
  color: white;
  padding: 3rem 0;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-links a {
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.footer-links a:hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    height: calc(100vh - 60px);
    width: 250px;
    background: var(--color-white);
    flex-direction: column;
    padding: 2rem;
    align-items: flex-start;
    transform: translateX(100%);
    transition: transform var(--transition-med);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .hero-actions {
    flex-direction: column;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 0;
  }

  .timeline-item {
    width: 100%;
    left: 0;
    padding-left: 2rem;
    text-align: left;
  }

  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
    right: auto;
  }
}