/* Variables y reset */
:root {
    --primary-color: #1e2761; /* Color principal basado en el logo de D-Energy */
    --secondary-color: #4a69bd;
    --accent-color: #f7b731;
    --text-color: #333;
    --light-text: #fff;
    --light-bg: #f8f9fa;
    --dark-bg: #222;
    --gray-bg: #f1f2f6;
    --border-color: #e0e0e0;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 15px;
}

.section-header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.separator {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 50px;
}

.menu {
    display: flex;
    align-items: center;
}

.menu li {
    margin-left: 25px;
}

.menu li a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.menu li a:hover {
    color: var(--primary-color);
}

.btn-contacto {
    background-color: var(--primary-color);
    color: var(--light-text) !important;
    padding: 8px 20px;
    border-radius: 30px;
    transition: var(--transition);
}

.btn-contacto:hover {
    background-color: var(--secondary-color);
    color: var(--light-text) !important;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.slider {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.7);
}

.slide-content {
    color: var(--light-text);
    padding: 0 50px;
    max-width: 600px;
    position: relative;
    z-index: 1;
    margin-left: 10%;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.prev-btn, .next-btn {
    background: rgba(255, 255, 255, 0.3);
    color: var(--light-text);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 15px;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.6);
}

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--light-text);
    transform: scale(1.2);
}

/* Nosotros Section */
.nosotros {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.nosotros-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nosotros-text {
    flex: 1;
}

.nosotros-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.nosotros-text p {
    margin-bottom: 30px;
}

.nosotros-image {
    flex: 1;
    position: relative;
}

.image-overlay {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 39, 97, 0.2);
    z-index: 1;
}

.image-overlay img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.image-overlay:hover img {
    transform: scale(1.05);
}

.valores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.valor {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.valor:hover {
    transform: translateY(-5px);
}

.valor i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.valor h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* Servicios Section */
.servicios {
    padding: 100px 0;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.servicio-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-10px);
}

.servicio-card.destacado {
    border: 2px solid var(--accent-color);
    position: relative;
}

.servicio-card.destacado::before {
    content: 'Destacado';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: var(--dark-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.servicio-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.servicio-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.servicio-card p {
    margin-bottom: 20px;
}

.servicio-card ul {
    text-align: left;
    margin-bottom: 20px;
    flex-grow: 1;
}

.servicio-card ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.servicio-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.servicio-card .btn-secondary {
    align-self: center;
    margin-top: auto;
}

/* Beneficios Section */
.beneficios {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.beneficios-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.beneficio {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.beneficio:hover {
    transform: translateY(-10px);
}

.beneficio-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.beneficio h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Galería Section */
.galeria {
    padding: 100px 0;
}

.galeria-slider {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.galeria-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.galeria-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.galeria-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.1);
}

.galeria-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--light-text);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.galeria-item:hover .galeria-caption {
    transform: translateY(0);
}

.galeria-caption h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.galeria-prev, .galeria-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.galeria-prev {
    left: 10px;
}

.galeria-next {
    right: 10px;
}

.galeria-prev:hover, .galeria-next:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Testimonios Section */
.testimonios {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.testimonios-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.testimonios-slider::-webkit-scrollbar {
    display: none;
}

.testimonio-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    scroll-snap-align: start;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    transition: var(--transition);
}

.testimonio-card:hover {
    transform: translateY(-10px);
}

.testimonio-content i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.testimonio-content p {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonio-autor {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.testimonio-autor h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.testimonio-autor p {
    font-style: normal;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Contacto Section */
.contacto {
    padding: 100px 0;
}

.contacto-container {
    display: flex;
    gap: 50px;
}

.contacto-info, .contacto-form {
    flex: 1;
}

.contacto-info h3, .contacto-form h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 30px;
}

.info-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* CTA Section */
.cta {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 80px 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.cta .btn-primary {
    background-color: var(--light-text);
    color: var(--primary-color);
    border-color: var(--light-text);
}

.cta .btn-primary:hover {
    background-color: transparent;
    color: var(--light-text);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 80px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo, .footer-links, .footer-contact, .footer-newsletter {
    flex: 1;
    min-width: 250px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.footer-logo p {
    color: #aaa;
}

.footer-links h4, .footer-contact h4, .footer-newsletter h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-contact h4::after, .footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #aaa;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--light-text);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #aaa;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
}

.newsletter-input {
    display: flex;
    margin-bottom: 20px;
}

.newsletter-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: inherit;
    font-size: 1rem;
}

.newsletter-input button {
    background-color: var(--accent-color);
    color: var(--dark-bg);
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-input button:hover {
    background-color: #e6a922;
}

.social-media {
    display: flex;
    gap: 15px;
}

.social-media a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-text);
    transition: var(--transition);
}

.social-media a:hover {
    background-color: var(--accent-color);
    color: var(--dark-bg);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .galeria-item {
        flex: 0 0 calc(50% - 20px);
        min-width: calc(50% - 20px);
    }
    
    .testimonio-card {
        flex: 0 0 calc(50% - 20px);
        min-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu li {
        margin: 10px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .slide-content {
        margin-left: 0;
        text-align: center;
        padding: 0 20px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .nosotros-content {
        flex-direction: column;
    }
    
    .valores {
        grid-template-columns: 1fr;
    }
    
    .contacto-container {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .galeria-item {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .testimonio-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}