/* 
   EBM Premium Industrial Theme 
   Colors: 
   - Primary Dark: #0f172a (Slate 900) - Trust, Stability
   - Secondary Dark: #1e293b (Slate 800) - Depth
   - Accent: #f59e0b (Amber 500) - Energy, Warning, Industrial
   - Light: #f8fafc (Slate 50) - Cleanliness
   - Text: #334155 (Slate 700) - Readability
*/

:root {
    --primary-dark: #0f172a;
    --secondary-dark: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-light: #94a3b8;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3rem; letter-spacing: -0.025em; }
h2 { font-size: 2.25rem; letter-spacing: -0.025em; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a { text-decoration: none; color: inherit; transition: color 0.2s; }

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding { padding: 5rem 0; }
.text-center { text-align: center; }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Top Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar-left {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.top-bar-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.badge-retie {
    background-color: var(--accent);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Header & Nav */
header {
    background-color: var(--white);
    color: var(--primary-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
}

.logo img { 
    height: 60px; 
    width: auto; 
    object-fit: contain;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.75)), url('../images/subestacion_electrica_01.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 10rem 0 8rem;
    text-align: center;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 { 
    color: var(--white); 
    margin-bottom: 1.5rem; 
    max-width: 900px; 
    margin-left: auto; 
    margin-right: auto;
    font-size: 3.5rem;
}

.hero .highlight {
    color: var(--accent);
}

.hero-subtitle { 
    font-size: 1.25rem; 
    color: var(--text-light); 
    margin-bottom: 2.5rem; 
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.trust-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 0.9rem;
}

.trust-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

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

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Value Proposition */
.value-prop {
    background-color: var(--white);
}

.value-cards {
    margin-top: 3rem;
}

.value-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--accent);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.value-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(245, 158, 11, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.value-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.value-card p {
    color: var(--text-main);
    line-height: 1.7;
}

/* Services Section */
.services-section {
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    gap: 3rem;
    margin-top: 3rem;
}

.service-card-large {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    position: relative;
}

.service-card-large[style*="cursor: pointer"],
.service-card-large.clickable {
    cursor: pointer;
}

.service-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-image {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

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

.service-card-large:hover .service-image img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, transparent 100%);
}

.service-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.service-icon-large {
    width: 64px;
    height: 64px;
    background-color: rgba(245, 158, 11, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.service-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.service-content p {
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-main);
}

.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.service-link {
    color: var(--accent);
    font-weight: 600;
    margin-top: auto;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.service-link:hover {
    color: var(--accent-hover);
}

/* Ensure links inside clickable cards are still clickable */
.service-card-large a,
.blog-card a,
.blog-article-card a {
    position: relative;
    z-index: 2;
}

/* Visual feedback for clickable cards */
.service-card-large.clickable:hover,
.blog-card.clickable:hover,
.blog-article-card.clickable:hover {
    cursor: pointer;
}

.service-card-large.clickable::after,
.blog-card.clickable::after,
.blog-article-card.clickable::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: background-color 0.2s;
}

.service-card-large.clickable:hover::after,
.blog-card.clickable:hover::after,
.blog-article-card.clickable:hover::after {
    background-color: rgba(245, 158, 11, 0.05);
}

/* Lab Section */
.lab-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: var(--white);
}

.lab-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.lab-text .section-badge {
    color: var(--accent);
}

.lab-text h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.lab-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.lab-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lab-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.lab-feature-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(245, 158, 11, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.lab-feature h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.lab-feature p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.lab-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.lab-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lab-badge {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent);
    color: var(--primary-dark);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.lab-badge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.lab-badge-text {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* About Section */
.about-section {
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

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

.about-img-1,
.about-img-2 {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.about-img-1 {
    transform: translateY(2rem);
}

.about-text .section-badge {
    color: var(--accent);
}

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

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

.about-features {
    list-style: none;
    margin: 1.5rem 0;
}

.about-features li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-main);
    line-height: 1.7;
}

.about-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Stats Section */
.stats-section {
    background-color: var(--secondary-dark);
    color: var(--white);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item h3 {
    color: var(--accent);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.stat-item p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Blog Preview */
.blog-preview {
    background-color: var(--light-bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card,
.blog-article-card {
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.blog-card[style*="cursor: pointer"],
.blog-card.clickable,
.blog-article-card[style*="cursor: pointer"],
.blog-article-card.clickable {
    cursor: pointer;
}

.blog-card:hover,
.blog-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    display: inline-block;
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.blog-content h3 {
    margin-bottom: 0.75rem;
}

.blog-content h3 a {
    color: var(--primary-dark);
    transition: color 0.2s;
}

.blog-content h3 a:hover {
    color: var(--accent);
}

.blog-content p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.blog-link:hover {
    color: var(--accent-hover);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

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

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo .logo-main {
    font-size: 1.5rem;
    color: var(--white);
    display: block;
    margin-bottom: 0.25rem;
}

.footer-logo .logo-sub {
    font-size: 0.875rem;
    color: var(--accent);
}

.footer-col p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links a {
    color: var(--text-light);
    transition: color 0.2s;
}

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

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--text-light);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--accent);
}

.footer-hours {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--text-light);
}

.copyright a {
    color: var(--accent);
    transition: color 0.2s;
}

.copyright a:hover {
    color: var(--accent-hover);
}

/* Responsive */
@media (max-width: 1024px) {
    .service-card-large {
        grid-template-columns: 1fr;
    }
    
    .lab-content {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    
    .hero {
        padding: 6rem 0 4rem;
        min-height: auto;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .top-bar-left {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .trust-indicators {
        grid-template-columns: 1fr;
    }
    
    .hero-btns {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .service-card-large {
        grid-template-columns: 1fr;
    }
    
    .service-image {
        min-height: 250px;
    }
    
    .about-images {
        grid-template-columns: 1fr;
    }
    
    .about-img-1 {
        transform: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
