/*
Theme Name: EMACR
Theme URI: https://electromecanicacr.com
Author: IT Networks CR
Author URI: https://itnetworks.co.cr
Description: Tema corporativo a medida para Electromecánica RC BF S.A. (EMACR). Diseño de una página de alto desempeño con secciones editables desde el Personalizador y tipos de contenido propios (Proyectos, Servicios, Clientes).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emacr
*/

/* --- Variables de Color y Estilo --- */
:root {
    --primary: #0D2B52;
    --secondary: #355C8A;
    --accent: #FF8C1A;
    --white: #FFFFFF;
    --gray-light: #F5F7FA;
    --gray-tech: #D9E1EA;
    --text-main: #333333;
    --text-muted: #666666;

    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 20px 40px rgba(13, 43, 82, 0.05);
    --radius-md: 8px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
section { padding: 100px 5%; }

/* --- Utilidades --- */
.container { max-width: 1280px; margin: 0 auto; }
.text-center { text-align: center; }
.section-title { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 3rem auto; }

/* Animaciones Scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Botones --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; font-weight: 600; border-radius: var(--radius-md);
    cursor: pointer; transition: var(--transition);
    font-family: var(--font-head); font-size: 0.95rem;
}
.btn-accent { background: var(--accent); color: var(--white); border: 1px solid var(--accent); }
.btn-accent:hover { background: transparent; color: var(--accent); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* --- Navegación --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 20px 5%; transition: var(--transition); border-bottom: 1px solid rgba(255,255,255,0.1);
}
header.scrolled { background: var(--primary); padding: 15px 5%; box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-bottom: none; }
.nav-container { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; }
.logo i { color: var(--accent); }
.logo img { max-height: 48px; width: auto; }
nav ul { display: flex; gap: 30px; }
nav a { color: var(--white); font-weight: 500; font-size: 0.95rem; }
nav a:hover { color: var(--accent); }
.mobile-menu { display: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* Menú móvil desplegable */
nav.mobile-open ul {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0;
    width: 100%; background: var(--primary); padding: 20px 5%; gap: 20px;
}

/* --- Hero Section --- */
.hero {
    height: 100vh; position: relative; display: flex; align-items: center;
    background-color: var(--primary);
    background-size: cover; background-position: center;
    padding: 0 5%;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; color: var(--white); }
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; }
.hero p { font-size: 1.25rem; font-weight: 300; margin-bottom: 40px; max-width: 600px; color: var(--gray-tech); }
.hero-buttons { display: flex; gap: 20px; }

/* Glassmorphism Stats en Hero */
.hero-stats {
    position: absolute; right: 5%; bottom: 10%; display: flex; gap: 20px;
}
.glass-card {
    background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-md);
    padding: 20px; color: var(--white); width: 180px;
}
.glass-card span { display: block; font-size: 0.8rem; color: var(--gray-tech); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.glass-card strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--accent); }

/* --- Propuesta de Valor --- */
.value-prop { background: var(--gray-light); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card {
    background: var(--white); padding: 40px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft); transition: var(--transition); border-top: 4px solid transparent;
}
.feature-card:hover { transform: translateY(-10px); border-top-color: var(--accent); }
.feature-icon { font-size: 3rem; color: var(--secondary); margin-bottom: 20px; }
.feature-card h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 15px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* --- Portafolio --- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
    position: relative; overflow: hidden; border-radius: var(--radius-md); height: 400px;
    cursor: pointer; background: var(--gray-tech);
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,43,82,0.9), transparent);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 30px;
    opacity: 0; transition: var(--transition);
}
.project-card:hover img { transform: scale(1.05); }
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h4 { color: var(--white); font-size: 1.5rem; margin-bottom: 5px; transform: translateY(20px); transition: all 0.4s ease; }
.project-overlay p { color: var(--accent); font-weight: 500; font-size: 0.9rem; margin-bottom: 10px; transform: translateY(20px); transition: all 0.4s ease 0.1s; }
.project-overlay span { color: var(--gray-tech); font-size: 0.85rem; transform: translateY(20px); transition: all 0.4s ease 0.2s; }
.project-card:hover .project-overlay h4, .project-card:hover .project-overlay p, .project-card:hover .project-overlay span { transform: translateY(0); }

/* --- Estadísticas --- */
.stats-section { background: var(--primary); color: var(--white); padding: 80px 5%; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item h2 { font-size: 3.5rem; color: var(--accent); margin-bottom: 10px; }
.stat-item p { font-size: 1rem; color: var(--gray-tech); font-weight: 500; }

/* --- Certificaciones y Clientes --- */
.trust-section { background: var(--white); }
.badges-container { display: flex; justify-content: center; gap: 40px; margin-bottom: 80px; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 10px; padding: 15px 25px; border: 1px solid var(--gray-tech); border-radius: 50px; color: var(--secondary); font-weight: 600; }

/* Marquee Clientes */
.clients-marquee { overflow: hidden; white-space: nowrap; position: relative; padding: 20px 0; border-top: 1px solid var(--gray-tech); }
.clients-marquee::before, .clients-marquee::after { content: ""; position: absolute; top: 0; width: 100px; height: 100%; z-index: 2; }
.clients-marquee::before { left: 0; background: linear-gradient(to right, white, transparent); }
.clients-marquee::after { right: 0; background: linear-gradient(to left, white, transparent); }
.marquee-content { display: inline-block; animation: scroll 30s linear infinite; }
.marquee-content span { display: inline-flex; align-items: center; font-size: 1.5rem; font-family: var(--font-head); font-weight: 700; color: var(--gray-tech); margin: 0 40px; transition: var(--transition); }
.marquee-content span:hover { color: var(--primary); }
.marquee-content img { display: inline-block; height: 50px; width: auto; margin: 0 40px; object-fit: contain; filter: grayscale(100%); opacity: 0.7; transition: var(--transition); vertical-align: middle; }
.marquee-content img:hover { filter: grayscale(0%); opacity: 1; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- CTA Final --- */
.final-cta { background: var(--secondary); text-align: center; color: var(--white); }
.final-cta h2 { font-size: 3rem; margin-bottom: 30px; }

/* --- Footer --- */
footer { background: #081b33; color: var(--gray-tech); padding: 80px 5% 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-logo { font-family: var(--font-head); font-size: 1.5rem; color: var(--white); font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.footer-logo i { color: var(--accent); }
.footer-col h4 { color: var(--white); margin-bottom: 20px; font-size: 1.1rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-col ul li i { color: var(--accent); margin-right: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.9rem; }

/* --- Contenido genérico (páginas internas) --- */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 160px 5% 100px; }
.page-wrap h1 { color: var(--primary); font-size: 2.5rem; margin-bottom: 1.5rem; }
.page-wrap p { margin-bottom: 1.2rem; color: var(--text-main); }
.page-wrap img { border-radius: var(--radius-md); margin: 1.5rem 0; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .grid-3, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { bottom: 5%; right: 5%; flex-direction: column; }
}
@media (max-width: 768px) {
    nav ul { display: none; }
    .mobile-menu { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .grid-3, .portfolio-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .hero-stats { display: none; } /* Ocultar en móviles para limpiar diseño */
}
