/*
Theme Name: Catamutun Energía
Theme URI: https://catamutunenergia.com
Author: Catamutun Energía S.A.
Description: Tema corporativo optimizado para Catamutun Energía. Soluciones térmicas industriales con biomasa.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catamutun
*/

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

:root {
  --gray-dark: #2D2D2D;
  --gray-mid: #4A4A4A;
  --gray-light: #F5F5F5;
  --gray-border: #E0E0E0;
  --red: #C8102E;
  --red-dark: #A00D24;
  --white: #FFFFFF;
  --font-main: 'Inter', 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --header-height: 96px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* HEADER / NAV */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img { height: 43px; width: auto; }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-mid);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active,
.nav-links a.current-menu-item {
  color: var(--red);
  background: rgba(200,16,46,0.06);
}
.nav-links a.btn-contact {
  background: var(--red);
  color: var(--white);
  font-weight: 600;
}
.nav-links a.btn-contact:hover { background: var(--red-dark); }
.nav-links a.btn-contact.current-menu-item {
  background: var(--red);
  color: var(--white);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--gray-dark);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; }
}

/* HERO SECTION */
.hero {
  margin-top: var(--header-height);
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ECECEC 0%, #E0E0E0 100%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(200,16,46,0.08)" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,192C1248,171,1344,117,1392,90.7L1440,64L1440,320L0,320Z"></path></svg>') no-repeat bottom / cover;
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 700px; }
.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-dark);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--red); }
.hero p {
  font-size: 1.125rem;
  color: var(--gray-mid);
  margin-bottom: 32px;
  max-width: 560px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }

/* Page hero (interior pages) */
.page-hero {
  margin-top: var(--header-height);
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #ECECEC 0%, #E0E0E0 100%);
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}
.page-hero h1 {
  font-size: 2.5rem;
  color: var(--gray-dark);
  font-weight: 700;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1.1rem;
  color: var(--gray-mid);
  max-width: 600px;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--gray-mid); }
.breadcrumb a:hover { color: var(--red); }

/* SECTIONS */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-light); }
.section-dark { background: var(--gray-dark); color: var(--white); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header .accent-line {
  width: 48px; height: 3px;
  background: var(--red);
  margin: 0 auto 16px;
  border-radius: 2px;
}
.section-header p {
  font-size: 1.05rem;
  color: var(--gray-mid);
  max-width: 600px;
  margin: 0 auto;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  padding: 36px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.card-icon {
  width: 56px; height: 56px;
  background: rgba(200,16,46,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; color: var(--red); }
.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.card p {
  font-size: 0.95rem;
  color: var(--gray-mid);
  line-height: 1.65;
}
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--red);
}
.card .card-link:hover { gap: 10px; }

/* CONTENT SECTIONS (interior pages) */
.content-section { padding: 64px 0; }
.content-section + .content-section { border-top: 1px solid var(--gray-border); }

.content-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 16px;
}
.content-section h2::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  background: var(--red);
  border-radius: 2px;
}
.content-section p {
  font-size: 1rem;
  color: var(--gray-mid);
  margin-bottom: 16px;
  max-width: 720px;
}
.content-section .feature-list {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}
.content-section .feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--gray-mid);
}
.content-section .feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 8px;
  background: var(--red);
  border-radius: 2px;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* STATS BAR */
.stats-bar {
  background: var(--gray-light);
  padding: 48px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--red);
}
.stat-item .stat-label {
  font-size: 0.9rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

/* BENEFITS / HIGHLIGHT BOXES */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.benefit-item {
  background: var(--gray-light);
  padding: 24px;
  border-radius: 10px;
  border-left: 4px solid var(--red);
}
.benefit-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.benefit-item p {
  font-size: 0.9rem;
  color: var(--gray-mid);
}

/* CONTACT FORM */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--gray-dark);
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.btn-submit {
  display: inline-block;
  padding: 14px 40px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--red-dark); }

.contact-info-box {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 36px;
}
.contact-info-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--gray-mid);
}
.contact-info-item svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--red);
  margin-top: 2px;
}

/* CTA SECTION */
.cta-section {
  background: var(--gray-light);
  padding: 72px 0;
  text-align: center;
  border-top: 4px solid var(--red);
}
.cta-section h2 {
  font-size: 2rem;
  color: var(--gray-dark);
  margin-bottom: 16px;
}
.cta-section p {
  color: var(--gray-mid);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

/* FOOTER */
.footer {
  background: #E8E8E8;
  color: var(--gray-mid);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-logo img { height: 60px; margin-bottom: 16px; }
.footer-desc { font-size: 0.9rem; line-height: 1.7; }
.footer h4 {
  color: var(--gray-dark);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--gray-mid);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--red); }
.footer-bottom {
  border-top: 1px solid var(--gray-border);
  padding-top: 24px;
  text-align: center;
  font-size: 0.825rem;
}

/* UTILITIES */
.text-red { color: var(--red); }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }

/* Responsive hero */
@media (max-width: 768px) {
  .hero { min-height: 440px; }
  .hero h1 { font-size: 2.2rem; }
  .page-hero h1 { font-size: 1.8rem; }
  .section { padding: 56px 0; }
  .section-header h2 { font-size: 1.6rem; }
}
