:root {
    --primary-teal: #1D9BA5; /* Exact production teal */
    --search-teal: #1db1b6;
    --nav-bg: #000000;
    --body-bg: #f1f1f1; /* Elementor body background */
    --text-color: #7a7a7a; /* Exact production text color */
    --title-blue: #123d8e; /* Exact production dark blue */
    --link-blue: #123d8e;
    --container-width: 1140px;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    font-size: 16px; /* Production size */
    line-height: 1.6;
}

.layout-boxed .boxed-container {
    max-width: var(--container-width);
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.05); /* Soft shadow per audit */
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

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

/* Header */
.masthead {
    background-color: white;
    padding: 20px 0 0; /* Reduced top padding */
}

.logo img {
    max-height: 265px; /* Updated to meet requirement */
}

.main-navigation {
    background-color: var(--nav-bg);
    color: white;
    height: 42px;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    height: 100%;
}

.menu-main {
    display: flex;
    list-style: none;
    height: 100%;
}

.menu-main li a {
    color: white;
    text-decoration: none;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-size: 14px;
    height: 100%;
    text-transform: none;
}

.menu-main li a:hover {
    background-color: var(--search-teal);
}

/* Spacing for Acceso menu item */
.nav-access {
    margin-right: 20px;
}

.search-icon-block {
    background-color: var(--search-teal);
    width: 52px;
    display: none; /* Ocultar la lupa */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: white;
}

/* Page Spacing */
.site-main {
    padding-top: 40px; /* Reduced gap */
    padding-bottom: 60px;
    background: white;
}

.section {
    padding-bottom: 80px;
}

/* Product Grid System */
.products-layout {
    padding: 0 60px 20px;
}

.product-row-full {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.gray-header-box {
    background-color: #eeeeee;
    padding: 12px 20px;
    margin: 40px auto 15px;
    border-radius: 8px;
    display: inline-block;
    width: auto;
    min-width: 400px;
}

.gray-header-box .title-prod {
    margin-bottom: 0 !important;
}

.warning-red-text {
    color: #cc0000;
    font-weight: 700;
    margin-bottom: 25px;
    display: block;
    font-size: 14px;
    text-transform: uppercase;
}

.pink-row-container {
    background-color: #f8d7da !important;
    padding: 30px 60px 40px !important;
    border-radius: 20px;
    margin-bottom: 40px;
}

.product-row-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4-column grid as requested */
    gap: 20px 20px; /* Matched production gap */
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .product-row-grid { grid-template-columns: repeat(2, 1fr); }
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Change from center to stretch to allow buttons to fill height */
    text-align: center;
}

.product-btn {
    width: 100%;
    height: 100%; /* Force button to fill the grid item height */
    padding: 30px; /* Matched production padding */
    border-radius: 15px; /* Matched production border-radius */
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    max-height: 120px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5); /* Matched production shadow */
    transition: transform 0.2s;
}

.product-btn:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

.product-btn-unavailable {
    cursor: not-allowed;
    opacity: 0.85;
}

.product-btn-unavailable:hover {
    transform: none;
    opacity: 0.85;
}

.product-btn h3 {
    font-size: 15px; /* Production size audit */
    font-weight: 700;
    text-align: center;
    margin: 0 0 5px;
    width: 100%;
    color: white !important; /* Always white inside colored buttons */
    text-transform: none; /* Removed uppercase per comparison audit */
}

.product-btn p {
    font-size: 9px; /* Reduced to 9px per user request */
    color: rgba(255,255,255,0.9) !important;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.product-item > p {
    font-size: 13px; /* Slightly larger per audit */
    color: #333333; /* Darker grey per audit */
    margin-top: 12px;
    line-height: 1.4;
    text-align: center;
}

/* Audited Production Colors for Products */
.bg-810081 { background-color: #810081 !important; }
.bg-1e3d59 { background-color: #1e3d59 !important; }
.bg-2e5190 { background-color: #2e5190 !important; }
.bg-2d5a27 { background-color: #2d5a27 !important; }
.bg-a11b3d { background-color: #a11b3d !important; }
.bg-e91e63 { background-color: #e91e63 !important; }
.bg-cccccc { background-color: #cccccc !important; color: #333 !important; }
.bg-cccccc h3 { color: #333 !important; }
.bg-444444 { background-color: #444444 !important; }
.bg-ff57f0 { background-color: #ff57f0 !important; }
.bg-bf76da { background-color: #bf76da !important; }
.bg-f46b28 { background-color: #f46b28 !important; }
.bg-6057bb { background-color: #6057bb !important; }
.bg-482791 { background-color: #482791 !important; }

/* Distributor Button Colors */
.bg-manuales { background-color: #69932d; }
.bg-tarifas { background-color: #3d62c6; }
.bg-otros { background-color: #4e4e59; }
.bg-descargas { background-color: #f9d33b; }
.bg-descargas h3, .bg-descargas p { color: #555 !important; }
.bg-soporte { background-color: #dd45e0; }

/* Production Specific Download Colors */
.bg-win-v5 { background-color: #123d8e; }
.bg-android-v5 { background-color: #3d62c6; }
.bg-pda-v5 { background-color: #187007; }
.bg-gray-v3 { background-color: #707070; }
.bg-pantalla-win { background-color: #ae0048; }
.bg-pantalla-android { background-color: #e90061; }
.bg-cajones { background-color: #c675ec; }

/* Manuales Colors */
.bg-man-winex { background-color: #6a9333; }
.bg-man-sicax { background-color: #123d8e; } /* Azul para SICAX */
.bg-man-windows { background-color: #6a9333; }
.bg-man-android { background-color: #3d62c6; }
.bg-man-comunes { background-color: #dddddd; }
.bg-man-pda { background-color: #187007; }
.bg-man-otros { background-color: #707070; }

/* Home Page Styles */
.home-intro-section {
    padding: 80px 40px 40px;
    background: white;
    text-align: center;
}

.title-prod {
    color: #1a3266 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px;
    margin-bottom: 40px;    
    font-weight: 600;
}

/* Only override color for specific headings, not inside buttons */
.home-intro-section h2,
.marketing-col h3 {
    color: #444;
    font-family: 'Montserrat', sans-serif;
}

.blocks-grid-2x2 h3 {
    color: white !important;
}

.home-intro-section h2 {
    font-size: 18.6667px;
    font-family: helvetica, arial, sans-serif;
    color: #444;
    font-weight: 700;
    margin-bottom: 20px;
}

.home-intro-section p {
    font-size: 14px;
    margin-bottom: 20px;
    color: #666;
}

.blocks-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 40px 80px;
    background: white;
}

.teal-block {
    background-color: var(--primary-teal);
    border-radius: 15px;
    padding: 15px 20px; /* Más compacto */
    text-align: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
    min-height: 100px; /* Altura uniforme solicitada */
}

.teal-block:hover {
    opacity: 0.85;
    box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.6);
}

.teal-block h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0px;
    text-align: center;
    width: 100%;
    font-family: "Helvetica", Arial, sans-serif;
}

.teal-block p {
    font-size: 11px;
    opacity: 1;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    font-family: "Helvetica", Arial, sans-serif;
}

.legal-text {
    font-size: 0.875rem; /* 14px equivalent */
}

.legal-text h2,
.legal-text h3,
.legal-text p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Bottom Footer Grid */
.marketing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px 80px;
    background: white;
}

.marketing-col h3 {
    font-size: 22px;
    color: #444;
    margin-bottom: 15px;
    font-family: helvetica, arial, sans-serif;
}

.marketing-col p {
    font-size: 14px;
    color: #666;
}

/* --- RESPONSIVIDAD (Media Queries) --- */

/* Tablets y pantallas medianas (hasta 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .products-layout {
        padding: 0 20px 20px;
    }

    .product-row-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }

    .blocks-grid-2x2 {
        padding: 40px 20px;
        gap: 20px;
    }
}

/* Móviles grandes (hasta 768px) */
@media (max-width: 768px) {
    .logo img {
        max-height: 120px;
    }

    .menu-main {
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu-main li a {
        padding: 0 10px;
        font-size: 13px;
    }

    .main-navigation {
        height: auto;
        padding: 10px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .home-intro-section {
        padding: 40px 20px 20px;
    }

    .title-prod {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .blocks-grid-2x2 {
        grid-template-columns: 1fr;
        padding: 20px !important; /* Eliminar el padding excesivo en movil */
    }

    .marketing-grid {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 40px;
    }

    .product-row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .product-row-grid {
        grid-template-columns: 1fr;
    }

    .product-btn {
        min-height: 90px;
    }

    .site-footer {
        padding: 40px 20px;
    }

    .site-footer p {
        font-size: 13px;
    }

    .site-footer p:nth-child(3) {
        font-size: 22px; /* Teléfono más pequeño */
    }
}

/* Language Dropdown Selector styling */
.dropdown-lang {
    position: relative;
    height: 100%;
}

.dropdown-toggle-lang {
    cursor: pointer;
}

.dropdown-menu-lang {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2c3e50;
    min-width: 150px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
    border-top: 3px solid var(--search-teal, #008080);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-lang:hover .dropdown-menu-lang {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-lang li {
    width: 100%;
}

.dropdown-menu-lang li a {
    color: #fff !important;
    padding: 10px 20px;
    text-decoration: none;
    display: block !important;
    font-size: 14px;
    transition: background-color 0.2s ease;
    text-align: left;
    height: auto !important;
    line-height: normal;
}

.dropdown-menu-lang li a:hover {
    background-color: var(--search-teal, #008080) !important;
    color: #fff !important;
}
