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

:root {
    --primary-purple: #3d1a5f;
    --mid-purple: #7d2d8e;
    --magenta: #b4379d;
    --pink: #e63f9e;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --text-dark: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-purple), var(--mid-purple));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo-image {
    height: 45px;
    width: auto;
    background: white;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--magenta), var(--pink));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--pink);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--mid-purple) 50%, var(--magenta) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".1" fill="%23ffffff"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--pink), var(--magenta));
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 63, 158, 0.4);
}

/* Courses Section */
.courses {
    padding: 5rem 2rem;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-purple);
    margin-bottom: 3rem;
}

.courses-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--magenta);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(125, 45, 142, 0.2);
}

.course-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--mid-purple), var(--magenta));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.course-card h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.course-card p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.course-features {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-features li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 1.5rem;
}

.course-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--magenta);
    font-weight: bold;
}

.learn-more {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--mid-purple), var(--magenta));
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s;
    margin-top: auto;
    text-align: center;
    align-self: flex-start;
}

.learn-more:hover {
    transform: scale(1.05);
}

/* Portfolio Section */
.portfolio-grid {
    padding: 0 2rem;
}

.portfolio-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(125, 45, 142, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--light-gray), #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.portfolio-img[loading="lazy"] {
    opacity: 0;
}

.portfolio-img.loaded,
.portfolio-img[loading="lazy"]:not([src]) {
    opacity: 1;
}

/* Placeholder mientras carga */
.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-gray), #e0e0e0);
    z-index: -1;
}

.portfolio-placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.portfolio-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-content h3 {
    color: var(--primary-purple);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.tag {
    background: linear-gradient(135deg, var(--mid-purple), var(--magenta));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.portfolio-content p {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    background: var(--white);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-item h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--mid-purple));
    color: var(--white);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-container p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

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

.submit-button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--pink), var(--magenta));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.submit-button:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: var(--primary-purple);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--pink);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--pink);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    padding: 0.5rem;
}

.social-links a:hover {
    background: var(--magenta);
    transform: scale(1.1);
}

.social-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-purple);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}