/* General Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #0056b3;
    --accent-color: #ff8c00;
    --text-color: #333;
    --light-text-color: #f8f9fa;
    --background-color: #ffffff;
    --section-bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --header-base-height: 70px;
    --header-mobile-height: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: var(--text-color); background-color: var(--background-color); padding-top: var(--header-base-height); font-size: 16px; }
html { scroll-behavior: smooth; }
.container { width: 90%; max-width: 1100px; margin: 0 auto; }
h1, h2, h3, h4 { margin-bottom: 0.75em; color: var(--primary-color); font-weight: 600; }
h1 { font-size: 2.8em; } h2 { text-align: center; font-size: 2.2em; margin-bottom: 1.2em; }
h3 { font-size: 1.5em; } h4 { font-size: 1.2em; margin-bottom: 0.5em; }
p { margin-bottom: 1em; font-size: 1em; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language Switcher */
.language-switcher { position: fixed; top: 15px; right: 15px; z-index: 1002; background-color: rgba(255, 255, 255, 0.9); padding: 5px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.lang-btn { background: none; border: 1px solid transparent; padding: 6px 10px; cursor: pointer; font-size: 0.85em; color: var(--primary-color); border-radius: 3px; transition: background-color 0.2s, color 0.2s; }
.lang-btn:hover { background-color: rgba(0,123,255,0.1); }
.lang-btn.active { font-weight: bold; background-color: var(--primary-color); color: white; }

/* Header */
header { background-color: var(--background-color); box-shadow: 0 2px 5px rgba(0,0,0,0.08); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; height: var(--header-base-height); }
header nav { display: flex; justify-content: space-between; align-items: center; padding: 0 5%; height: 100%; max-width: 1200px; margin: 0 auto; }
.logo img { height: 40px; width: auto; }
.logo a { display: flex; align-items: center; font-size: 1.4em; font-weight: bold; }
.nav-menu-wrapper { display: flex; align-items: center; }
.nav-links { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-links li { margin-left: 25px; }
.nav-links a { font-weight: 500; font-size: 0.95em; transition: color 0.2s ease; padding-bottom: 5px; }
.nav-links a:hover, .nav-links a.active-link { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); }
.header-contact { margin-left: 30px; }
.header-contact .phone-number { font-weight: bold; font-size: 1em; display: inline-flex; align-items: center; }
.header-contact .phone-number i { margin-right: 8px; font-size: 1.1em; }
.mobile-nav-toggle { display: none; background: none; border: none; font-size: 1.8em; color: var(--primary-color); cursor: pointer; z-index: 1005; }

/* Hero Section */
#hero { background: url('img/hero-background.webp') no-repeat center center/cover; color: var(--light-text-color); min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; position: relative; }
#hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.55); }
.hero-content { position: relative; z-index: 1; max-width: 750px; }
.hero-content h1 { font-size: 2.8em; margin-bottom: 0.4em; color: #fff; line-height: 1.2; }
.hero-content p { font-size: 1.15em; margin-bottom: 1.8em; max-width: 600px; margin-left:auto; margin-right:auto; }
.cta-button { background-color: var(--accent-color); color: #fff; padding: 14px 28px; text-decoration: none; font-weight: bold; border-radius: 5px; transition: background-color 0.2s ease, transform 0.2s ease; font-size: 1.05em; border: none; cursor: pointer; display: inline-block; }
.cta-button:hover { background-color: #e67e00; transform: translateY(-2px); }

/* Services Section */
#services { padding: 50px 20px; background-color: var(--section-bg-light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 25px; max-width: 1200px; margin: 20px auto 0; }
.service-item { background-color: var(--background-color); padding: 20px; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,0.07); text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; }
.service-item:hover { transform: translateY(-4px); box-shadow: 0 5px 12px rgba(0,0,0,0.1); }
.service-item img { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: 15px; }
.service-item h3 { margin-top: 0; margin-bottom: 0.5em; color: var(--primary-color); font-size: 1.3em; }
.service-item p { font-size: 0.9em; flex-grow: 1; }

/* About Us Section */
#about { padding: 50px 20px; }
#about .about-content { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; max-width: 1100px; margin: 0 auto; }
#about .about-text { flex: 1.2; min-width: 300px; }
#about .about-image { flex: 0.8; min-width: 280px; }
#about .about-image img { border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Testimonials Section */
#testimonials {
    padding: 50px 20px;
    background-color: var(--background-color); 
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto 0;
}
.testimonial-item {
    background-color: var(--section-bg-light); 
    padding: 25px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.07);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 15px;
    border: 3px solid var(--primary-color); 
}
.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.6;
    flex-grow: 1; 
}
.testimonial-author {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.9em;
}
.testimonial-stars {
    color: #FFD700; 
    font-size: 1.1em;
}
.testimonial-stars .fas, 
.testimonial-stars .far,
.testimonial-stars .fa-star-half-alt {
    margin: 0 2px;
}

/* Contact Section */
#contact { padding: 50px 20px; background-color: var(--section-bg-light); }
.contact-intro { text-align: center; font-size: 1.05em; margin-bottom: 1.5em; max-width: 600px; margin-left: auto; margin-right: auto; }
.contact-container { display: flex; flex-wrap: wrap; gap: 30px; max-width: 1100px; margin: 0 auto; background-color: var(--background-color); padding: 25px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.contact-form { flex: 1.5; min-width: 300px; }
.contact-info { flex: 1; min-width: 280px; padding-left: 15px; }
.contact-form label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9em; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.95em; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0,123,255,.2); }
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-info h3 { margin-top: 0; font-size: 1.4em; }
.contact-info h4 { margin-top: 1.5em; font-size: 1.15em; }
.contact-info p { margin-bottom: 0.8em; font-size: 0.95em; display: flex; align-items: center; }
.contact-info p i { color: var(--primary-color); margin-right: 12px; width: 20px; text-align: center; font-size: 1.1em; }
.contact-info .quick-actions { margin-top: 15px; }

/* Quick Actions Buttons */
.quick-actions { display: flex; flex-direction: column; gap: 12px; }
.action-button { display: flex; align-items: center; justify-content: center; padding: 12px 15px; border-radius: 5px; text-decoration: none; font-weight: 500; transition: background-color 0.2s ease, transform 0.2s ease; color: #fff; text-align: center; font-size: 0.95em; min-height: 44px; }
.action-button:hover { transform: translateY(-2px); }
.action-button i { margin-right: 10px; font-size: 1.1em; }
.action-button.call-now .fa-phone-alt { transform: scaleX(-1); }
.action-button.call-now { background-color: var(--primary-color); }
.action-button.call-now:hover { background-color: var(--secondary-color); }
.action-button.whatsapp { background-color: #25D366; }
.action-button.whatsapp:hover { background-color: #1DAE54; }
.action-button.sms { background-color: #5bc0de; }
.action-button.sms:hover { background-color: #31b0d5; }

/* Footer */
footer { text-align: center; padding: 20px; background-color: #2c3e50; color: var(--light-text-color); font-size: 0.85em; }
footer p { margin-bottom: 0; }

/* Responsive Design - Mobile First Approach */
@media (min-width: 600px) {
    .quick-actions { flex-direction: row; }
    .action-button { flex-grow: 1; }
}

@media (max-width: 850px) {
    body { padding-top: var(--header-mobile-height); }
    header { height: var(--header-mobile-height); }
    .language-switcher { top: 12px; right: 60px; }
    .mobile-nav-toggle { display: block; margin-left: 15px; }
    .nav-menu-wrapper { display: none; position: absolute; top: var(--header-mobile-height); left: 0; width: 100%; background-color: #fff; flex-direction: column; align-items: center; padding: 20px 0; box-shadow: 0 3px 5px rgba(0,0,0,0.1); border-top: 1px solid var(--border-color); }
    .nav-menu-wrapper.active { display: flex; }
    .nav-links { flex-direction: column; align-items: center; width: 100%; }
    .nav-links li { margin: 0; width: 100%; text-align: center; } /* Aquí se agrega el link a testimonios, el JS lo manejará */
    .nav-links a { display: block; padding: 12px 20px; width: 100%; border-bottom: 1px solid var(--section-bg-light); }
    .nav-links a:hover, .nav-links a.active-link { color: var(--primary-color); background-color: var(--section-bg-light); border-bottom-color: var(--primary-color); }
    .header-contact { margin-left: 0; margin-top: 20px; text-align: center; padding: 10px 20px; border-top: 1px solid var(--border-color); width:100%; }
    .header-contact .phone-number { font-size: 1em; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }
    .hero-content h1 { font-size: 2em; }
    .hero-content p { font-size: 1em; }
    #hero { min-height: 60vh; padding: 40px 15px; }
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .service-item { padding: 15px; }
    .service-item img { height: 160px; }
    #about .about-content { flex-direction: column; gap: 20px; }
    #about .about-text { order: 1; }
    #about .about-image { order: 2; margin-top: 15px; }
    .testimonial-item { padding: 20px 15px; } /* Ajustes para testimonios en móvil */
    .testimonial-text { font-size: 0.9em; }
    .testimonial-avatar { width: 70px; height: 70px; }
    .contact-container { flex-direction: column; gap: 25px; padding: 20px; }
    .contact-info { padding-left: 0; }
    .contact-info h3, .contact-info h4 { text-align: center; }
    .contact-info p { justify-content: center; }
    .action-button { font-size: 0.9em; }
}

@media (max-width: 480px) {
    .language-switcher { right: 50px; padding: 3px; top:14px }
    .lang-btn { padding: 5px 8px; font-size: 0.8em; }
    body { font-size: 15px; }
    .hero-content h1 { font-size: 1.7em; }
    .hero-content p { font-size: 0.95em; }
    .cta-button { padding: 12px 22px; font-size: 0.95em; }
    #services, #about, #testimonials, #contact { padding: 35px 15px; } /* Incluye #testimonials aquí */
    h2 { font-size: 1.6em; }
    h3 { font-size: 1.2em; }
    .service-item p { font-size: 0.85em; }
}