/* Variables */
:root {
    /* Colores principales */
    --primary-color: #2f852a;
    --primary-dark: #246820;
    --primary-light: #3aa234;
    
    /* Colores complementarios */
    --accent-color: #852f34;
    --secondary-color: #2a8580;
    
    /* Tonos neutros */
    --light-color: #f4f8f4;
    --dark-color: #1a1a1a;
    --gray-color: #666666;
    
    /* Colores de estado */
    --success-color: var(--primary-color);
    --hover-color: var(--primary-dark);
    
    /* Fondos */
    --light-bg: #e8f5e7;
    --dark-bg: #1c291b;
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background-color: transparent;
}

.navbar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 40px;
    margin-right: 1rem;
    transition: var(--transition);
}

.navbar-brand {
    color: white;
    font-weight: 150;
    letter-spacing: 1px;
    margin: 0;
}

.navbar-toggler {
    z-index: 1031;
    position: relative;
    border: none;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.navbar-scrolled {
    background-color: var(--primary-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-logo {
    height: 40px;
    margin-right: 1rem;
    transition: var(--transition);
}

.navbar-brand {
    color: white;
    font-weight: 150;
    letter-spacing: 1px;
    margin: 0;
    font-size: 1.5rem;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--light-bg) !important;
}

@media (max-width: 576px) {
    .navbar > .container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }

    .navbar-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 0.5rem;
    }

    .navbar-brand-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0.5rem;
    }

    .navbar-brand {
        font-size: 0.85rem;
        margin-top: 0.5rem;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
        width: 100%;
        padding: 0 0.5rem;
    }

    .navbar-logo {
        height: 30px;
        margin-right: 0;
    }

    .navbar-toggler {
        padding: 0.25rem;
        position: relative;
        right: 0;
        border: none;
    }
}

@media (max-width: 320px) {
    .navbar-brand {
        font-size: 0.75rem;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--primary-color);
        padding: 6rem 2rem 2rem;
        z-index: 1030;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100%);
    }

    .navbar-collapse.show {
        transform: translateY(0);
    }

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

    .nav-item {
        margin: 1rem 0;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.5rem 0;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        background-image: none;
        position: relative;
    }

    .navbar-toggler-icon:before {
        content: '☰';
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    .navbar.navbar-scrolled .navbar-toggler-icon:before {
        color: white;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-brand img {
        height: 35px;
        margin-right: 8px;
    }

    .navbar > .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
        max-width: 60%;
    }

    .navbar-brand img {
        height: 30px;
        margin-right: 6px;
    }
}

/* Page Header */
.page-header {
    padding: 8rem 0 5rem;
    background: var(--dark-color);
    color: white;
    text-align: center;
}

.page-header .page-title {
    font-size: 3rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 5rem;
    background: var(--dark-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-image-container {
    position: relative;
    padding: 2rem;
}

.floating-tech-icons {
    position: absolute;
    top: 95%;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 2rem;
    color: var(--secondary-color);
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Services Section */
.services-section {
    padding: 6rem 0;
    background: var(--light-color);
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-card.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.featured .service-icon {
    background: white;
    color: var(--primary-color);
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.featured .service-features li::before {
    color: white;
}

/* Tech Section */
.tech-section {
    padding: 6rem 0;
    background: white;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--light-color);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tech-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Projects Section */
.projects-section {
    padding: 6rem 0;
    background: var(--light-color);
}

.project-card {
    height: 100%;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-color: var(--light-bg);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card .card-img-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-card .card-img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-img-container::after {
    opacity: 1;
}

.project-card .project-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-link {
    opacity: 1;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
}

.project-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.project-card .card-body h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-card .card-body p {
    color: #666;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.project-tech span {
    background: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.testimonials-section .section-header {
    margin-bottom: 3rem;
}

.testimonials-section .section-header h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.testimonials-section .section-header .lead {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    color: #666;
}

.testimonial-card {
    background: transparent;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease;
    text-align: center;
    box-shadow: none;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.testimonial-stars {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    text-align: center;
    font-size: 1.1rem;
}

.testimonial-position {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    margin: 0 auto;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: white;
}

.contact-info {
    padding-right: 3rem;
}

.contact-methods {
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-method:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contact-method i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.contact-method.whatsapp {
    background: #25D366;
    color: white;
}

.contact-form {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

/* Mapa de Google */
.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* Proporción 4:3 */
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .map-container {
        padding-bottom: 100%; /* Proporción 1:1 en móviles */
    }
}

/* WhatsApp Button */
#whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background-color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#whatsapp-button:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

#whatsapp-button i {
    font-size: 35px;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: var(--dark-bg);
    color: white;
}

.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(10px);
}

.social-links a {
    color: var(--light-color);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-light);
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline-light {
    border: 2px solid white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-info {
        padding-right: 0;
        margin-bottom: 3rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        text-align: center;
        padding: 6rem 0 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
