/* ==========================================================================
   Envases Morelli - Senior Design System (Rich Minimalist)
   ========================================================================== */

:root {
  --primary: #2B338F; /* Logo Deep Blue */
  --primary-hover: #1e2465;
  --secondary: #3B82F6; /* Lighter blue for accents */
  --bg-main: #FFFFFF;
  --bg-alt: #F3F4F6; /* Gray for section separation */
  --text-main: #111827;
  --text-muted: #4B5563;
  --border: #E5E7EB;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --font-family: 'Inter', system-ui, sans-serif;
  --max-width: 1200px;
  --section-padding: 6rem 0;
  --transition: 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-family); color: var(--text-main); background-color: var(--bg-main); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: var(--text-main); }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.8; }
.text-primary { color: var(--primary); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.section { padding: var(--section-padding); }
.section-alt { background-color: var(--bg-alt); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

/* --- Animations --- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* --- Topbar --- */
.topbar { background-color: var(--primary); color: white; padding: 0.5rem 0; font-size: 0.85rem; z-index: 102; position: relative; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: white; margin-left: 1.5rem; }
.topbar a:hover { color: #93C5FD; }

/* --- Header --- */
.header { position: sticky; top: 0; width: 100%; z-index: 100; padding: 1rem 0; transition: var(--transition); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; justify-content: space-between; align-items: center; }
.nav-logo img { height: 45px; width: auto; }
.nav-links { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-link { font-weight: 600; font-size: 0.95rem; color: var(--text-main); position: relative; padding: 0.5rem 0; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--primary); transition: width 0.3s ease; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.lang-switch { font-weight: 700; font-size: 0.85rem; color: var(--primary); border: 2px solid var(--primary); padding: 0.3rem 0.8rem; border-radius: 6px; }
.lang-switch:hover { background-color: var(--primary); color: white; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; z-index: 101; }
.menu-toggle span { display: block; width: 24px; height: 2px; background-color: var(--primary); margin-bottom: 5px; transition: var(--transition); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2rem; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background-color: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-outline { background-color: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: white; }
.btn-icon { margin-left: 8px; transition: transform 0.3s ease; }
.btn:hover .btn-icon { transform: translateX(5px); }

/* --- Rich Hero --- */
.hero { min-height: 80vh; display: flex; align-items: center; background: linear-gradient(rgba(27, 32, 89, 0.9), rgba(17, 24, 39, 0.85)), url('../img/history.jpg') center/cover; padding: 6rem 0; color: white; text-align: center; }
.hero h1 { color: white; }
.hero p { color: #E5E7EB; }

/* --- Feature Cards (Why Us) --- */
.feature-card { background: white; padding: 2.5rem; border-radius: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--border); text-align: center; transition: var(--transition); }
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--secondary); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: rgba(59, 130, 246, 0.1); color: var(--secondary); border-radius: 50%; margin-bottom: 1.5rem; }

/* --- Products & Services Grid --- */
.products-grid, .values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; }
.product-card { background: var(--bg-main); border: 1px solid var(--border); padding: 2.5rem; border-radius: 12px; box-shadow: var(--shadow-md); transition: var(--transition); }
.product-card:hover { border-color: var(--primary); transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-icon { margin-bottom: 1.5rem; height: 64px; }
.product-link { display: inline-flex; align-items: center; color: var(--primary); font-weight: 600; margin-top: 1rem; }

/* Services Layout */
.service-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 6rem; background: white; padding: 3rem; border-radius: 16px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.service-feature:nth-child(even) .service-image { order: 2; }
.service-image { background: var(--bg-alt); border-radius: 8px; min-height: 350px; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* --- CTA Strip --- */
.cta-strip { background: var(--primary); color: white; text-align: center; padding: 3rem 2rem; border-radius: 16px; margin: 4rem auto; max-width: var(--max-width); box-shadow: var(--shadow-lg); }
.cta-strip h2 { color: white; font-size: 2.25rem; margin-bottom: 0.75rem; }
.cta-strip .btn-outline { border-color: white; color: white; }
.cta-strip .btn-outline:hover { background: white; color: var(--primary); }

/* --- Contact & About --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; background: white; padding: 4rem; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.form-input { width: 100%; background: var(--bg-alt); border: 1px solid var(--border); padding: 1rem; border-radius: 8px; font-size: 1rem; color: var(--text-main); font-family: var(--font-family); transition: var(--transition); margin-bottom: 1.5rem; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 51, 143, 0.1); }
.about-hero-img { width: 100%; height: 50vh; object-fit: cover; object-position: center 25%; border-radius: 16px; margin-bottom: 4rem; box-shadow: var(--shadow-md); }

/* --- Footer --- */
.footer { background: #111827; color: #9CA3AF; padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.footer h4 { color: white; margin-bottom: 1rem !important; }
.footer img { height: 40px !important; margin-bottom: 1rem !important; }
.footer ul li { margin-bottom: 0.4rem !important; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.footer a { color: #9CA3AF; transition: color 0.3s; }
.footer a:hover { color: white; }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #374151; display: flex; justify-content: space-between; font-size: 0.85rem; }

/* WhatsApp Float */
.wa-float { position: fixed; bottom: 2rem; right: 2rem; background-color: #25D366; color: white; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 99; transition: var(--transition); }
.wa-float:hover { transform: scale(1.1); }

/* --- Categories --- */
.category-title { font-size: 2rem; color: var(--text-main); margin: 5rem 0 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }

/* --- Responsive --- */
@media (max-width: 992px) {
  .grid-2, .grid-3, .contact-grid, .footer-grid, .service-feature { grid-template-columns: 1fr; gap: 3rem; }
  .service-feature { padding: 2rem; }
  .service-feature:nth-child(even) .service-image { order: -1; }
  .service-feature .service-image { order: -1; }
  .topbar-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 768px) {
  :root { --section-padding: 4rem 0; }
  .menu-toggle { display: block; }
  .nav-links { position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px); background: white; flex-direction: column; padding: 2rem; gap: 1.5rem; border-bottom: 1px solid var(--border); transform: translateY(-100%); opacity: 0; visibility: hidden; transition: var(--transition); }
  .nav-links.active { transform: translateY(0); opacity: 1; visibility: visible; }
  .contact-grid { padding: 2rem; }
}
