/* Variables */
:root {
    --primary-color: #1976d2;
    --primary-light: #42a5f5;
    --primary-dark: #0d47a1;
    --secondary-color: #78909c;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #ffffff;
    --background-light: #eceff1;
    --background-white: #ffffff;
    --transition-speed: 0.3s;
    --shadow-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --shadow-3: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    --shadow-4: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
    --shadow-5: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

/* Reseteo y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

section {
    padding: 80px 0;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.underline {
    height: 4px;
    width: 70px;
    background: var(--primary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--background-white);
    z-index: 1000;
    box-shadow: var(--shadow-1);
    transition: all var(--transition-speed) ease;
}

header.scrolled {
    box-shadow: var(--shadow-2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #eceff1, #e3f2fd);
    padding-top: 80px;
}

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

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

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

.cta-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    box-shadow: var(--shadow-3);
    border-radius: 8px;
    overflow: hidden;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.hero-image::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: -10px;
    right: -10px;
    background-color: rgba(25, 118, 210, 0.2);
    border-radius: 8px;
    z-index: -1;
}

/* About Section */
.about {
    background-color: var(--background-white);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background-color: rgba(25, 118, 210, 0.05);
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
    z-index: 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
    box-shadow: var(--shadow-3);
    border-radius: 8px;
    overflow: hidden;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.about-text p {
    margin-bottom: 25px;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Services Section with Bento Grid */
.services {
    background-color: var(--background-light);
    position: relative;
    overflow: hidden;
}

.services::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(25, 118, 210, 0.1);
    z-index: 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 20px;
}

.bento-item {
    background-color: var(--background-white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-1);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background-color: var(--primary-color);
    transition: height 0.3s ease;
}

.bento-item:hover {
    box-shadow: var(--shadow-3);
    transform: translateY(-5px);
}

.bento-item:hover::before {
    height: 100%;
}

.bento-item .material-icons {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.bento-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.bento-item p {
    color: var(--text-secondary);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Bento grid layout specifics */
#bento-1 {
    grid-column: 1 / 3;
    grid-row: 1;
}

#bento-2 {
    grid-column: 3 / 5;
    grid-row: 1;
}

#bento-3 {
    grid-column: 1;
    grid-row: 2;
}

#bento-4 {
    grid-column: 2 / 4;
    grid-row: 2;
}

#bento-5 {
    grid-column: 4;
    grid-row: 2;
}

#bento-6 {
    grid-column: 1 / 3;
    grid-row: 3;
    padding: 0;
}

#bento-7 {
    grid-column: 3;
    grid-row: 3;
}

#bento-8 {
    grid-column: 4;
    grid-row: 3;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--background-white);
    position: relative;
}

.testimonials::before {
    content: '"';
    position: absolute;
    top: 50px;
    left: 10%;
    font-size: 200px;
    color: rgba(25, 118, 210, 0.05);
    font-family: Georgia, serif;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.testimonial-item.active {
    display: block;
}

.testimonial-content {
    background-color: var(--background-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-2);
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.testimonial-content::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--background-light);
    transform: rotate(45deg);
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 30px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
}

.testimonial-author h4 {
    font-weight: 500;
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--text-secondary);
    margin: 0;
    font-style: normal;
    font-size: 0.9rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.prev-button,
.next-button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all var(--transition-speed) ease;
}

.prev-button:hover,
.next-button:hover {
    color: var(--primary-dark);
}

.slider-dots {
    display: flex;
    gap: 10px;
    margin: 0 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    opacity: 0.3;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.dot.active {
    opacity: 1;
    background-color: var(--primary-color);
}

/* Contact Section */
.contact {
    background: linear-gradient(to bottom right, var(--background-light) 50%, rgba(25, 118, 210, 0.08) 50%);
}

.contact-content {
    display: flex;
    gap: 40px;
}

.contact-info,
.contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item .material-icons {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.social-media {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.social-icon:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

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

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    background-color: var(--background-white);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Footer */
footer {
    background-color: #263238;
    color: var(--text-light);
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-links-column h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-links-column ul li {
    margin-bottom: 10px;
}

.footer-links-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-speed) ease;
}

.footer-links-column ul li a:hover {
    color: var(--text-light);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom .material-icons {
    font-size: 0.9rem;
    color: #f44336;
    vertical-align: middle;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    border: none;
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.logo h1 {
    animation: pulse 2s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #bento-1, #bento-2, #bento-3, #bento-4, #bento-5, #bento-6, #bento-7, #bento-8 {
        grid-column: auto;
        grid-row: auto;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
    
    .footer-links-column {
        flex-basis: 45%;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--background-white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: var(--shadow-1);
        transform: translateY(-150%);
        transition: transform var(--transition-speed) ease;
        z-index: 999;
    }
    
    nav ul.active {
        transform: translateY(0);
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links-column {
        flex-basis: 100%;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 90px; /* Adjust as needed to not overlap with backToTop */
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366; /* WhatsApp green */
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: var(--shadow-3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.whatsapp-float:hover {
    background-color: #1da851; /* Darker green on hover */
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px; /* Adjust image size */
    height: 35px;
    vertical-align: middle;
}