:root {
    --red: #ed161b;
    --dark: #06172f;
    --black: #141414;
    --light: #f2f3f5;
    --white: #ffffff;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
}
.container {
    width: min(1200px, 92%);
    margin: auto;
}
.header {
    background: var(--white);
    border-bottom: 3px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 100px;
}
.logo img {
    display: block;
    width: 190px;
    height: auto;
}
.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}
.navigation a {
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
}
.navigation a:hover { color: var(--red); }
.navigation .contact-link {
    background: var(--red);
    color: white;
    padding: 12px 22px;
    border-radius: 5px;
}
.navigation .contact-link:hover {
    background: #bc1015;
    color: white;
}
.page-content {
    padding: 60px 0;
    min-height: 60vh;
}
.footer {
    background: var(--dark);
    color: white;
    padding: 45px 0;
}
.footer hr {
    border: 0;
    border-top: 1px solid #ffffff30;
    margin: 25px 0;
}
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        padding: 15px 0;
        gap: 15px;
    }
    .navigation {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        font-size: 14px;
    }
    .logo img { width: 160px; }
}

.hero {
    min-height: 540px;
    display: flex;
    align-items: center;
    background: #06172f url('../images/portada.webp') center/cover no-repeat;
    color: white;
}
.hero-content {
    padding: 80px 0;
}
.hero h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.1;
    max-width: 700px;
    margin: 18px 0;
}
.hero p {
    font-size: 20px;
    max-width: 550px;
    margin-bottom: 35px;
}
.eyebrow {
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}
.hero .eyebrow {
    color: #ff7777;
}
.btn-primary {
    display: inline-block;
    padding: 14px 26px;
    background: var(--red);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
}
.btn-primary:hover {
    background: #bc1015;
}
.solutions {
    padding: 75px 0;
}
.solutions h2,
.service-banner h2,
.brands h2 {
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 35px;
}
.solution-card {
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}
.solution-image {
    height: 200px;
    background: #e2e5e9 center/cover no-repeat;
}
.solution-body {
    padding: 24px;
}
.solution-body h3 {
    margin-top: 0;
    color: var(--dark);
}
.solution-body a {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
}
.service-banner {
    background: var(--dark);
    color: white;
    padding: 65px 0;
    text-align: center;
}
.brands {
    padding: 60px 0;
    text-align: center;
}
.brand-carousel {
    display: flex;
    align-items: center;
    gap: 40px;
    overflow-x: auto;
}
@media (max-width: 1000px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 540px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        min-height: 420px;
    }
}

.contact-page {
    max-width: 800px;
}
.contact-page .form-field {
    margin-bottom: 22px;
}
.contact-page label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.contact-page input:not([type="hidden"]),
.contact-page textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccd1d8;
    border-radius: 5px;
    font: inherit;
}
.contact-page textarea {
    min-height: 180px;
    resize: vertical;
}
.contact-page button[type="submit"] {
    background: var(--red);
    color: white;
    padding: 14px 28px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.reload-captcha-button svg {
    width: 22px;
    height: 22px;
}

.contact-page .notices {
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid;
}

.contact-page .notices p {
    margin: 0;
}

.contact-page .notices.green {
    background: #e8f5e9;
    color: #166534;
    border-color: #22c55e;
}

.contact-page .notices.red {
    background: #fef2f2;
    color: #991b1b;
    border-color: #ef4444;
}

.contact-page .notices.yellow {
    background: #fffbeb;
    color: #92400e;
    border-color: #f59e0b;
}

.brand-carousel {
    gap: 24px;
    padding: 25px 0;
    scroll-snap-type: x mandatory;
}

.brand-item {
    flex: 0 0 180px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    scroll-snap-align: start;
}

.brand-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brands {
    padding: 25px 0;
}

.brands h2 {
    font-size: 24px;
    margin: 0 0 15px;
}

.brand-carousel {
    display: block;
    overflow: hidden;
    padding: 0;
    scroll-snap-type: none;
}

.brand-track {
    display: flex;
    width: max-content;
    animation: sro-marcas 35s linear infinite;
}

.brand-group {
    display: flex;
    flex-shrink: 0;
}

.brand-item {
    flex: 0 0 170px;
    height: 85px;
    box-sizing: border-box;
    padding: 15px;
}

.brand-carousel:hover .brand-track {
    animation-play-state: paused;
}

@keyframes sro-marcas {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .brand-track { animation: none; }
    .brand-carousel { overflow-x: auto; }
    .brand-group[aria-hidden="true"] { display: none; }
}

.about-header {
    background: var(--dark, #101b30);
    color: white;
    padding: 45px 0;
    text-align: center;
    border-bottom: 3px solid #ed161b;
}

.about-header h1 {
    color: white;
    font-size: 42px;
    margin: 0;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
    padding: 65px 0;
}

.about-text h2 {
    font-size: 32px;
    line-height: 1.2;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
}

.about-text .btn-primary {
    display: inline-block;
    margin-top: 20px;
}

.about-photo img {
    display: block;
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 800px) {
    .about-section {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 35px 0;
    }
}

.products-section {
    padding: 50px 0;
    display: flow-root;
}

.product-anchor {
    clear: both;
    scroll-margin-top: 130px;
    border-top: 1px solid #e2e5e9;
    margin: 30px 0;
    padding-top: 25px;
}

.product-anchor:first-child {
    border: 0;
    margin-top: 0;
    padding-top: 0;
}

.products-section .product-photo {
    float: left;
    width: 46%;
    border-radius: 8px;
    margin: 0 5% 35px 0;
}

.products-section #electricidad + p .product-photo,
.products-section #equipos + p .product-photo {
    float: right;
    margin: 0 0 35px 5%;
}

.products-section h2 {
    font-size: 30px;
    color: #101b30;
}

.products-section li {
    font-size: 17px;
    line-height: 2;
    list-style-position: inside;
}

.products-section > p:last-child {
    clear: both;
    padding-top: 25px;
    text-align: center;
}

.products-section a[href="/contacto"] {
    display: inline-block;
    background: #ed161b;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 800px) {
    .products-section .product-photo,
    .products-section #electricidad + p .product-photo,
    .products-section #equipos + p .product-photo {
        float: none;
        width: 100%;
        margin: 0 0 20px;
    }
}

.services-section {
    padding: 50px 0;
}

.services-section > h2 {
    font-size: 32px;
    text-align: center;
    color: #101b30;
}

.services-section > p {
    text-align: center;
    font-size: 18px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.service-card {
    background: white;
    border: 1px solid #e2e5e9;
    border-left: 4px solid #ed161b;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}

.service-card h3 {
    color: #101b30;
    font-size: 25px;
    margin: 0 0 15px;
}

.service-card p {
    font-size: 17px;
    line-height: 1.8;
    margin: 0;
}

.services-section a[href="/contacto"] {
    display: inline-block;
    background: #ed161b;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 800px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.contact-page select,
.contact-page input[type="tel"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d4d9df;
    border-radius: 5px;
    background: white;
    color: #101b30;
    font: inherit;
    box-sizing: border-box;
}

.contact-page select:focus,
.contact-page input[type="tel"]:focus {
    outline: 1px solid #ed161b;
    border-color: #ed161b;
}
