﻿/* ======================================================================================================
                                                   VARIABLES Y RESET
   ====================================================================================================== */
:root {
    --primary-color: #3a86ff;       /* Azul principal (se usa en botones, enlaces activos, títulos, etc.) */
    --primary-dark: #2667cc;        /* Azul más oscuro (hover en botones/enlaces) */
    --secondary-color: #8338ec;     /* Morado secundario (secciones destacadas, botones secundarios) */
    --accent-color: #ff006e;        /* Rosa de acento (categorías, etiquetas) */
    --light-color: #f8f9fa;         /* Fondo principal claro */
    --dark-color: #212529;          /* Texto oscuro principal */
    --gray-color: #6c757d;          /* Texto secundario gris */
    --light-gray: #e9ecef;          /* Fondos grises claros */
    --success-color: #28a745;       /* Verde (para estados de éxito, validaciones) */
    --font-main: 'Poppins', sans-serif;       /* Fuente principal (titulares, botones) */
    --font-secondary: 'Open Sans', sans-serif;/* Fuente secundaria (texto largo) */
    --transition: all 0.3s ease;    /* Transición estándar para animaciones */
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);       /* Sombra estándar */
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);/* Sombra en hover */
}

/* Reset global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Hace que padding y border se incluyan en el ancho total */
}

html {
    scroll-behavior: smooth; /* Efecto suave en los scrolls */
}

body {
    font-family: var(--font-secondary);
    color: var(--dark-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* Titulares */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Enlaces */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Listas sin viñetas */
ul {
    list-style: none;
}

/* Imágenes fluidas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/*========================================================= Contenedor general */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

/* ==========================================================BOTÓN FLOTANTE WHATSAPP*/
 
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366; /* Verde WhatsApp */
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128c7e; /* Verde oscuro */
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
    margin-top: 5px;
}

/* =================================================================BOTONES GENERALES */
  
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    font-family: var(--font-main);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: #6a2bc4; /* Morado más oscuro */
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* ========================================================================================================================================
                                                                    HEADER
   ====================================================================================================================================== */
.header {
    background-color: white;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo --------------------------------------------------------*/

/*.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}
.logo span {
    font-size: 0.8rem;
    color: var(--gray-color);
    display: block;
    font-family: var(--font-secondary);
}
*/
.logo {
    display: inline-block;
}

.logo img {
    width: 150px;   /* tamaño por defecto en escritorio */
    max-width: 100%; 
    height: auto;
    display: block;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .logo img {
        width: 100px;  /* más pequeño en móvil */
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 80px;   /* aún más pequeño en móviles muy pequeños */
    }
}

}

/* Navbar ------------------------------------------------------*/

.navbar ul {
    display: flex;
}
.navbar ul li {
    margin-left: 2rem;
}
.navbar ul li a {
    font-family: var(--font-main);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    color: var(--dark-color);
}
.navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}
.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--primary-color);
}
.navbar ul li a:hover::after,
.navbar ul li a.active::after {
    width: 100%; /* Línea debajo del enlace */
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* ========================================================================================================================================
                                     HERO SECTION
											Hero Section” se refiere generalmente a la sección principal o destacada de una página web, 
											normalmente situada al inicio. 
											Es donde suele ir una imagen grande, un título llamativo, un subtítulo y, a veces, un botón de acción. 
											En términos visuales, es lo primero que ve el usuario al entrar en la web.
   ======================================================================================================================================= */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, rgba(58, 134, 255, 0.9) 0%, rgba(131, 56, 236, 0.9) 100%);
    color: white;
    min-height: 80vh;
    display: flex;
    align-items: center;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: white;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}
.hero-buttons {
    display: flex;
    gap: 1rem;
}
.hero-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow-hover);
}
.hero-image img {
    width: 100%;
    border-radius: 10px;
}

/* =======================
   FEATURES    		características”, “funcionalidades” o “ventajas
   ======================= */
.features {
    padding: 5rem 0;
    background-color: white;
}
.section-title {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    color: var(--dark-color);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* -----------------------------------------------------Cards de características ----------------------------------------------------------------------*/

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--primary-color);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}
.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}
.feature-card p {
    color: var(--gray-color);
}


/* ----------------------------------------------Services preview ---------------------------------------------------------------------------------------------*/

.services-preview {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.service-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.service-tag.electricidad {
    background-color: var(--primary-color);
}

.service-tag.renovables {
    background-color: var(--accent-color);
}

.service-tag.domotica {
    background-color: var(--secondary-color);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: var(--dark-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.service-content p {
    color: var(--gray-color);
    margin-bottom: 1.2rem;
}

/* --------------------------------------Testimonials------------------------------------------------------------------------ */
.testimonials {
    padding: 5rem 0;
    background-color: white;
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
}

.testimonial {
    min-width: 100%;
    scroll-snap-align: start;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
}

.rating {
    color: #ffc107;
    margin-bottom: 1rem;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.testimonial-author strong {
    display: block;
    color: var(--dark-color);
}

.testimonial-author span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* --------------------------------------------------CTA section 	“Call To Action”, o en español: “llamada a la acción”.  */
.cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* ------------------------------------------------------------------Footer --------------------------------------------------------------------------------------------*/

.footer {
    background-color: var(--dark-color);
    padding: 4rem 0 0;
    color: var(--light-gray);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--light-gray);
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--gray-color);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.schedule li {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.schedule span:first-child {
    font-weight: 600;
    color: var(--light-gray);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    color: var(--light-gray);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    color: white;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.legal-links a:hover {
    color: var(--primary-color);
}

/*--------------------------------------------------------------- Responsive design ------------------------------------------------------------------------------------------*/

@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .navbar ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .navbar ul.show {
        display: flex;
    }
    
    .navbar ul li {
        margin: 0;
        padding: 0.5rem 1.5rem;
    }
    
    .navbar ul li a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}
/*=======================================================================================================================================================
------------------------------------------------Estilos específicos para Sobre mí ----------------------------------------------------------------------------------------------*/
.about-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, rgba(58, 134, 255, 0.1) 0%, rgba(131, 56, 236, 0.1) 100%);
    text-align: center;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin: 2rem auto;
    box-shadow: var(--box-shadow);
}

.about-timeline {
    padding: 5rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 1rem 2rem;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-year {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 1rem;
}

.about-values {
    padding: 5rem 0;
    background: var(--light-gray);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-personal {
    padding: 5rem 0;
    background: white;
}

.personal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.personal-image img {
    border-radius: 10px;
    box-shadow: var(--box-shadow-hover);
}

.about-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
    color: white;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .personal-content {
        grid-template-columns: 1fr;
    }
    
    .personal-image {
        order: -1;
    }
}