:root {
    --primary-color: #2c5282;
    --secondary-color: #4a5568;
    --accent-color: #3182ce;
    --background-color: #ffffff;
    --text-color: #2d3748;
    --light-gray: #f7fafc;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

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

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('hero.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    margin-top: 3rem;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.cta-button:hover {
    background-color: var(--primary-color);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Experience Section */
.experience {
    padding: 60px 0;
    background: linear-gradient(135deg, #f6f9fc 0%, #edf2f7 100%);
    position: relative;
    overflow: hidden;
}

.experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(49, 130, 206, 0.2), transparent);
}

.experience::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(49, 130, 206, 0.2), transparent);
}

.experience h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
}

.experience h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience h2.active::after {
    opacity: 1;
}

/* Accordion styles */
.accordion-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: var(--accent-color);
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.timeline.expanded {
    max-height: 3000px;
    transition: max-height 0.8s ease-in;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(49, 130, 206, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline.expanded::after {
    opacity: 1;
}

.timeline-item {
    padding: 5px 30px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    margin-bottom: 15px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 15px;
    background: white;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 90%;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(49, 130, 206, 0.5);
}

.timeline-item.left::before {
    right: -8px;
}

.timeline-item.right::before {
    left: -8px;
}

.timeline-content .date {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 1rem;
}

.timeline-content p {
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.3;
}

.timeline-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: var(--accent-color);
    opacity: 0.5;
    font-size: 1rem;
}

/* Animation for timeline items */
.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive design for timeline */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 0;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 30px;
        padding-right: 15px;
        margin-bottom: 10px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item::before {
        left: -8px;
    }
    
    .timeline-item.left::before {
        right: auto;
        left: -8px;
    }

    .timeline-item.right::before {
        left: -8px;
    }

    .timeline-content {
        max-width: 100%;
    }
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.services-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: nowrap;
    padding: 0 20px;
}

.service-card {
    background: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    flex: 1;
    min-width: 0; /* Permite que las tarjetas se reduzcan si es necesario */
}

.service-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-card p {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.more-info {
    padding: 6px 15px;
    font-size: 0.8rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Responsive design for services */
@media screen and (max-width: 1200px) {
    .services-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .service-card {
        flex: 1 1 200px;
        max-width: 250px;
    }
}

@media screen and (max-width: 768px) {
    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        width: 100%;
        max-width: 300px;
    }
}

/* Education Section */
.education {
    padding: 80px 0;
}

.education-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.education-item {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.education-item .year {
    color: var(--accent-color);
    font-weight: 600;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

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

.submit-button {
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: var(--primary-color);
}

.contact-info {
    padding: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 15px;
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.whatsapp-button i {
    font-size: 2rem;
}

.whatsapp-button:hover {
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    justify-content: center;
    align-items: center;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.7) translateY(-30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.modal-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.1s;
}

.modal-description {
    color: var(--secondary-color);
    line-height: 1.6;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.2s;
}

.modal.show .modal-title,
.modal.show .modal-description {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 0;
}

.footer p {
    margin: 0;
    font-size: 0.95rem;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
        margin-top: 4rem;
    }
    .cta-button {
        margin-top: 1rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer p {
        font-size: 0.85rem;
    }
}
