/* Global Styles */
:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --white-color: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
    overflow-x: hidden;
}

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

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto 50px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

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

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

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

/* 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;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.navbar .nav-links {
    display: flex;
    list-style: none;
}

.navbar .nav-links li {
    margin-left: 30px;
}

.navbar .nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar .nav-links a:hover {
    color: var(--primary-color);
}

.navbar .nav-links a.active {
    color: var(--primary-color);
}

.navbar .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
}

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

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-color);
}

.typed-text {
    color: var(--primary-color);
    font-weight: 600;
    border-right: 3px solid var(--primary-hover);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray-color);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image {
    width: 100%;
    height: 400px;
    background-color: #f0f2ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: float 6s ease-in-out infinite;
}

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

/* Servicios Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-description {
    color: var(--gray-color);
}

/* Portafolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white-color);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    bottom: 0;
}

.portfolio-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

/* Nosotros Section */
.nosotros .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.nosotros-content {
    flex: 1;
}

.nosotros-text {
    margin-bottom: 20px;
    color: var(--gray-color);
}

.nosotros-image {
    flex: 1;
    text-align: center;
}

.nosotros-image img {
    max-width: 100%;
    height: auto;
}

/* Contacto Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo .logo {
    color: var(--white-color);
}

.footer-logo .logo span {
    color: var(--primary-color);
}

.footer-logo p {
    margin-top: 10px;
    color: var(--gray-color);
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

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

.footer-links ul li a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact ul li i {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white-color);
    transition: var(--transition);
}

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

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

/* Scroll Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background-color: var(--primary-hover);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container,
    .nosotros .container {
        flex-direction: column;
    }
    
    .hero-content,
    .nosotros-content {
        text-align: center;
        margin-bottom: 50px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .navbar .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }
    
    .navbar .nav-links.active {
        left: 0;
    }
    
    .navbar .nav-links li {
        margin: 15px 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}