:root {
    /* Colores principales */
    --color-primary: #0C205C;
    --color-secondary: #3FB07C;
    --color-light: #E5E5E5;
    --color-dark: #333333;

    /* Variables para modo claro */
    --bg-color: #ffffff;
    --text-color: #222222;
    --card-bg: #f7f7f7;
    --border-color: #e6e6e6;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --header-bg: #ffffff;
    --footer-bg: var(--color-primary);
    --footer-text: #ffffff;

    /* Tipografía */
    --font-family: 'Inter', sans-serif;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Bordes y sombras */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --box-shadow: 0 4px 6px var(--shadow-color);

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Filtros para iconos */
    --icon-filter: brightness(0) saturate(100%) invert(19%) sepia(39%) saturate(2526%) hue-rotate(203deg) brightness(96%) contrast(87%);
    /* Accent color used for CTAs when needed */
    --accent-color: var(--color-primary);
}

/* Improve visibility of footer items in light theme: privacy link, logo, and CTA */
:root[data-theme="light"] {
    --footer-bg: var(--color-primary);
    --footer-text: #ffffff; /* keep footer text white on top of brand color */
    --footer-subtle: rgba(255,255,255,0.85);
    --footer-muted: rgba(255,255,255,0.7);
    --footer-cta-bg: #ffffff; /* CTA background in light theme to stand out */
    --footer-cta-color: var(--color-primary);
}

/* Modo oscuro */
[data-theme="dark"] {
    /* Dark theme with improved contrast for text and UI elements */
    --bg-color: #0f1720; /* very dark blue-gray */
    --text-color: #f1f5f9; /* near-white for high contrast */
    --card-bg: #111827; /* slightly lighter cards */
    --border-color: #1f2937;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --header-bg: #0b1220;
    --footer-bg: #071028;
    --footer-text: #e6eef8;
    /* Use a brighter, more contrasty blue in dark mode for headings and buttons */
    --color-primary: #2F67FF; /* brighter cobalt blue */
    --color-primary-contrast: #0b2b9a;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary:hover {
    background-color: #0a1a4d;
    color: white;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #35a06e;
    color: white;
}

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

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

/* Ensure buttons have enough contrast in dark mode */
[data-theme="dark"] .btn-outline {
    border-color: rgba(255,255,255,0.12);
    color: var(--text-color);
}

[data-theme="dark"] .btn-primary {
    background-color: var(--color-primary);
    color: white;
}

/* Selectores de idioma y tema */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto; /* push controls to the far right of header container */
}

.language-toggle, .theme-toggle {
    position: relative; /* positioned within header */
    z-index: 2000;
    top: 0;
}

.language-toggle {
    display: flex;
    gap: 8px;
}



.menu-toggle {
    display: none; /* default hidden; only shown by media queries */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1100; /* keep under language/theme toggles */
}

/* Keep mobile display controlled only via the main media query at bottom */

@media (max-width: 768px) {
    /* Stack controls neatly on small screens to avoid overlap */
    .header .container { display: flex; align-items: center; gap: 0.5rem; }
    .nav-list { display: none; } /* main nav collapses for mobile (assume mobile menu elsewhere) */
    .header-controls { margin-left: 0; }
}


.language-toggle button.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.language-toggle button:first-child {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.language-toggle button:last-child {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

#theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-icon, .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 100;
    padding: var(--spacing-sm) 0;
    transition: background-color var(--transition-normal);
}

.header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: nowrap; /* prevent header items from wrapping */
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

/* Inline SVG logo and icons should inherit color so they adapt to theme */
.logo .logo-img, .footer-logo .logo-img {
    width: auto;
    height: 56px;
    display: block;
    color: var(--color-primary);
}

.logo .logo-img svg, .footer-logo .logo-img svg {
    width: auto;
    height: 56px;
    fill: currentColor;
    stroke: currentColor;
}

.application-icon-inline {
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto var(--spacing-xs);
    color: var(--color-primary);
}

[data-theme="dark"] .application-icon-inline {
    color: var(--color-primary);
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1 1 auto; /* allow nav to take available space so header-controls can sit at the right on desktop */
}

.nav-list {
    display: flex;
    gap: var(--spacing-sm);
}

/* Neutral default for social-list links: allow context to decide presentation */
.social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text);
}

/* Footer-specific social list alignment: align icons/labels to the left edge
   so the list starts beneath the first letter of the "Síguenos" heading. */
.footer-socials h3 {
    margin-left: 0;
}
.footer-socials .social-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
/* Ensure items align to the left edge of the column */
.footer-socials .social-list {
    align-items: flex-start;
}
.footer-socials .social-list li {
    list-style: none;
}
.footer-socials .social-list li a {
    width: 100%; /* make the clickable area span the column so content aligns left */
    justify-content: flex-start; /* place icon + label at the left */
    gap: 0.6rem;
    padding: 0.15rem 0;
    color: var(--footer-text);
    text-align: left;
}
.footer-socials {
    /* ensure the column has the same left padding as other footer columns */
    padding-left: 0.15rem; /* tiny nudge; adjust if you want exact pixel match */
}
.footer-socials .social-list li a svg {
    flex: 0 0 auto; /* keep icon sized correctly */
}

/* Boxed icon style for widget-like social lists */
.social-widget .social-list a,
.icon-buttons .social-list a {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

/* Remove boxed backplates for footer social icons and use inline color */
.footer-socials .social-list a,
.footer-socials .social-list a svg {
    background: transparent;
    width: auto;
    height: auto;
}

/* Default social link appearance inside footer: icon + label inline, colored */
.footer-socials .social-list li a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--footer-subtle);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

/* Color the SVG icons using currentColor so they change with the link color */
.footer-socials .social-list li a svg {
    fill: currentColor;
    stroke: none;
    width: 18px;
    height: 18px;
}

/* Hover effect: brighten color and slightly lift */
.footer-socials .social-list li a:hover {
    color: var(--footer-cta-color); /* e.g., white background CTA color or accent */
    transform: translateY(-3px);
}

/* Ensure CTA contrast: make btn-outline in footer more visible on light footer */
.footer-catalog-cta {
    background: var(--footer-cta-bg);
    color: var(--footer-cta-color);
    border-color: rgba(255,255,255,0.12);
}
.footer-catalog-cta:hover {
    background: var(--footer-cta-color);
    color: #fff;
}


.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all var(--transition-fast);
}

/* Mobile drawer/backdrop */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1200;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--header-bg);
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    transform: translateX(-110%);
    transition: transform 0.28s ease;
    z-index: 1300;
    padding: var(--spacing-sm);
}

.mobile-drawer[aria-hidden="false"] {
    transform: translateX(0);
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    float: right;
    cursor: pointer;
}

.drawer-nav ul { list-style:none; padding: 1rem 0; }
.drawer-nav li { margin: 0.6rem 0; }
.drawer-nav a { color: var(--text-color); font-weight:600; }

/* Ensure menu toggle is visible against dark backgrounds */
[data-theme="dark"] .menu-toggle span {
    background-color: var(--text-color);
}

/* Focus styles for keyboard users */
.language-toggle button:focus, #theme-toggle-btn:focus, .menu-toggle:focus, .nav-list a:focus, .btn:focus {
    outline: 3px solid rgba(63,176,124,0.18);
    outline-offset: 2px;
}

/* Make logo image responsive and ensure clickable area */
.logo a, .footer-logo a {
    display: inline-flex;
    align-items: center;
}

.logo a img, .footer-logo a img {
    max-height: 56px;
    height: auto;
}

/* If the SVG has a hard-coded color, apply a filter in dark mode to improve contrast as fallback.
   Best option is providing a white/monochrome SVG; this filter is a compatibility fallback. */
[data-theme="dark"] .logo a img, [data-theme="dark"] .footer-logo a img {
    filter: brightness(0) saturate(100%) invert(66%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(110%);
}

/* Application icons in the custom products section */
.applications {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}
.application-item {
    text-align: center;
    width: 100px;
}
.application-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto var(--spacing-xs);
}

/* Improve icon visibility in dark mode with a subtle filter if they are colored */
[data-theme="dark"] .application-icon {
    filter: brightness(0.95) saturate(110%) contrast(105%);
}

/* Make outline buttons inside industry cards more visible in dark mode */
[data-theme="dark"] .industry-content .btn.btn-outline {
    border-color: rgba(255,255,255,0.12);
    color: var(--text-color);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-color);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-image {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    max-width: 90%;
    margin-left: auto;
}

.hero-image img {
    max-height: 400px;
    object-fit: contain;
}

/* Reduce hero image height on small devices for better fit */
@media (max-width: 576px) {
    .hero-image img { max-height: 220px; }
}

/* Por qué elegir rotomoldeo */
.why-rotomolding {
    padding: var(--spacing-xl) 0;
    background-color: var(--card-bg);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: calc(var(--spacing-lg) * 0.6); /* reduce gap under headings */
    color: var(--color-primary);
}

.rotomolding-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.comparison-item {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
}

.comparison-item h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.benefits-list li {
    margin-bottom: var(--spacing-xs);
    position: relative;
    padding-left: 1.5rem;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
}

.benefits-list.negative li::before {
    content: "✗";
    color: #e74c3c;
}

.certifications {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    column-gap: 1rem;
    row-gap: 0.25rem;
}

.certification-item {
    text-align: center;
    padding: 0.25rem 0.5rem;
}

.certification-icon {
    width: 0; /* removed image usage; keep CSS in case icons are reintroduced */
    height: 0;
    margin-bottom: 0;
}

/* Reduce spacing in rotomolding comparison on small screens */
@media (max-width: 900px) {
    .rotomolding-comparison {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .comparison-item {
        padding: 0.75rem;
    }
}

/* Keep certification label styles readable */
.certification-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* ISO certificate thumbnail and modal */
.iso-seal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--spacing-sm);
}
.iso-thumb {
    background: transparent;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.iso-thumb .iso-image {
    height: 220px; /* doubled as requested */
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: var(--box-shadow);
}

/* Modal */
.modal { display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.modal-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.modal-body { width: 100%; display:flex; justify-content:center; align-items:center; }
.iso-full { max-width: 100%; max-height: calc(90vh - 60px); object-fit: contain; }
.modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    align-self: flex-end;
}

@media (max-width: 600px) {
    .iso-thumb .iso-image { height: 80px; }
}

/* Clients thumbnail/modal - reuse ISO styles for consistent look */
.clients-seal { display:flex; align-items:flex-start; gap:0.5rem; justify-content:center; }
.clients-thumb { background: transparent; border: none; padding: 0; display: inline-flex; align-items: center; cursor: pointer; }
.clients-thumb .clients-image, .clients-image { height: 320px; width: auto; object-fit: contain; border-radius: 6px; box-shadow: var(--box-shadow); display:block; margin:0 auto; }
.clients-full { max-width: 100%; max-height: calc(90vh - 60px); object-fit: contain; }

@media (max-width: 600px) {
    .clients-thumb .clients-image { height: 101px; }
}

/* Align cases/FAQ columns to the top so headings match vertically */
.cases-faq .container { align-items: start; }

/* Nudge the clients thumbnail upward slightly to visually align with the FAQ heading */
.clients-seal { margin-top: -1.1rem; }

@media (max-width: 900px) {
    .clients-seal { margin-top: 0; }
}

/* Solution Finder */
.solution-finder {
    padding: var(--spacing-xl) 0;
}

.solution-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.solution-chip {
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.solution-chip:hover, .solution-chip.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Dark mode: make unselected chips more visible */
[data-theme="dark"] .solution-chip {
    background-color: var(--card-bg);
    border-color: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

[data-theme="dark"] .solution-chip:hover, [data-theme="dark"] .solution-chip.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.solutions-display {
    min-height: 300px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
}

/* Industries */
.industries {
    padding: var(--spacing-xl) 0;
    background-color: var(--card-bg);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.industry-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-fast);
}

.industry-card:hover {
    transform: translateY(-5px);
}

.industry-image {
    height: 150px;
    overflow: hidden;
}

/* External image fallback */
.industry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Inline SVG icon styling for industries */
.industry-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.industry-icon-inline {
    width: 72px;
    height: 72px;
    display: inline-block;
    margin: 0;
    color: var(--color-primary);
    flex: 0 0 auto;
}

.industry-icon-inline text {
    fill: currentColor;
}

[data-theme="dark"] .industry-icon-inline {
    color: var(--color-primary);
}

/* Hide legacy sprite-based icons to avoid showing a colored square */
.industry-image .industry-icon {
    display: block;
    max-width: 96px;
    max-height: 96px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.industry-image .restaurantera { background-position: 0 0; }
.industry-image .agricultura { background-position: -80px 0; }
.industry-image .ganadera { background-position: -160px 0; }
.industry-image .textil { background-position: -240px 0; }
.industry-image .acuicola { background-position: -320px 0; }
.industry-image .farmaceutica { background-position: -400px 0; }
.industry-image .purificacion { background-position: -480px 0; }
.industry-image .cosmetica { background-position: -560px 0; }
.industry-image .alimentaria { background-position: -640px 0; }
.industry-image .escolar { background-position: -720px 0; }
.industry-image .confitera { background-position: 0 -80px; }
.industry-image .quimica { background-position: -80px -80px; }
.industry-image .carnica { background-position: -160px -80px; }
.industry-image .parques { background-position: -240px -80px; }
.industry-image .construccion { background-position: -320px -80px; }
.industry-image .hotelera { background-position: -400px -80px; }
.industry-image .hogar { background-position: -480px -80px; }
.industry-image .reciclado { background-position: -560px -80px; }
.industry-image .plastica { background-position: -640px -80px; }

.industry-content {
    padding: var(--spacing-sm);
}

.industry-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.industry-description {
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

/* Product Categories */
.product-categories {
    padding: var(--spacing-xl) 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.category-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform var(--transition-fast);
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    height: 120px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    padding: var(--spacing-sm);
    font-weight: 600;
}

.categories-cta {
    text-align: center;
}

/* Custom Products */
.custom-products {
    padding: var(--spacing-xl) 0;
    background-color: var(--card-bg);
}

.custom-products .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.custom-text {
    margin-bottom: var(--spacing-md);
}

.applications {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.application-item {
    text-align: center;
}

.application-icon {
    width: 50px;
    height: 50px;
    margin-bottom: var(--spacing-xs);
}

.custom-image {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* Quality */
.quality {
    padding: var(--spacing-xl) 0;
}

.quality-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.quality-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.iso-seal {
    text-align: center;
    margin-top: var(--spacing-md);
}

.iso-image {
    width: 120px;
}

.comparison-table h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--spacing-xs);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--color-primary);
    color: white;
}

.quality-policy {
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-align: center;
}

.quality-policy h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.quality-policy p {
    margin-bottom: var(--spacing-md);
}

/* Cases and FAQ */
.cases-faq {
    padding: var(--spacing-xl) 0;
    background-color: var(--card-bg);
}

.cases-faq .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.cases-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.case-item {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.accordion-item {
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: var(--spacing-sm);
    background-color: var(--bg-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: "+";
    font-size: 1.5rem;
}

.accordion-item.active .accordion-header::after {
    content: "-";
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), padding var(--transition-normal);
}

.accordion-item.active .accordion-content {
    padding: var(--spacing-sm);
    max-height: 500px;
}

/* Quote */
.quote {
    padding: var(--spacing-xl) 0;
}

/* Ensure the quote section's container centers its CTA button on all breakpoints */
.quote > .container {
    text-align: center;
}

.quote-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}


/* Social list styling */
.social-list {
    list-style: none;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0;
    margin: 0.25rem 0 0 0;
}
.social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--footer-text);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.social-list a:hover {
    transform: translateY(-2px);
    /* remove heavy background on hover for a cleaner look */
    background: transparent;
}

.contact-info {
    display: grid;
    gap: 0.5rem;
}
.contact-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.contact-item svg { flex-shrink: 0; }

/* Footer CTA contrast fix for light theme */
.footer-catalog-cta {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

[data-theme="light"] .footer-catalog-cta {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

[data-theme="dark"] .footer-catalog-cta {
    background: transparent;
    color: var(--footer-text);
    border-color: rgba(255,255,255,0.12);
}
.quote-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.form-group {
    width: calc(50% - var(--spacing-sm) / 2);
}

.form-group.full-width {
    width: 100%;
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.quote-info {
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
}

/* Quote iframe (embedded external form) */
.quote-iframe {
    width: 100%;
    display: block;
}
.quote-iframe iframe {
    width: 100%;
    height: 850px; /* reasonable default for a full form */
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-color);
}

@media (max-width: 900px) {
    .quote-content {
        display: block;
    }
    .quote-iframe iframe {
        height: 1000px; /* allow more vertical space on narrow screens */
    }
}

/* Full-bleed iframe wrapper: allow iframe to span the entire viewport width */
.quote-iframe-full {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background-color: var(--bg-color);
    padding: var(--spacing-md) 0; /* vertical padding to give some breathing room */
}
.quote-iframe-full iframe {
    width: 100vw;
    max-width: 1600px; /* avoid excessive line-lengths on very wide screens */
    display: block;
    margin: 0 auto;
    height: 900px;
    border-radius: 0; /* edge-to-edge look */
}

/* Collapsible behavior: start collapsed and expand on toggle */
.quote-iframe-full {
    max-height: 0;
    transition: max-height 400ms ease, padding 300ms ease;
    padding-top: 0;
    padding-bottom: 0;
}
.quote-iframe-full[aria-hidden="false"] {
    /* large max-height to accommodate iframe height; still constrained by inner iframe sizing */
    max-height: 1400px;
    padding: var(--spacing-md) 0;
}
.quote-iframe-full .quote-iframe-inner, .quote-iframe-full iframe {
    /* ensure overflow is completely clipped when collapsed */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.quote-iframe-full[aria-hidden="true"] .quote-iframe-inner,
.quote-iframe-full[aria-hidden="true"] iframe {
    height: 0 !important;
    max-height: 0 !important;
    visibility: hidden !important;
}
.quote-iframe-inner {
    width: 100%;
    overflow: hidden;
}

/* Toggle button placed near the section title */
.quote-toggle {
    margin: 0 auto;
    display: inline-block;
    vertical-align: middle;
    padding: 0.9rem 1.4rem;
    font-size: 1rem;
    border-radius: 10px;
    background-color: var(--accent-color);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 6px 20px rgba(47,103,255,0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

@media (max-width: 768px) {
    .quote-iframe-full[aria-hidden="false"] {
        max-height: 2200px; /* allow for taller mobile iframe */
    }
}

.quote-toggle:hover, .quote-toggle:focus {
    transform: translateY(-2px);
    /* soft green hover using the footer green color */
    background-color: color-mix(in srgb, var(--color-secondary) 72%, white 28%);
    box-shadow: 0 10px 30px rgba(63,176,124,0.18);
    outline: none;
}

/* When the quote section is open, change the button to the footer green */
.quote-toggle[aria-expanded="true"] {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    box-shadow: 0 10px 30px rgba(63,176,124,0.18);
}

.quote-toggle[aria-expanded="true"]:hover,
.quote-toggle[aria-expanded="true"]:focus {
    background-color: color-mix(in srgb, var(--color-secondary) 85%, black 15%);
    transform: translateY(-2px);
}

/* Centering for adaptive only: move centering into the media query below */

@media (max-width: 1200px) {
    .quote-iframe-full iframe {
        height: 1000px;
    }
}

@media (max-width: 768px) {
    .quote-iframe-full {
        padding: var(--spacing-sm) 0;
    }
    .quote-iframe-full iframe {
        width: 100%;
        height: 1300px; /* allow for longer mobile form flow */
    }

    /* Center CTA button on adaptive/mobile only */
    .quote .container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: var(--spacing-md) 1rem;
    }
}

.quote-info h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.contact-info {
    margin-bottom: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.catalog-link {
    text-align: center;
    margin-top: var(--spacing-md);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    /* make logo column narrower so the 4 lists sit closer to it */
    grid-template-columns: minmax(140px, 220px) 1fr 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: start;
}

.footer-logo-img {
    height: 50px;
    margin-bottom: var(--spacing-md);
}

.footer h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-links a, .footer-contact a {
    color: var(--footer-text);
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--color-secondary);
}

/* Apply same hover color and SVG behavior as social links for other footer clickables */
.footer-links a:hover, .footer-contact a:hover, .footer-bottom .privacy-policy a:hover, .footer-catalog-cta:hover {
    color: var(--footer-social-hover, var(--color-secondary));
}

/* Ensure SVG icons inside contact items follow currentColor on hover */
.footer-contact .contact-info svg, .footer-links svg {
    fill: currentColor;
}

/* Make link transitions smooth */
.footer-links a, .footer-contact a, .footer-bottom .privacy-policy a {
    transition: color var(--transition-fast), transform var(--transition-fast);
}

/* Add the same slight lift/translate and color behavior used in .footer-socials to other footer links */
.footer-links a:hover,
.footer-contact a:hover,
.footer-bottom .privacy-policy a:hover,
.footer-catalog-cta:hover {
    transform: translateY(-3px);
    color: var(--footer-social-hover, var(--color-secondary));
}

/* Ensure icons inside these links follow currentColor in both light and dark themes */
.footer-links a svg, .footer-contact a svg, .footer-bottom .privacy-policy a svg {
    fill: currentColor;
}

/* Dark theme: ensure hover color also uses the same variable (keeps contrast) */
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-contact a:hover,
[data-theme="dark"] .footer-bottom .privacy-policy a:hover,
[data-theme="dark"] .footer-catalog-cta:hover {
    color: var(--footer-social-hover, var(--color-secondary));
}

/* Footer adjustments for dark theme */
[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .footer-links a, [data-theme="dark"] .footer-contact a {
    color: var(--footer-text);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Social list: vertical labeled items with icons */
.footer-socials .social-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-socials .social-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--footer-text);
    text-decoration: none;
    font-weight: 500;
}

.footer-socials .social-list a svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: currentColor;
    opacity: 0.95;
    background: transparent; /* ensure no boxed bg */
}

/* Ensure footer logo SVG and images contrast against footer background */
.footer .footer-logo .logo-img, .footer .footer-logo svg {
    color: var(--footer-text) !important;
    fill: var(--footer-text) !important;
}

/* Make privacy link clearly visible in footer */
.footer-bottom .privacy-policy a {
    color: var(--footer-text);
    opacity: 0.95;
}

/* Strengthen CTA visibility: bigger, higher-contrast button */
.footer-catalog-cta {
    display: inline-block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    background: var(--footer-cta-bg, #ffffff);
    color: var(--footer-cta-color, var(--color-primary));
    border: 1px solid rgba(255,255,255,0.08);
}
.footer-catalog-cta:hover {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

/* Remove any remaining rounded backplates and shadows behind icons */
.footer-socials .social-list li a, .footer-socials .social-list li a svg {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Vertical alignment: ensure icons and labels line up exactly */
.footer-socials .social-list li a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1;
    padding: 0.12rem 0;
}
.footer-socials .social-list li a svg {
    display: inline-block;
    vertical-align: middle;
}
.footer-socials .social-label {
    display: inline-block;
    vertical-align: middle;
}

/* Ensure heading and list share the same left edge within the footer column.
   Use a small reset so the list aligns exactly under the 'S' of 'Síguenos'. */
.footer-socials h3, .footer-socials .social-list {
    margin-left: 0;
    padding-left: 0;
}

/* Social hover color: use brand secondary color for visible accent */
.footer-socials .social-list a:hover {
    /* Prefer brand green for hover so items contrast against dark blue footer */
    color: var(--color-secondary);
}

/* Provide a fallback hover color variable in case you prefer a light blue instead */
:root {
    --footer-social-hover: var(--color-secondary); /* change to a light blue if desired */
}

/* Apply hover color with fallback and ensure SVG follows the color */
.footer-socials .social-list li a:hover {
    color: var(--footer-social-hover);
}
.footer-socials .social-list li a:hover svg {
    fill: currentColor;
}

/* Increase visibility of footer link text slightly on default state */
.footer-socials .social-list a {
    color: var(--footer-subtle, var(--footer-text));
}

/* Tweakable horizontal shift for social list alignment under the "S" of "Síguenos".
   Adjust --social-align-shift (negative moves left, positive moves right). */
:root {
    --social-align-shift: -8px; /* default nudge left; change this value to tune */
}
.footer-socials .social-list {
    transform: translateX(var(--social-align-shift));
}

/* On small screens, reset shift so the list fits the column naturally */
@media (max-width: 768px) {
    :root {
        --social-align-shift: 0px;
    }
    .footer-socials .social-list {
        transform: none;
    }
}

.footer-socials .social-label {
    font-size: 0.95rem;
    line-height: 1;
}

/* Keep boxed social icons in footer by default (original look). To align the list under the heading,
   ensure the UL has no left margin/padding so its left edge aligns with the H3 text. */
.footer-socials .social-list {
    margin-left: 0;
    padding-left: 0;
}

.footer-socials h3 {
    /* Use the same spacing and color rules as other footer headings */
    margin-bottom: var(--spacing-md);
    color: var(--footer-text);
    font-size: 1.2rem;
    font-weight: 600;
}


/* Contact items inside footer */
.footer-contact .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--footer-text);
}

.contact-item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    opacity: 0.95;
}

/* Catalog CTA in footer: stronger contrast on light theme, keep dark theme subtle */
.footer-catalog-cta {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

:root[data-theme="light"] .footer-catalog-cta {
    background: var(--accent-color);
    color: #fff;
}


:root[data-theme="dark"] .footer-catalog-cta {
    background: transparent;
    color: var(--footer-text);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Responsive: collapse footer columns on small screens */
@media (max-width: 760px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.6rem;
    }
}

.credits a {
    color: var(--color-secondary);
}

/* Responsive */
@media (max-width: 992px) {
    .hero .container, .custom-products .container, .quality-content, .cases-faq .container, .quote-content {
        grid-template-columns: 1fr;
    }
    /* On narrow screens show hero text before the image */
    .hero-content {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rotomolding-comparison {
        grid-template-columns: 1fr;
    }
    
    .menu-toggle {
        display: block;
    }

    /* ensure mobile toggles don't get overlapped by the hamburger */
    .language-toggle, .theme-toggle {
        top: 10px;
    }

    /* keep language toggle slightly left of theme toggle to avoid overlap */
    .language-toggle {
        right: 84px;
    }

    .theme-toggle {
        right: 20px;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: var(--spacing-xl) var(--spacing-md);
        transition: right var(--transition-normal);
        z-index: 1000;
        box-shadow: -5px 0 15px var(--shadow-color);
    }
    
    .nav-list.active {
        right: 0;
    }
    
    .cta-button {
        display: none;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .language-toggle, .theme-toggle {
        top: 10px;
    }
    
    .language-toggle {
        right: 60px;
    }
}