:root {
    --primary-blue: #2563eb;
    --success-green: #10b981;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 500;
    color: var(--dark);
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-blue);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

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

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

.btn-primary:hover {
    background: #1d4ed8;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(37, 99, 235, 0.8), rgba(37, 99, 235, 0.7)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    font-size: 1rem;
}

.hero-search button {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0 2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-search button:hover {
    background: #1d4ed8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Categories Section */
.categories {
    padding: 4rem 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

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

.category-card {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.course-count {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Subcategories Section */
.subcategories {
    padding: 2rem 0 4rem; /* Menos padding superior ya que va debajo de categorías */
}

.subcategories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.subcategory-tag {
    background-color: var(--light-gray);
    color: var(--dark);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.subcategory-tag:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Featured Courses */
.featured-courses {
    padding: 4rem 0;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.course-instructor {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.instructor-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
    margin-right: 0.5rem;
}

.course-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.view-all-btn {
    display: block;
    margin: 2rem auto 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
}

/* How It Works */
.how-it-works {
    padding: 4rem 0;
    background: var(--light-gray);
}

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

.step {
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
}

.testimonial-carousel {
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-container {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    flex: 0 0 50%;
    background: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.carousel-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Newsletter */
.newsletter {
    padding: 4rem 0;
    background: var(--primary-blue);
    color: var(--white);
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--success-green);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.newsletter-form button:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-column h3 {
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #cbd5e1;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--white);
}

.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;
}

.social-links a:hover {
    background: var(--primary-blue);
}

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

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--primary-blue);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInAndOut 4s ease-in-out;
}

.notification.success {
    background: var(--success-green);
}

@keyframes slideInAndOut {
    0% { opacity: 0; transform: translateX(100%); }
    10% { opacity: 1; transform: translateX(0); }
    90% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}