/* --- VARIABLES DE DISEÑO Y TEMAS --- */
:root {
    /* Tema Claro (Default) */
    --bg-primary: #f9f9f9;
    --bg-secondary: #ffffff;
    --bg-dark: #222;
    --bg-footer: #333;
    --text-primary: #333;
    --text-secondary: #777;
    --text-light: #fff;
    --accent-cyan: #00bcd4;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hero-bg-overlay: rgba(0, 0, 0, 0.5);
    --btn-primary: var(--accent-cyan);
    --btn-primary-text: var(--text-light);
    --link-primary: var(--accent-cyan);
    --link-hover: #008ba7;
    --service-card-bg: var(--bg-secondary);
    --service-card-shadow: var(--shadow-color);
}

.dark-mode {
    /* Tema Oscuro */
    --bg-primary: #181818;
    --bg-secondary: #222;
    --bg-dark: #333;
    --bg-footer: #111;
    --text-primary: #eee;
    --text-secondary: #bbb;
    --text-light: #fff;
    --border-color: #555;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hero-bg-overlay: rgba(0, 0, 0, 0.8);
    --btn-primary: var(--accent-cyan);
    --btn-primary-text: var(--bg-dark);
    --link-primary: var(--accent-cyan);
    --link-hover: #008ba7;
    --service-card-bg: #333;
    --service-card-shadow: var(--shadow-color);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
}

section {
    padding: 80px 20px;
}

.py-5 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

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

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

.bg-dark {
    background-color: var(--bg-dark);
}

.text-light {
    color: var(--text-light);
}

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

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

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 700px;
    line-height: 1.7;
    margin-left: auto;
    margin-right: auto;
}

/* --- HEADER Y NAVEGACIÓN --- */
.header {
    position: relative;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 20px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.dark-mode .navbar {
    background-color: rgba(34, 34, 34, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: color 0.3s;
}

.theme-toggle-btn:hover {
    color: var(--accent-cyan);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hero-bg-overlay);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.hero-content h1 span {
    color: var(--accent-cyan);
}

.hero-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn {
    background-color: var(--btn-primary);
    color: var(--btn-primary-text);
    padding: 15px 30px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

/* --- SECCIÓN DE SERVICIOS (CAROUSEL) --- */
.section-services {
    background-color: var(--bg-primary);
}

.services-carousel {
    margin-top: 30px;
    padding-bottom: 50px;
}

.service-card {
    background-color: var(--service-card-bg);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 8px var(--service-card-shadow);
    margin: 0 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--service-card-shadow);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.service-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.learn-more {
    display: inline-block;
    text-decoration: none;
    color: var(--link-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.learn-more:hover {
    color: var(--link-hover);
}

.slick-dots {
    text-align: center;
    margin-top: 30px;
}

.slick-dots li {
    display: inline-block;
    margin: 0 10px;
}

.slick-dots button {
    font-size: 0;
    line-height: 0;
    display: block;
    width: 20px;
    height: 20px;
    padding: 5px;
    cursor: pointer;
    color: transparent;
    border: 0;
    outline: none;
    background: var(--border-color);
    border-radius: 50%;
    transition: background-color 0.3s;
}

.slick-dots li.slick-active button {
    background-color: var(--accent-cyan);
}

/* --- SECCIÓN DE MARCAS --- */
.section-brands {
    padding: 60px 20px;
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

.brand-logo img {
    height: 50px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s, opacity 0.3s;
}

.brand-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.dark-mode .brand-logo img {
    filter: grayscale(100%) invert(0.8);
}

.dark-mode .brand-logo img:hover {
    filter: invert(0);
}

/* --- SECCIÓN NOSOTROS --- */
.section-about {
    background-color: var(--bg-primary);
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    text-align: left;
}

.values-list {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.value-item {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.value-item i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

/* --- SECCIÓN CONTACTO --- */
.section-contact {
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    text-align: left;
}

.contact-info p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.contact-info i {
    color: var(--accent-cyan);
    margin-right: 8px;
}

.btn-contact {
    display: inline-block;
    background-color: #25D366;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.btn-contact:hover {
    background-color: #198c5a;
}

.contact-form {
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.form-group textarea {
    min-height: 100px;
}

.btn-submit {
    background-color: var(--btn-primary);
    color: var(--btn-primary-text);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
    background-color: #00a7b3;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 188, 212, 0.3);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 20px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* --- BOTÓN DE WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 2rem;
    z-index: 1000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background-color 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #198c5a;
}

/* --- DISEÑO RESPONSIVO --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 20px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .dark-mode .nav-links {
        background-color: rgba(34, 34, 34, 0.95);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin-bottom: 10px;
    }

    .menu-toggle {
        display: block;
    }
    
    .section-title {
        font-size: 2.2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .values-list {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .contact-info {
        text-align: center;
        margin-bottom: 30px;
    }
}

/* --- ESTILOS DE SLICK CAROUSEL --- */
.slick-track {
    display: flex !important;
}

.slick-slide {
    height: auto !important;
}

/* --- ESTILOS PARA PÁGINA DE PROYECTOS (GALERÍA) --- */
.header-secondary + main {
    padding-top: 80px;
}

#portfolio-hero {
    background-color: var(--bg-secondary);
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

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

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.project-info p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* --- ESTILOS PARA DETALLE DE PROYECTO (NUEVO DISEÑO) --- */
.project-header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.project-header-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 25px var(--shadow-color);
}

.project-header-details {
    text-align: left;
}

.project-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: left; /* Anula el centrado general */
}

.project-meta {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.project-meta li {
    margin-bottom: 8px;
}

.project-meta strong {
    color: var(--text-primary);
}

.project-intro {
    font-size: 1.1rem;
    line-height: 1.8;
}

.project-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.project-section {
    margin-bottom: 40px;
}

.project-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-cyan);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.project-section h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
}

.project-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .project-header-grid {
        grid-template-columns: 1fr;
    }
    .project-title {
        font-size: 2.2rem;
        text-align: center;
    }
    .project-header-details {
        text-align: center;
    }
    .project-meta {
        display: inline-block;
        text-align: left;
    }
}

/* --- ESTILOS PARA PÁGINA DE BLOG (GALERÍA) --- */
#blog-hero {
    background-color: var(--bg-secondary);
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.article-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.article-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Para que el contenido ocupe el espacio y el botón quede abajo */
}

.article-category {
    display: inline-block;
    background-color: var(--accent-cyan);
    color: var(--btn-primary-text);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    align-self: flex-start;
}

.article-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.article-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    flex-grow: 1; /* Empuja el botón "Leer más" hacia abajo */
}

.read-more {
    color: var(--link-primary);
    font-weight: 600;
    margin-top: 15px;
    align-self: flex-start;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--link-hover);
}

/* --- ESTILOS PARA PÁGINA DE ARTÍCULO INDIVIDUAL --- */
.article-container {
    max-width: 800px;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-title {
    font-size: 2.8rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-meta {
    font-size: 1rem;
    color: var(--text-secondary);
}

.article-main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 40px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-cyan);
    padding-bottom: 10px;
}

.article-content ul {
    list-style-position: inside;
    padding-left: 10px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content a {
    color: var(--link-primary);
    text-decoration: none;
    font-weight: 600;
}

.article-content a:hover {
    text-decoration: underline;
}

/* --- LOGOS DUALES --- */
.nav-logo img {
    height: 80px;
    width: auto;
    display: none; /* Ocultamos ambos inicialmente */
}

/* Solo mostramos el logo claro por defecto */
.nav-logo .logo-light {
    display: block;
}

/* En modo oscuro mostramos solo el oscuro */
.dark-mode .nav-logo .logo-light {
    display: none;
}
.dark-mode .nav-logo .logo-dark {
    display: block;
}

