/* Global Styles */
:root {
    --color-primary: #0D47A1; /* Industrial Blue */
    --color-secondary: #607D8B; /* Metallic Gray */
    --color-accent: #FF5722; /* Safety Orange/Red */
    --color-background: #f4f6f8; /* Light Gray Background */
    --color-background-light: #ffffff;
    --color-text: #333333;
    --color-text-light: #555555; /* Slightly darker for better readability */
    --color-border: #e0e0e0;
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    --container-width: 1200px;
    --header-height: 70px;
    --transition-speed: 0.3s; /* Added for consistent transitions */
}

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

html {
    scroll-behavior: smooth; /* Smooth scroll for anchor links */
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    opacity: 1; /* Ensure body is visible initially */
    transition: opacity var(--transition-speed) ease-in-out; /* Smooth fade-in */
}

/* Add simple pre-load fade */
body.loading {
    opacity: 0;
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; margin-top: 2rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; color: var(--color-secondary); margin-bottom: 0.75rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
    text-align: justify; /* Justify paragraph text */
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

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

img, svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle; /* Fix potential alignment issues */
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header & Navigation */
header {
    background-color: var(--color-background-light);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: top var(--transition-speed) ease; /* Smooth show/hide */
}

/* Optional: Hide header on scroll down */
/*
body.scroll-down header {
    top: calc(-1 * var(--header-height));
}
*/

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    height: var(--header-height); /* Fixed height */
}

nav .logo svg {
    display: block; /* Prevents extra space below SVG */
    transition: transform var(--transition-speed) ease;
}
nav .logo a:hover svg {
    transform: scale(1.05); /* Subtle scale on logo hover */
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a.nav-link { /* Specificity */
    font-weight: 700;
    padding: 0.5rem 0;
    position: relative;
    color: var(--color-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color var(--transition-speed) ease; /* Smooth color change */
}

nav ul li a.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Thicker underline */
    bottom: -5px; /* Space below text */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    transition: width var(--transition-speed) ease;
}

nav ul li a.nav-link:hover::after,
nav ul li a.nav-link.active::after { /* Style for active link */
    width: 100%;
}
nav ul li a.nav-link:hover,
nav ul li a.nav-link.active {
    color: var(--color-primary); /* Active link color */
}

nav ul li a.cta-nav {
    background-color: var(--color-accent);
    color: white;
    padding: 0.6rem 1.2rem; /* Slightly larger padding */
    border-radius: 5px;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; /* Combined transitions */
    font-size: 0.9rem;
}

nav ul li a.cta-nav:hover {
    background-color: #e64a19; /* Darker accent */
    color: white;
    transform: translateY(-2px) scale(1.03); /* Lift and slight scale */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Enhanced shadow */
}
nav ul li a.cta-nav::after {
    display: none; /* No underline for button-style nav item */
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1010; /* Above nav */
    transition: transform var(--transition-speed) ease;
}
#mobile-menu-toggle:hover {
    transform: scale(1.1);
}
#mobile-menu-toggle svg {
    transition: fill var(--transition-speed) ease;
}
#mobile-menu-toggle:hover svg {
    fill: var(--color-accent);
}

/* Main Content & Sections */
main {
    flex-grow: 1;
    padding: 2rem 0; /* Remove horizontal padding, handled by container */
    width: 100%;
}

section {
    padding: 3rem 1rem; /* Padding for content within sections */
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-background-light); /* Default white background */
    margin-bottom: 2rem; /* Space between sections */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden; /* Important for ScrollReveal origins */
}
section:nth-child(odd) {
     background-color: var(--color-background); /* Alternate background */
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

/* ScrollReveal elements are initially hidden */
[data-sr-id] {
visibility: hidden;
}

/* Style for specific sections added to index.html */
#servicios-destacados, #productos-destacados, #home-about, #home-noticias, #calidad-certificada, #clientes-industrias {
    background-color: var(--color-background-light);
    padding-top: 3rem;
    padding-bottom: 3rem;
    margin-bottom: 2rem; /* Keep spacing */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
#servicios-destacados:nth-child(odd), /* Override alternating background for these */
#productos-destacados:nth-child(odd),
#home-about:nth-child(odd),
#home-noticias:nth-child(odd),
#calidad-certificada:nth-child(odd),
#clientes-industrias:nth-child(odd) {
    background-color: var(--color-background-light);
}
#servicios-destacados:nth-child(even),
#productos-destacados:nth-child(even),
#home-about:nth-child(even),
#home-noticias:nth-child(even),
#calidad-certificada:nth-child(even),
#clientes-industrias:nth-child(even) {
     background-color: var(--color-background); /* Ensure alternate applies if order changes */
}

#home-about {
    text-align: center;
}
#home-about h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}
#home-about p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.home-about-image-container {
    max-width: 800px; /* Adjust as needed */
    margin: 0 auto 1.5rem auto; /* Center image and add space below */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.home-about-image-container:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.home-about-image {
    width: 100%;
    display: block;
    height: auto; /* Maintain aspect ratio */
}
.home-about-image2-container {
    max-width: 500px; /* Adjust as needed */
    margin: 0 auto 1.5rem auto; /* Center image and add space below */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.home-about-image2-container:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.home-about-image2 {
    width: 1000;
    display: block;
    height: auto; /* Maintain aspect ratio */
}

/* Hero Banner (Home Section) */
#inicio {
    padding: 0; /* Remove section padding */
    border-bottom: none;
    background: none; /* No extra background needed */  
    box-shadow: none;
    margin-bottom: 2rem;
}

.hero-banner {
    position: relative;
    color: white;
    text-align: center;
    min-height: 800px; /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensure placeholder SVG fits */
    border-radius: 8px;
    background-color: var(--color-secondary-light); /* Fallback color */
}

.banner-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.banner-placeholder svg {
     width: 100%;
     height: 100%;
     object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(13, 71, 161, 0.75); /* Slightly more opaque overlay */
    padding: 2.5rem; /* More padding */
    border-radius: 8px;
    max-width: 700px; /* Control width */
    margin: 1rem; /* Ensure spacing on small screens */
}
.hero-content h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2.8rem; /* Larger hero title */
}
.hero-content p { /* Optional: Add a subtitle */
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons a {
    margin: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem; /* Generous padding */
    border: none;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; /* Consolidated transitions */
    text-align: center;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}
.btn-primary:hover {
    background-color: #e64a19; /* Darker accent */
    color: white;
    transform: translateY(-3px) scale(1.05); /* More noticeable lift and scale */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Stronger shadow */
}

.btn-secondary {
    background-color: var(--color-background-light);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.btn-small:hover {
    transform: translateY(-2px) scale(1.03); /* Slightly less effect for small buttons */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 2rem;
    margin-top: 2rem;
}

/* Service Card - Already defined, keeping for service section at bottom */
.service-card {
    background-color: var(--color-background-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column; /* Align content vertically */
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02); /* Increased lift and slight scale */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Enhanced shadow */
}

.service-card .icon {
    margin-bottom: 1rem;
    color: var(--color-primary);
    transition: transform var(--transition-speed) ease;
}
.service-card:hover .icon {
    transform: scale(1.1); /* Scale icon on card hover */
}
.service-card .icon svg {
    width: 50px;
    height: 50px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}
.service-card p {
    flex-grow: 1; /* Push tags/link down */
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem; /* Ensure space before button */
}
.service-card .btn { /* Style button in service card */
    margin-top: auto; /* Push button to bottom */
}

#productos-catalogo .container > p { /* Style intro paragraph */
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem auto; /* Center and add space below */
    font-size: 1.1rem;
    color: var(--color-text-light);
}

/* Product Grid - Same as service grid but with different name for clarity */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Slightly smaller minmax */
    gap: 1.5rem; /* Slightly reduced gap */
    margin-top: 2rem;
}

/* Product Card Styles */
.product-card {
    background-color: var(--color-background-light);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden; /* Contain image placeholder */
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02); /* Increased lift and slight scale */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Enhanced shadow */
}

.product-image-placeholder {
    width: 275px; /* o el tamaño que prefieras */
    height: 300px; /* o el tamaño que prefieras */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    background: #f5f5f5; /* fondo opcional */
}

.product-image-placeholder img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-image-placeholder svg,
.product-image-placeholder img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.product-card h3 {
    font-size: 1.2rem; /* Slightly smaller than service card h3 */
    color: var(--color-primary);
    margin: 1rem 1rem 0.5rem 1rem; /* Padding around title */
}

.product-card .product-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0 1rem 1rem 1rem; /* Padding for description */
    flex-grow: 1; /* Allow description to take space */
    line-height: 1.5;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem 1rem 1rem; /* Padding around price and button */
    border-top: 1px solid var(--color-border); /* Separator line */
    margin-top: auto; /* Push to bottom */
    background-color: #fafafa; /* Slightly different background for footer */
}

.product-details .price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-accent);
}
.product-details .price:contains("Consultar") { /* Style 'Consultar Precio' differently if needed */
    font-size: 0.95rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.product-details .btn {
    margin-left: 0.5rem; /* Space between price and button */
}

/* About Section */
.about-content { 
    display: flex;
    flex-wrap: wrap; 
    gap: 2rem;
    align-items: flex-start; 
}

.about-text { 
    flex: 1; 
    min-width: 300px; 
}
.about-text h3 {
    margin-top: 1.5rem;
}
.about-text h3:first-of-type {
    margin-top: 0;
}
.about-text p strong {
    color: var(--color-secondary);
    font-weight: 700;
}

.about-image-placeholder { 
    flex-basis: 350px; 
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden; 
    transition: transform var(--transition-speed) ease;
}
.about-image-placeholder:hover {
     transform: scale(1.03); /* Subtle scale on hover */
}
.about-image-placeholder svg {
    display: block;
    width: 100%;
    height: auto;
}

/* About Section */
.about-content { 
    display: flex;
    flex-wrap: wrap; 
    gap: 2rem;
    align-items: flex-start; 
}

.about-text { 
    flex: 1; 
    min-width: 300px; 
}
.about-text h3 {
     margin-top: 1.5rem;
}
.about-text h3:first-of-type {
     margin-top: 0;
}
.about-text p strong {
    color: var(--color-secondary);
    font-weight: 700;
}

.about-image-placeholder { 
    flex-basis: 350px; 
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden; 
    transition: transform var(--transition-speed) ease;
}
.about-image-placeholder:hover {
     transform: scale(1.03); /* Subtle scale on hover */
}
.about-image-placeholder svg {
    display: block;
    width: 100%;
    height: auto;
}

/* USA Section specific styles */
.usa-content { 
    display: flex;
    flex-wrap: wrap; 
    gap: 2rem;
    align-items: flex-start; 
}

.usa-text { 
    flex: 1; 
    min-width: 300px; 
}

.usa-image-placeholder { 
    flex-basis: 350px; 
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden; 
    transition: transform var(--transition-speed) ease;
}
.usa-image-placeholder:hover {
     transform: scale(1.03); /* Subtle scale on hover */
}

/* Added: Alternating Content Blocks */
.alternating-block-container {
    display: flex;
    flex-direction: column;
    gap: 3rem; 
}

.alternating-block {
    display: flex;
    gap: 2rem;
    align-items: center; 
    padding: 2rem;
    background-color: var(--color-background-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.alternating-block:nth-child(even) {
    flex-direction: row-reverse; 
    background-color: var(--color-background); 
}

.alternating-text-content {
    flex: 1; 
    min-width: 300px; 
}
.alternating-text-content h3 {
    margin-top: 0; 
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.alternating-text-content p {
    margin-bottom: 1rem;
    text-align: justify;
    color: var(--color-text-light);
}
.alternating-text-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    text-align: left; 
}
.alternating-text-content ul li {
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.alternating-image-content {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px; 
}
.alternating-image-content-nat {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 150px; 
}
.alternating-image-content img,
.alternating-image-content .map-placeholder {
    max-width: 100%;
    height: auto;
    max-height: 600px; 
    border-radius: 8px;
    object-fit: cover; 
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; /* Add transition */
}
.alternating-image-content:hover img,
.alternating-image-content:hover .map-placeholder {
    transform: scale(1.03); /* Scale image/map on hover */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.alternating-image-content .map-placeholder { 
    width: 100%; 
    height: 300px; 
    overflow: hidden;
}
.alternating-image-content .map-placeholder iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.alternating-image-content2 {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px; 
}
.alternating-image-content2 img,
.alternating-image-content2 .map-placeholder {
    max-width: 100%;
    height: auto;
    max-height: 900px; 
    border-radius: 8px;
    object-fit: cover; 
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; /* Add transition */
}
.alternating-image-content2:hover img,
.alternating-image-content2:hover .map-placeholder {
    transform: scale(1.03); /* Scale image/map on hover */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.alternating-image-content2 .map-placeholder { 
    width: 100%; 
    height: 300px; 
    overflow: hidden;
}
.alternating-image-content2 .map-placeholder iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Alternating Blocks */
@media (max-width: 992px) { 
    .alternating-block {
        flex-direction: column !important; 
        align-items: stretch; 
        padding: 1.5rem;
    }
    .alternating-block:nth-child(even) {
         background-color: var(--color-background-light); 
    }
    .alternating-text-content,
    .alternating-image-content {
        flex: none; 
        width: 100%; 
        min-width: unset;
    }
    .alternating-image-content {
        margin-top: 1.5rem; 
    }
    .alternating-block:nth-child(even) .alternating-image-content {
        margin-top: 0; 
        margin-bottom: 1.5rem; 
    }
    .alternating-block:nth-child(even) .alternating-text-content {
        order: 1; 
    }
     .alternating-block:nth-child(even) .alternating-image-content {
        order: 0;
    }

}

@media (max-width: 768px) {
    .alternating-block {
        padding: 1rem;
    }
    .alternating-image-content img,
    .alternating-image-content .map-placeholder {
        max-height: 300px;
    }
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 2rem auto 0 auto; 
}

.faq-item {
    background-color: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    margin-bottom: 1rem;
    transition: box-shadow var(--transition-speed) ease;
}
.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.faq-item[open] { /* Style when open */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--color-primary); /* Highlight border when open */
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none; 
    position: relative;
    color: var(--color-primary);
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    transition: background-color var(--transition-speed) ease;
}
.faq-item summary:hover {
    background-color: #f8f8f8; /* Slight bg change on hover */
}

.faq-item summary::-webkit-details-marker { display: none; } 
.faq-item summary::marker { display: none; } 

.faq-item summary::after { 
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: transform var(--transition-speed) ease;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
    padding: 0 1.5rem 1rem 1.5rem; 
    margin-bottom: 0; 
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem; 
    font-size: 0.95rem;
    /* Animate the answer reveal */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out, opacity 0.4s ease-in;
}
.faq-item[open] p {
    max-height: 400px; /* Adjust if needed for longer answers */
    opacity: 1;
    padding-top: 1rem; /* Add padding back */
    padding-bottom: 1rem;
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}
.contact-info h3 { margin-bottom: 1.5rem; }

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.contact-icon {
    color: var(--color-primary);
    margin-right: 0.8rem;
    flex-shrink: 0; /* Prevent icon shrinking */
    width: 20px; /* Ensure consistent icon size */
    height: 20px;
}

.map-placeholder {
    margin-top: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    overflow: hidden; /* Ensure iframe fits */
}
.map-placeholder iframe {
    display: block; /* Remove extra space below iframe */
}
.map-placeholder p { /* Style for text placeholder if needed */
    padding: 4rem 1rem;
    text-align: center;
    color: var(--color-text-light);
    background-color: #eee;
}


.contact-form-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--color-background-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.contact-form-container h3 { margin-bottom: 1.5rem; }

/* Form Styles (Shared) */
form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    font-size: 0.9rem;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="number"],
form input[type="file"],
form select,
form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: #fff; /* Ensure white background */
}
form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.2);
}


form textarea {
    resize: vertical;
    min-height: 100px;
}

form button[type="submit"] {
    margin-top: 1rem;
    width: 100%; /* Full width submit button */
}

form small {
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

form hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

form input[type="file"]::file-selector-button {
    padding: 0.6rem 1rem;
    margin-right: 1rem;
    border: none;
    background-color: var(--color-secondary);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
form input[type="file"]::file-selector-button:hover {
    background-color: var(--color-primary);
}

/* Form Response Messages */
.form-response {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    display: none; /* Hidden by default */
}
.form-response.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
    display: block; /* Show on success */
}
.form-response.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
    display: block; /* Show on error */
}


/* Footer */
footer {
    background-color: var(--color-secondary);
    color: #e0e0e0; /* Lighter text on dark background */
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 2rem; /* Space above footer */
    font-size: 0.9rem;
}
footer p {
    margin-bottom: 0.5rem;
    color: #e0e0e0; /* Ensure footer text color */
}
footer p:last-child {
    margin-bottom: 0;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffffff; /* WhatsApp Green */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: white; /* Keep color on hover */
}
.whatsapp-float svg {
    width: 30px;
    height: 30px;
}

/* Business Hours & Clock */
.business-hours {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--color-background);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}
.business-hours h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.business-hours ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}
.business-hours ul li {
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.business-hours ul li strong {
    color: var(--color-secondary);
}

.clock-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 5px;
    margin-top: 1rem;
}
.clock-container p {
    margin-bottom: 0;
    font-weight: 500;
    color: white; /* Ensure text is white */
}
#real-time-clock {
    font-family: var(--font-secondary);
    font-size: 1.5rem; /* Larger clock font */
    font-weight: 700;
    letter-spacing: 1px;
}

/* Stock Management Page Styles */
.medium-width-container {
    max-width: var(--container-width-large); /* UPDATED */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem; /* Add some padding for safety if content is flush */
    padding-right: 1rem; /* Add some padding for safety if content is flush */
}

#stock-management-section h2,
#consulta-stock-section h2 { /* Shared title style */
    margin-bottom: 1.5rem;
}

.stock-controls { /* For admin page */
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--color-background);
    border-radius: 6px;
}
.stock-controls label {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0; 
}
.stock-controls select {
    padding: 0.6rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    min-width: 200px;
    margin-bottom: 0;
}

/* Stock Consultation Page Styles */
.stock-search-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--color-background);
    border-radius: 6px;
    display: flex;
    flex-direction: column; /* Stack label and input */
    gap: 0.5rem;
}
.stock-search-controls label {
    font-weight: 700;
    color: var(--color-secondary);
    font-size: 0.9rem;
}
#stock-search-input {
    width: 100%; /* Full width */
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}
#stock-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.2);
}

/* New filter controls for stock.html */
.stock-filter-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--color-background);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.stock-filter-controls label {
    font-weight: 700;
    color: var(--color-secondary);
    font-size: 0.9rem;
}
#stock-class-filter {
    width: 100%;
    max-width: 400px; /* Limit width of dropdown */
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-primary);
    background-color: #fff;
}
#stock-class-filter:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.2);
}

/* Stock Table */
.stock-table-container {
    overflow-x: auto; 
    background-color: var(--color-background-light);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#stock-table,
#stock-results-table { /* Shared table styles */
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

#stock-table th, #stock-table td,
#stock-results-table th, #stock-results-table td {
    border: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: middle;
    word-break: break-word; /* Allow long descriptions to wrap */
}

#stock-table th,
#stock-results-table th {
    background-color: var(--color-primary-light, #e3f2fd); 
    color: var(--color-primary);
    font-weight: 700;
    font-family: var(--font-secondary);
    white-space: nowrap; /* Prevent header text wrapping */
}

#stock-table tbody tr:nth-child(even),
#stock-results-table tbody tr:nth-child(even) {
    background-color: var(--color-background);
}
#stock-table tbody tr:hover,
#stock-results-table tbody tr:hover {
    background-color: #e8f0fe; 
}

#stock-results-table td .btn-cotizar-item { /* Style for cotizar button in public stock table */
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Specific to admin editable table */
#stock-table td input[type="text"],
#stock-table td input[type="number"],
#stock-table td select,
#stock-table td textarea { /* ADDED textarea */
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-size: 0.9rem;
    box-sizing: border-box; 
    font-family: var(--font-primary); /* Ensure consistent font */
}
#stock-table td textarea.edit-descripcion { /* Style for the description textarea */
    min-height: 60px; /* Default height, can be overridden by rows attribute */
    resize: vertical;
}

#stock-table td input:focus, 
#stock-table td select:focus,
#stock-table td textarea:focus { /* ADDED textarea:focus */
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent);
}

#stock-table .actions-cell {
    white-space: nowrap; 
}

#stock-table .btn-edit,
#stock-table .btn-delete,
#stock-table .btn-save,
#stock-table .btn-cancel {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}
#stock-table .btn-edit {
    background-color: var(--color-secondary);
    color: white;
}
#stock-table .btn-edit:hover {
    background-color: #455A64; 
}

#stock-table .btn-delete {
    background-color: var(--color-accent);
    color: white;
}
#stock-table .btn-delete:hover {
    background-color: #D32F2F; 
}
#stock-table .btn-save {
    background-color: #4CAF50; 
    color: white;
}
#stock-table .btn-save:hover {
    background-color: #388E3C; 
}
#stock-table .btn-cancel {
    background-color: #f0f0f0;
    color: var(--color-text);
    border-color: var(--color-border);
}
#stock-table .btn-cancel:hover {
    background-color: #e0e0e0;
}

.no-results-message, .initial-load-message {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-light);
    font-style: italic;
}

.stock-actions {
    margin-bottom: 1rem;
    text-align: left;
}


#add-reference-button { /* For admin page */
    padding: 0.7rem 1.5rem;
}

/* Admin Stock Table Column Widths */
#stock-table th:nth-child(1), /* Clase */
#stock-table td:nth-child(1) {
    width: 20%; 
}
#stock-table th:nth-child(2), /* Descripción */
#stock-table td:nth-child(2) {
    width: 45%; /* UPDATED from 40% */
    min-width: 250px; /* Increased min-width */
}
#stock-table th:nth-child(3), /* Cantidad */
#stock-table td:nth-child(3) {
    width: 10%;
    text-align: right; 
}
#stock-table td input[type="number"].edit-cantidad { /* Ensure number input is right aligned */
    text-align: right;
}
#stock-table th:nth-child(4), /* Unidad */
#stock-table td:nth-child(4) {
    width: 10%;
}
#stock-table th:nth-child(5), /* Acciones */
#stock-table td:nth-child(5) { 
    width: 15%; /* UPDATED from 20% */
    text-align: center;
}

/* Public Stock Table Column Widths */
#stock-results-table th:nth-child(1), /* Clase */
#stock-results-table td:nth-child(1) {
    width: 20%; /* UPDATED from 25% */
}
#stock-results-table th:nth-child(2), /* Descripción */
#stock-results-table td:nth-child(2) {
    width: 50%; /* UPDATED from 40% */
    min-width: 300px; /* Increased min-width */
}
#stock-results-table th:nth-child(3), /* Cantidad Disponible */
#stock-results-table td:nth-child(3) {
    width: 10%; 
    text-align: right; 
}
#stock-results-table th:nth-child(4), /* Unidad */
#stock-results-table td:nth-child(4) {
    width: 10%; 
}
#stock-results-table th:nth-child(5), /* Cotizar */
#stock-results-table td:nth-child(5) {
    width: 10%; /* UPDATED from 15% */
    text-align: center;
}


/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.2rem; }
    .hero-content h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .about-content {
        flex-direction: column; 
    }
    .about-image-placeholder {
        flex-basis: auto; 
        max-width: 400px; 
        margin: 0 auto; 
    }

    .contact-container {
        flex-direction: column; 
    }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    nav { height: var(--header-height); }

    nav ul {
        display: none; 
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-background-light);
        flex-direction: column;
        align-items: stretch; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--color-border);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    nav ul.show-mobile {
        display: flex; 
    }

    nav ul li {
        margin-left: 0;
        text-align: center;
        border-bottom: 1px solid var(--color-border);
    }
     nav ul li:last-child {
        border-bottom: none;
     }

    nav ul li a.nav-link {
        padding: 1rem;
        display: block; 
        width: 100%;
        color: var(--color-text); 
    }
    nav ul li a.nav-link::after {
        display: none; 
    }
    nav ul li a.nav-link:hover,
    nav ul li a.nav-link.active {
        background-color: var(--color-primary);
        color: white; 
    }

    nav ul li a.cta-nav {
        margin: 1rem; 
        display: block; 
        text-align: center;
    }
    nav ul li a.cta-nav:hover {
        transform: none; 
        box-shadow: none;
    }

    #mobile-menu-toggle {
        display: block; 
    }

    .hero-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }

    .service-grid {
        grid-template-columns: 1fr; 
    }

    main { padding: 1rem 0; } 
    section { padding: 2rem 1rem; } 

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    .whatsapp-float svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .cta-buttons a {
    width: 100%; 
        margin: 0;
    }

    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

    .faq-item summary { padding: 0.8rem 1rem; font-size: 1rem;}
    .faq-item summary::after { right: 1rem; }
    .faq-item p { padding: 0 1rem 0.8rem 1rem; font-size: 0.9rem;}

    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form input[type="number"],
    form select,
    form textarea {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    .contact-form-container { padding: 1.5rem; }
}


@media (max-width: 768px) {
    :root { --header-height: 60px; }
    nav { height: var(--header-height); }

    nav ul {
        display: none; /* Hide desktop nav */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-background-light);
        flex-direction: column;
        align-items: stretch; /* Full width links */
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--color-border);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    nav ul.show-mobile {
        display: flex; /* Show mobile nav */
    }


    nav ul li {
        margin-left: 0;
        text-align: center;
        border-bottom: 1px solid var(--color-border);
    }
     nav ul li:last-child {
        border-bottom: none;
     }

    nav ul li a.nav-link {
        padding: 1rem;
        display: block; /* Make link take full width */
        width: 100%;
        color: var(--color-text); /* Standard text color for mobile */
    }
    nav ul li a.nav-link::after {
        display: none; /* No underline needed for mobile */
    }
    nav ul li a.nav-link:hover,
    nav ul li a.nav-link.active {
        background-color: var(--color-primary);
        color: white; /* Highlight active/hover */
    }

    nav ul li a.cta-nav {
        margin: 1rem; /* Add margin around CTA in mobile */
        display: block; /* Ensure it behaves like block */
        text-align: center;
    }
    nav ul li a.cta-nav:hover {
        transform: none; /* Disable hover transform */
        box-shadow: none;
    }


    #mobile-menu-toggle {
        display: block; /* Show hamburger icon */
    }

    .hero-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }


    .service-grid {
        grid-template-columns: 1fr; /* Stack service cards */
    }

    main { padding: 1rem 0; } /* Reduce main padding */
    section { padding: 2rem 1rem; } /* Reduce section padding */

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
     .whatsapp-float svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
     .cta-buttons a {
         width: 100%; /* Full width buttons */
         margin: 0;
     }

    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

    .faq-item summary { padding: 0.8rem 1rem; font-size: 1rem;}
    .faq-item summary::after { right: 1rem; }
    .faq-item p { padding: 0 1rem 0.8rem 1rem; font-size: 0.9rem;}

    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form input[type="number"],
    form select,
    form textarea {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    .contact-form-container { padding: 1.5rem; }
}

/* Added: Quality/Certifications Section Styles */

#calidad-certificada {
    text-align: center;
}
#calidad-certificada h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}
#calidad-certificada p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#calidad-certificada .cert-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.cert-logo-placeholder {
    width: 100px;
    height: 80px; /* Adjusted height */
    background-color: var(--color-background-light); /* Lighter background */
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 0.8rem;
    border: 1px solid var(--color-border); /* Use theme border color */
    text-align: center;
    padding: 0.5rem;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.cert-logo-placeholder:hover {
    transform: scale(1.05); /* Scale on hover */
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.cert-logo-placeholder svg {
    width: 30px;
    height: 30px;
    fill: var(--color-secondary);
    margin-bottom: 0.3rem;
}

/* Added: Clients/Industries Section Styles */

#clientes-industrias {
    text-align: center;
}
#clientes-industrias h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}
#clientes-industrias p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#clientes-industrias .client-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    filter: grayscale(80%) opacity(0.8); /* Slightly less intense grayscale */
    transition: filter var(--transition-speed) ease;
}
#clientes-industrias:hover .client-logos {
    filter: grayscale(0%) opacity(1); /* Reveal color on section hover */
}
.client-logo-placeholder {
    width: 120px;
    height: 60px;
    background-color: var(--color-background-light); /* Lighter background */
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 0.8rem;
    border: 1px solid var(--color-border); /* Use theme border color */
    padding: 0.5rem;
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.client-logo-placeholder:hover { /* Add individual hover too */
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    filter: grayscale(0%) opacity(1); /* Ensure individual hover also removes filter */
}

/* Added: News List Styles */
/* Texto de introducción (centrado y justificado) */
#noticias .container > p, 
#home-noticias .container > p {
    text-align: justify;       /* Texto alineado a ambos lados */
    text-align-last: center;   /* Última línea centrada */
    max-width: 700px;          /* Ancho máximo para mejor lectura */
    margin-left: auto;         /* Centra el contenedor */
    margin-right: auto;        /* Centra el contenedor */
    margin-bottom: 1.5rem;     /* Espaciado inferior */
    line-height: 1.6;          /* Interlineado para mejor legibilidad */
    hyphens: auto;             /* División silábica automática (opcional) */
}

/* Contenedor de noticias */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

/* Items de noticias con estilo alternating */
.news-item {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background-color: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    margin-bottom: 0; /* Eliminamos el margin-bottom original */
}

/* Efecto hover mejorado */
.news-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Contenedor de texto */
.news-text-content {
    flex: 1;
    min-width: 300px;
}

/* Título de noticia con estilo alternating */
.news-item h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--color-primary);
    text-align: left; /* Cambiado de centrado a izquierda */
}

/* Enlace del título */
.news-item h3 a {
    color: var(--color-primary);
    transition: color var(--transition-speed) ease;
}
.news-item h3 a:hover {
    color: var(--color-accent);
}

/* Fecha de noticia */
.news-date {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
    text-align: left; /* Cambiado de centrado a izquierda */
}

/* Contenedor de imagen alternating */
.news-image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
}

.news-image-content img,
.news-image-content .news-image-placeholder {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.news-image-content:hover img,
.news-image-content:hover .news-image-placeholder {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Texto de noticia (justificado con última línea centrada) */
.news-item p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--color-text);
    text-align: justify;
    text-align-last: left; /* Cambiado de centrado a izquierda */
    line-height: 1.5;
    hyphens: auto;
}

/* Botón (centrado) */
.news-item .btn {
    margin-top: 0.5rem;
    display: block;
    width: fit-content;
    margin-left: 0; /* Cambiado de auto a 0 para alinear a la izquierda */
    margin-right: auto;
}

/* Alternar dirección para items pares (como en alternating blocks) */
.news-item:nth-child(even) {
    flex-direction: row-reverse;
    background-color: var(--color-background);
}


/* Added: Home News Preview Styles */
#home-noticias {
    text-align: justify;
}
#home-noticias h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}
#home-noticias p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#home-noticias .home-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.news-preview-card {
    background-color: var(--color-background-light);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    padding: 1.5rem; /* Add padding inside the card */
    border: 1px solid var(--color-border);
}
.news-preview-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 7px 18px rgba(0,0,0,0.12);
}
.news-preview-image-placeholder {
    background-color: #f0f0f0;
    height: 150px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: transform var(--transition-speed) ease;
}
.news-preview-card:hover .news-preview-image-placeholder {
    transform: scale(1.05);
}
.news-preview-image-placeholder svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.news-preview-card h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    text-align: left;
}
.news-preview-card h3 a {
    color: var(--color-primary);
}
.news-preview-card h3 a:hover {
    color: var(--color-accent);
}
.news-preview-date {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    text-align: left;
}
.news-preview-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
    text-align: left;
    display: -webkit-box; /* For line clamping */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-preview-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Added: Job Listing Styles */
#vacantes .container > p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    /* Global 'p { text-align: justify; }' handles text justification within */
}

/* Job List Container */
.job-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Responsive grid for job cards */
    gap: 2rem; /* Space between cards */
    margin-top: 2rem;
}

/* Individual Job Listing Card */
.job-listing {
    background-color: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column; /* Align content vertically */
}

.job-list > .job-listing { /* Remove bottom margin for grid items, gap handles spacing */
    margin-bottom: 0;
}

.job-listing:hover {
    transform: translateY(-6px) scale(1.015); /* Consistent hover effect */
    box-shadow: 0 7px 18px rgba(0,0,0,0.12);
}

.job-listing h3 {
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
    text-align: center; /* Center job title */
    color: var(--color-primary);
}

.job-listing .job-location {
    display: block;
    text-align: center; /* Center location text */
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem; /* Space below location */
}

.job-listing .job-image-placeholder {
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
    max-height: 180px; /* Consistent max height for image area */
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-listing .job-image-placeholder svg,
.job-listing .job-image-placeholder img {
    display: block;
    max-width: 100%;
    max-height: 100%; /* Ensure image fits within placeholder bounds */
    height: auto;
    object-fit: contain; /* Preserve aspect ratio, fit within bounds */
    margin: 0 auto; /* Center image if smaller than placeholder */
    transition: transform var(--transition-speed) ease;
}

.job-listing:hover .job-image-placeholder svg,
.job-listing:hover .job-image-placeholder img {
    transform: scale(1.05); /* Scale image on card hover */
}

.job-listing p {
    text-align: justify; /* Justify job description */
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1; /* Allow description to fill space, pushing button down */
    color: var(--color-text);
}

.job-listing .btn {
    margin-top: auto; /* Pushes button to the bottom of the card */
    display: block;
    width: fit-content; /* Button width based on content */
    margin-left: auto;
    margin-right: auto; /* Center button */
}

/* "No Vacancies" Message Styling */
.job-listing.no-vacancies {
    text-align: center;
    background-color: var(--color-background);
    border: 1px dashed var(--color-secondary);
    padding: 2rem;
    grid-column: 1 / -1; /* Make it span all columns if grid is active */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Keep subtle shadow */
}

.job-listing.no-vacancies h3 {
    font-size: 1.4rem;
    color: var(--color-secondary);
}

.job-listing.no-vacancies p {
    text-align: center; /* Center paragraph text */
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.job-listing.no-vacancies:hover {
    transform: none; /* No hover transform for this message */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Keep original shadow */
}
/*------------------------------------*\
    #NAVIGATION - HAMBURGER MENU
\*------------------------------------*/

/* Estilo base para el botón de hamburguesa */
#mobile-menu-toggle {
    display: none; /* Oculto por defecto, se mostrará en móviles */
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1001; /* Asegura que esté por encima de otros elementos si es necesario */
}

#mobile-menu-toggle img {
    display: block; /* Para evitar espacio extra debajo de la imagen */
}

/* Contenedor de la navegación principal */
.main-nav {
    list-style: none;
    padding-left: 0;
    margin: 0;
    /* Tus estilos existentes para .main-nav en escritorio pueden ir aquí o ya estar definidos */
    /* Por ejemplo: display: flex; align-items: center; */
}

/* Estilos para los enlaces de navegación (generales) */
.main-nav li {
    /* Tus estilos existentes para li en escritorio */
}

.main-nav a.nav-link {
    /* Tus estilos existentes para a.nav-link en escritorio */
    /* Por ejemplo: padding: 15px; text-decoration: none; color: #333; */
}


/* --- Estilos para vista móvil --- */
@media (max-width: 768px) { /* Ajusta este breakpoint si es necesario */
    
    /* Asegúrate de que el contenedor de la nav o el header sea relativo
       si .main-nav será absoluto dentro de él */
    header nav.container { /* O solo 'header' si es el contenedor directo */
        position: relative; 
        display: flex; /* Para alinear logo y botón de hamburguesa */
        justify-content: space-between; /* Espacia el logo del botón */
        align-items: center; /* Centra verticalmente los ítems */
    }

    #mobile-menu-toggle {
        display: block; /* Mostrar el botón de hamburguesa en móviles */
        /* Puedes añadir más estilos aquí si es necesario (ej. margin) */
    }

    .main-nav {
        display: none; /* Oculto por defecto en móviles */
        flex-direction: column;
        width: 100%; /* Ocupa todo el ancho */
        
        /* Posicionamiento para el menú desplegable */
        position: absolute;
        top: 100%; /* Se posiciona justo debajo del header. Ajusta si la altura de tu header es variable o conocida. */
                   /* Si la altura del logo (60px) define la altura del header, esto podría ser top: 60px; o top: 100%; */
        left: 0;
        background-color: #ffffff; /* Color de fondo para el menú desplegable */
        border-top: 1px solid #eeeeee;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000; /* Para que esté por encima de otro contenido */
    }

    .main-nav.active {
        display: flex; /* Mostrar el menú cuando tiene la clase 'active' */
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0; /* Separador entre ítems */
    }
    .main-nav li:last-child {
        border-bottom: none; /* Quitar el borde del último ítem */
    }

    .main-nav a.nav-link {
        display: block; /* Para que ocupen todo el ancho del li */
        padding: 15px 20px; /* Espaciado interno confortable para táctil */
        width: 100%;
        box-sizing: border-box; /* Para que el padding no aumente el ancho total */
        color: #333; /* Asegúrate de que el color del texto sea legible */
        text-align: left;
    }

    .main-nav a.nav-link:hover,
    .main-nav a.nav-link.active { /* Asumo que 'active' también indica la página actual */
        background-color: #f8f8f8; /* Un ligero cambio de fondo al pasar el mouse o si está activo */
        color: var(--color-primary, #007bff); /* Usa tu color primario si está definido */
    }
}

/* --- Estilos para vista de escritorio --- */
@media (min-width: 769px) { /* Ajusta este breakpoint si es necesario */
    #mobile-menu-toggle {
        display: none !important; /* Asegura que esté oculto en escritorio */
    }

    .main-nav {
        display: flex !important; /* Asegura que se muestre como flex y anule el display:none de móvil */
        flex-direction: row;
        align-items: center; /* Alinea los ítems verticalmente si tienen alturas diferentes */
        position: static; /* Revierte el posicionamiento absoluto */
        width: auto; /* Ancho automático según el contenido */
        background-color: transparent; /* Sin fondo especial */
        border-top: none;
        box-shadow: none;
    }

    .main-nav li {
        width: auto; /* Ancho automático para los ítems */
        border-bottom: none; /* Sin bordes inferiores */
    }

    .main-nav a.nav-link {
        /* Aquí se aplicarían tus estilos de escritorio ya existentes para los enlaces */
        /* Por ejemplo: */
        /* padding: 10px 15px; */
        /* border-bottom: none; */ /* Si tenías un borde solo para móvil */
    }
}
{
sr.reveal('h2, h3, p, .btn, .service-card, .product-card, .news-item, .job-listing, .faq-item, .cert-logo-placeholder, .client-logo-placeholder, .contact-info p, form label, form input, form select, form textarea, form button', { interval: 100 });

sr.reveal('.alternating-block:nth-child(odd) .alternating-text-content', { origin: 'left', delay: 200 });
sr.reveal('.alternating-block:nth-child(odd) .alternating-image-content', { origin: 'right', delay: 300 });
sr.reveal('.alternating-block:nth-child(even) .alternating-text-content', { origin: 'right', delay: 200 });
sr.reveal('.alternating-block:nth-child(even) .alternating-image-content', { origin: 'left', delay: 300 });
}

