:root {
    --primary-color: #16a34a;
    --secondary-color: #166534;
    --accent-color: #a3e635;
    --text-color: #333;
    --background-light: #eefdf3;
    --background-dark: #d7f5e0;
    --heading-color: #0f2418;
    --white-color: #fff;
    --border-color: #c9ecd2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--text-color); overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header / Nav */
.header { position: fixed; top: 0; left: 0; width: 100%; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); z-index: 1000; transition: all .3s ease; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 80px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { width: 50px; height: 50px; object-fit: contain; }
.logo-text { font-size: 24px; font-weight: 800; color: var(--primary-color); }
.nav-menu { display: flex; list-style: none; gap: 32px; }
.nav-link { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color .3s ease; position: relative; }
.nav-link:hover { color: var(--primary-color); }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: width .3s ease; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--secondary-color); font-weight: 700; }
.nav-link.active::after { width: 100%; background: var(--accent-color); height: 3px; }
.nav-toggle { display: none; flex-direction: column; cursor: pointer; gap: 4px; }
.nav-toggle span { width: 25px; height: 3px; background: var(--text-color); transition: all .3s ease; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 80px; background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hero::before { content: ''; position: absolute; top: -10%; right: -5%; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%); opacity: .3; filter: blur(50px); pointer-events: none; z-index: 0; }
.hero::after { content: ''; position: absolute; bottom: -15%; left: -8%; width: 400px; height: 400px; background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%); opacity: .25; filter: blur(60px); pointer-events: none; z-index: 0; }
.hero-container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-content { animation: fadeInUp 1s ease; }
.hero-title { font-size: 3.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 24px; color: var(--heading-color); }
.highlight { color: var(--primary-color); position: relative; }
.highlight::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 10px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); opacity: .4; z-index: -1; }
.hero-description { font-size: 1.25rem; color: #666; margin-bottom: 32px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { position: relative; animation: fadeInRight 1s ease; }
.hero-rings { position: absolute; inset: 0; z-index: -1; }
.hero-rings .ring { position: absolute; inset: 0; border: 2px solid var(--primary-color); border-radius: 20px; opacity: 0; animation: ringPulse 3s ease-out infinite; }
.hero-rings .ring:nth-child(2) { animation-delay: 1s; }
.hero-rings .ring:nth-child(3) { animation-delay: 2s; }
.hero-img { width: 100%; height: 400px; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 40px rgba(22, 101, 52, .25); }
.hero-carousel { position: relative; height: 400px; }
.hero-carousel .hero-carousel-img { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-carousel .hero-carousel-img.active { opacity: 1; }
.hero-stats { position: relative; z-index: 1; max-width: 1200px; margin: 60px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat { position: relative; overflow: hidden; text-align: center; padding: 30px; background: var(--white-color); border-radius: 15px; box-shadow: 0 10px 30px rgba(22, 101, 52, .12); transition: transform .3s ease; }
.stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); }
.stat:hover { transform: translateY(-5px); }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary-color); margin-bottom: 8px; }
.stat-label { color: #666; font-weight: 500; }

/* Buttons */
.btn { position: relative; overflow: hidden; padding: 18px 36px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all .3s ease; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: var(--white-color); box-shadow: 0 4px 15px rgba(22, 163, 74, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(22, 163, 74, .5); }
.btn-secondary { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background: var(--primary-color); color: var(--white-color); transform: translateY(-2px); }

/* Ripple effect for buttons */
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .4); transform: scale(0); animation: ripple-effect .6s linear; pointer-events: none; }
@keyframes ripple-effect { to { transform: scale(4); opacity: 0; } }

/* Section headers */
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--heading-color); margin-bottom: 16px; position: relative; }
.section-title::after { content: ''; display: block; width: 70px; height: 5px; margin: 16px auto 0; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); border-radius: 3px; }
.section-subtitle { font-size: 1.25rem; color: #666; max-width: 600px; margin: 0 auto; }

/* About */
.about { padding: 100px 0; background: var(--white-color); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.about-card { padding: 40px; background: var(--background-light); border-radius: 20px; text-align: center; transition: transform .3s ease, box-shadow .3s ease; border: 1px solid var(--border-color); }
.about-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(22, 101, 52, .18); }
.card-icon { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.card-icon i { font-size: 2rem; color: var(--white-color); }
.about-card h3 { font-size: 1.5rem; font-weight: 600; color: var(--heading-color); margin-bottom: 16px; }
.about-card p { color: #666; line-height: 1.7; }

/* Services */
.services { position: relative; overflow: hidden; padding: 100px 0; background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%); }
.services::before { content: ''; position: absolute; top: -10%; right: -5%; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%); opacity: .25; filter: blur(50px); pointer-events: none; z-index: 0; }
.services .container { position: relative; z-index: 1; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.service-card { background: var(--white-color); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(22, 101, 52, .12); transition: transform .3s ease, box-shadow .3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(22, 101, 52, .2); }
.service-image { position: relative; height: 200px; overflow: hidden; }
.service-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.service-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(22, 163, 74, .35), rgba(163, 230, 53, .15)); opacity: 0; transition: opacity .3s ease; }
.service-card:hover .service-image img { transform: scale(1.1); }
.service-card:hover .service-image::after { opacity: 1; }
.service-content { padding: 30px; border-top: 4px solid var(--primary-color); }
.service-content h3 { font-size: 1.5rem; font-weight: 600; color: var(--heading-color); margin-bottom: 16px; }
.service-content p { color: #666; margin-bottom: 20px; line-height: 1.7; }
.service-content ul { list-style: none; }
.service-content li { padding: 8px 0; color: #666; position: relative; padding-left: 24px; }
.service-content li::before { content: '✓'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }

/* Location */
.location { padding: 100px 0; background: var(--white-color); }
.location-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.location-info { display: flex; flex-direction: column; gap: 30px; }
.location-card { display: flex; gap: 20px; padding: 30px; background: var(--background-light); border-radius: 15px; border: 1px solid var(--border-color); transition: transform .3s ease, box-shadow .3s ease; }
.location-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(22, 101, 52, .15); }
.location-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.location-icon i { font-size: 1.5rem; color: var(--white-color); }
.location-details h3 { font-size: 1.25rem; font-weight: 600; color: var(--heading-color); margin-bottom: 8px; }
.location-details p { color: #666; line-height: 1.6; }
.location-details a { color: var(--primary-color); text-decoration: none; }
.location-details a:hover { text-decoration: underline; }
.location-map { border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(22, 101, 52, .15); }
.location-map iframe { display: block; width: 100%; border: 0; }

/* Contact */
.contact { position: relative; overflow: hidden; padding: 100px 0; background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%); }
.contact::before { content: ''; position: absolute; bottom: -15%; left: -8%; width: 400px; height: 400px; background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%); opacity: .2; filter: blur(60px); pointer-events: none; z-index: 0; }
.contact .container { position: relative; z-index: 1; }
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info h3 { font-size: 1.5rem; font-weight: 600; color: var(--heading-color); margin-bottom: 16px; }
.contact-info p { color: #666; margin-bottom: 30px; line-height: 1.7; }
.contact-methods { display: flex; flex-direction: column; gap: 16px; }
.contact-method { display: flex; align-items: center; gap: 12px; color: #666; }
.contact-method i { color: var(--primary-color); font-size: 1.25rem; }
.contact-method a, .footer-contact a { color: inherit; text-decoration: none; transition: color .3s ease; }
.contact-method a:hover { color: var(--primary-color); }
.contact-form { background: var(--white-color); padding: 40px; border-radius: 20px; box-shadow: 0 15px 40px rgba(22, 101, 52, .15); }
.form-group { margin-bottom: 24px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 16px; border: 2px solid var(--border-color); border-radius: 10px; font-size: 1rem; transition: border-color .3s ease; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 2px solid var(--primary-color); outline-offset: 2px; border-color: var(--primary-color); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-status { margin-top: 16px; font-weight: 500; }
.form-status.success { color: var(--secondary-color); padding: 12px 16px; background: var(--background-light); border-radius: 10px; }
.form-status.error { color: #b91c1c; padding: 12px 16px; background: #fdecea; border-radius: 10px; }

/* Footer */
.footer { background: var(--heading-color); color: var(--white-color); padding: 60px 0 20px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; text-decoration: none; }
.footer-logo img { width: 40px; height: 40px; object-fit: contain; }
.footer-logo span { font-size: 1.5rem; font-weight: 800; color: var(--accent-color); }
.footer-section h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; color: var(--accent-color); }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 12px; }
.footer-section a { color: #ccc; text-decoration: none; transition: color .3s ease; }
.footer-section a:hover { color: var(--accent-color); }
.footer-contact p { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: #ccc; }
.footer-contact p a { display: inline-flex; align-items: center; gap: 12px; }
.footer-contact i { color: var(--accent-color); width: 20px; }
.footer-contact a:hover { color: var(--accent-color); }
.footer-bottom { border-top: 1px solid #2a3f34; padding-top: 20px; text-align: center; color: #ccc; }

/* Service detail sub-pages (metales / carton / plasticos) */
.service-detail-hero { padding-top: 120px; padding-bottom: 60px; background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%); text-align: center; }
.service-detail-title { font-size: 3rem; font-weight: 800; color: var(--heading-color); margin-bottom: 16px; }
.service-detail-subtitle { font-size: 1.25rem; color: #666; max-width: 800px; margin: 0 auto; }
.service-content-section { padding: 80px 0; background: var(--white-color); }
.service-text-block { max-width: 800px; margin: 0 auto 40px; }
.service-text-block h2 { font-size: 2rem; font-weight: 600; color: var(--heading-color); margin-bottom: 20px; }
.service-text-block p, .service-text-block li { font-size: 1.1rem; line-height: 1.8; color: #555; }
.service-text-block ul, .service-text-block ol { margin-top: 20px; padding-left: 40px; }
.service-image-block { text-align: center; margin-bottom: 40px; }
.service-image-block img { max-width: 100%; height: auto; border-radius: 20px; box-shadow: 0 10px 30px rgba(22, 101, 52, .15); }
.service-page-body { padding-top: 80px; }
.metales-page .highlight { color: #0891b2; }
.metales-page .highlight::after { background: linear-gradient(90deg, #0891b2, var(--accent-color)); }
.carton-page .highlight { color: #b45309; }
.carton-page .highlight::after { background: linear-gradient(90deg, #b45309, var(--accent-color)); }
.plasticos-page .highlight { color: #0284c7; }
.plasticos-page .highlight::after { background: linear-gradient(90deg, #0284c7, var(--accent-color)); }

/* Related services / CTA band on service subpages */
.related-services { padding: 100px 0; background: var(--white-color); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 600px; margin: 0 auto 40px; }
.related-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 20px; background: var(--background-light); border-radius: 15px; text-decoration: none; color: var(--heading-color); font-weight: 600; transition: transform .3s ease, box-shadow .3s ease; border: 1px solid var(--border-color); }
.related-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(22, 101, 52, .15); }
.related-card i { font-size: 2rem; color: var(--primary-color); }
.related-cta { text-align: center; }
.related-cta p { font-size: 1.1rem; color: #666; margin-bottom: 20px; }

/* Skip link (accessibility) */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary-color); color: #fff; padding: 12px 20px; z-index: 2000; border-radius: 0 0 8px 0; text-decoration: none; font-weight: 600; }
.skip-link:focus { left: 0; }

/* Visible keyboard focus indicator (WCAG 2.4.7) */
.nav-link:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible, #scrollToTopBtn:focus-visible, .related-card:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }

/* Floating scroll-to-top button */
#scrollToTopBtn { display: none; position: fixed; bottom: 32px; right: 32px; z-index: 1000; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: #fff; border: none; border-radius: 50%; width: 48px; height: 48px; font-size: 1.5rem; box-shadow: 0 4px 15px rgba(22, 163, 74, .4); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
#scrollToTopBtn:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(22, 163, 74, .5); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ringPulse {
    0% { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background: rgba(255, 255, 255, .98); backdrop-filter: blur(10px); flex-direction: column; justify-content: flex-start; align-items: center; padding-top: 50px; transition: left .3s ease; display: none; }
    .nav-menu.active { left: 0; display: flex; }
    .nav-toggle { display: flex; }
    .hero-container { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-stats { grid-template-columns: 1fr; gap: 20px; }
    .about-grid, .services-grid, .location-content, .contact-content, .footer-content { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
    .container { padding: 0 16px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .btn { padding: 14px 28px; font-size: .9rem; }
    .about-card, .service-content, .contact-form { padding: 24px; }
}
