@font-face {
    font-family: "Helvetica Now";
    src: url("../fonts/helveticanow.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Open Sans";
    src: url("../fonts/OpenSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Open Sans";
    src: url("../fonts/OpenSans-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #E60000;
    --background-color: #141414ce;
    --light-gray-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --primary-font: "Open Sans", sans-serif;
    --title-font: "Helvetica Now", 'Poppins', sans-serif;
    --bg-img: url("../images/fondo_rojo.jpg");
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

body {
    font-family: var(--primary-font);
    color: var(--light-gray-bg);
    background-image: var(--bg-img);
    background-repeat: no-repeat;
    background-size: cover;
    font-size: 20px;
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--title-font);
}

h1,
h2,
h3 {
    font-weight: 600;
}

h1 {
    font-size: 4rem;
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

table th,
table td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: left;
    vertical-align: top;
}

table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table span,
table strong {
    white-space: nowrap;
}

table a {
    color: var(--secondary-color);
    word-break: break-word;
}

table td {
    font-size: 0.95rem;
}

button {
    font-family: var(--primary-font);
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 20px;
    height: 20px;
    margin-bottom: 1rem;
    cursor: pointer;
    rotate: 45deg;
    z-index: 1000;
}

.back-button:hover {
    transform: scale(1.1);
}

.politica-privacidad ul {
    padding-left: 2rem;
}

a {
    color: var(--light-gray-bg);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.accent-dot {
    color: var(--secondary-color);
}

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

li::marker {
    color: var(--secondary-color);
}

/* --- HEADER --- */
.header {
    background-color: #0a0a0a;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo img {
    height: 30px;
}

.nav {
    position: relative;
    z-index: 1000;
}

.nav a,
.nav button {
    text-align: center;
    margin-left: 2rem;
    font-weight: 600;
    font-size: 1rem;
}

.nav button {
    background: none;
    border: none;
    color: var(--light-gray-bg);
    cursor: pointer;
}

.nav button:hover {
    color: var(--secondary-color);
}

.nav-services {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    background: #0a0a0a;
    border: 1px solid #f8f9fa;
    border-radius: 10px;
    transform: translateX(-25%);
    z-index: 500;
}

.nav-services.open {
    display: flex;
}

.nav-services a {
    text-align: left;
    padding: 1rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- HERO --- */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #111;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--light-gray-bg);
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin: 1rem auto 2rem;
    max-width: 600px;
    opacity: 0.9;
}

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--light-gray-bg);
}

.btn-primary:hover {
    background-color: #ff1a1a;
    transform: translateY(-3px);
}

/* --- PRESENTACION --- */
.presentacion {
    padding: 4rem 15%;
    background-color: #00000034;
}

.presentacion-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.presentacion-flex p {
    width: calc(60% - 20px);
}

.presentacion-img {
    width: calc(40% - 20px);
}

.presentacion-img img {
    width: 100%;
    border-radius: 10px;
}

/* --- SERVICIOS --- */
.services {
    padding: 4rem 0;
}

.section-title-center {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.services-flex {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-card {
    background-color: var(--background-color);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.service-card p {
    color: #ccc;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card small {
    font-size: 1rem;
    color: #ccc;
    display: block;
    margin-bottom: 1rem;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.flex-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.flex-item img {
    object-fit: cover;
    aspect-ratio: 16/9;
    width: 100%;
    height: 100%;
    max-height: 300px;
    border-radius: 10px;
}

.service-card a {
    font-size: 1.3rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    width: 100%;
}

.service-card a:hover {
    color: var(--light-gray-bg);
}

.flex-item span {
    font-size: 1.3rem;
}

.service-list {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.service-list ul {
    font-size: 1.2rem;
}

.service-list small {
    font-size: 1rem;
    display: block;
    color: #ddd;
}

/* --- EXPERIENCE --- */
.experiencie {
    padding: 4rem 15%;
}

.experiencie .flex {
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.experiencie .flex-item {
    align-items: center;
    /* width: calc(50% - 40px);
    max-width: 800px; */
    width: 100%;
    max-width: 1200px;
}

.experiencie .flex-item img {
    max-width: 800px;
}

/* --- PROYECTOS --- */
.projects {
    background-color: var(--background-color);
    padding: 4rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--background-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-item:hover {
    transform: translateY(-10px);
}

.project-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-item:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
    background: var(--background-color);
}

.project-info h3 {
    color: var(--primary-color);
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.project-category {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* --- CONTACTO --- */
.contact {
    background: linear-gradient(rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0.8)),
        url("/images/contact_bg.avif") no-repeat center/cover;
    padding: 4rem 0;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    border: 1px solid #333;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.contact-border {
    background: #070707;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.contact-border h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-border p {
    margin-bottom: 1.5rem;
}

.contact-button-wrapper {
    margin-top: 2rem;
}

.contact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.contact-form input {
    width: calc(50% - 5px);
}

.contact-form textarea {
    width: 100%;
    height: 200px;
}

.contact-form #form-name {
    width: 100%;
}

.contact-form input,
.contact-form textarea,
.contact-form #form-select-service {
    border: 1px solid #fff;
    color: var(--border-color);
    border-radius: 2rem;
    padding: 1rem;
    margin-bottom: 1rem;
    font-family: var(--primary-font);
    font-size: 1rem;
    background: var(--background-color);
}

.contact-form #form-select-service>header {
    display: flex;
    justify-content: space-between;
}

.contact-form #form-select-service-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.contact-form #form-select-service {
    width: 50%;
    cursor: pointer;
    position: relative;
}

.contact-form #form-select-service>div.open {
    display: flex;
}

.contact-form #form-select-service>div {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    background: #141414;
    border: 1px solid #fff;
    color: var(--border-color);
    border-radius: 2rem;
}

.contact-form #form-select-service>div>span {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
}

.contact-form #form-select-service>div>span:last-child {
    border-bottom: none;
}

.contact-form label {
    width: 100%;
}

.contact-form #form-check {
    width: 30px;
}

.contact-form #form-submit {
    background: #e44141;
    color: var(--border-color);
    padding: 1rem;
    border: none;
    border-radius: 5rem;
    font-weight: 600;
}

.contact-data {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-data-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-data span {
    display: block;
}

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

.modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #141414;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    z-index: 1100;
}

.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: #0a0a0a9a;
}

.modal button {
    padding: 10px;
    background: #e44141;
    color: var(--border-color);
    font-size: 1.2rem;
    font-weight: 600;
    width: 100%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* --- CLIENTS --- */

.clients {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.client-img {
    width: 170px;
}

.client-img img {
    width: 100%;
    height: 100%;
    filter: invert(1);
}

/* --- FOOTER --- */
.footer {
    background-color: #0a0a0a;
    color: var(--light-gray-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    flex: 1.2;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: 40px;
}

.footer-logo p {
    opacity: 0.7;
}

/* Empresas Asociadas */
.footer-partners {
    flex: 1;
    margin: 0 auto;
}

.footer-partners h4 {
    margin-bottom: 1.5rem;
}

.footer-legal {
    font-size: .9rem;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.partner-link {
    display: block;
    transition: opacity 0.3s ease;
}

.partner-link:hover {
    opacity: 0.8;
}

.partner-logo {
    height: 50px;
    max-height: 50px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-link:hover .partner-logo {
    filter: grayscale(0%);
}

/* Redes Sociales */
.footer-social {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-social h4 {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-social a {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: #0a0a0a9a;
}

.cookie-modal {
    width: 95%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #070707;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.cookie-modal p {
    color: #aaa;
}

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

.cookie-modal-buttons{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-modal-btn {
    position: fixed;
    bottom: 10px;
    z-index: 900;
    right: 10px;
    background: var(--primary-color);
    padding: 7px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
}

.cookie-modal-btn img {
    rotate: 90deg;
}
/* --- MEDIA QUERIES --- */
@media screen and (max-width: 1024px) {
    .flex {
        flex-direction: column;
    }

    .presentacion {
        padding: 2rem;
    }

    .experiencie {
        padding: 2rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

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

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

    .nav-services {
        top: 90px;
        right: 50%;
        transform: translateX(50%);
    }

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

@media screen and (max-width: 768px) {
    body {
        font-size: 18px;
    }

    .service-card p {
        font-size: 1.2rem;
    }

    .flex-item {
        width: 100%;
        object-position: 0;
    }

    .contact-border {
        padding: 20px;
    }

    .experiencie .flex-item {
        width: 100%;
        align-items: center;
    }

    .experiencie .flex-item img {
        object-position: 0;
    }

    .presentacion-img {
        width: 100%;
    }

    .presentacion-flex p {
        width: 100%;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }

    .nav a {
        margin-left: 0;
    }

    .hero {
        height: 60vh;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .footer-container {
        gap: 3rem;
    }

    .partners-grid {
        gap: 2rem;
    }

    .partner-logo {
        height: 40px;
        max-height: 40px;
    }

    .project-item img {
        height: 200px;
    }

    .contact-form input,
    .contact-form #form-select-service {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    h3 {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 10px;
    }

    .hero {
        height: 50vh;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .contact-wrapper {
        padding: 2rem 1rem;
    }

    .footer-logo img {
        height: 30px;
    }

    .partners-grid {
        gap: 1.5rem;
    }

    .partner-logo {
        height: 35px;
        max-height: 35px;
    }

    .project-item img {
        height: 180px;
    }
}