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

:root {
    --blue: #1a6ec2;
    --blue-dark: #155ba3;
    --dark: #1a2332;
    --light-blue: #4a9fd4;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --light-bg: #f8fafc;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background-color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?w=1920&auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 4rem 1.5rem 6rem;
    }
}

.hero-subtitle {
    color: var(--light-blue);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-title-highlight {
    color: var(--light-blue);
}

.hero-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    max-width: 40rem;
    line-height: 1.6;
}

.hero-divider {
    width: 4rem;
    height: 0.25rem;
    background-color: var(--blue);
    border-radius: 9999px;
    margin-top: 1.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #ffffff;
}

.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .content-grid {
        flex-direction: row;
    }
}

.main-column {
    flex: 1;
    min-width: 0;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: var(--font-main);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 110, 194, 0.1);
}

.results-count {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

/* Course Grid */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.course-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.course-image-wrapper {
    position: relative;
    height: 11rem;
    overflow: hidden;
    background-color: var(--light-bg);
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

.course-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}

.course-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    color: #ffffff;
}

.badge-fundae {
    background-color: var(--blue);
}

.badge-talleres {
    background-color: #475569;
}

.badge-elearning {
    background-color: #059669;
}

.course-content {
    padding: 1.25rem;
}

.course-title {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.course-card:hover .course-title {
    color: var(--blue);
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--blue);
}

.course-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--blue);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.course-button:hover {
    background-color: var(--blue-dark);
}

/* Sidebar */
.sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .sidebar {
        width: 18rem;
        flex-shrink: 0;
    }
}

.sidebar-section {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-icon {
    width: 1rem;
    height: 1rem;
    color: var(--blue);
}

/* Calendar */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-nav-btn {
    padding: 0.25rem;
    border-radius: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-nav-btn:hover:not(:disabled) {
    background-color: var(--light-bg);
}

.calendar-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-nav-icon {
    width: 1rem;
    height: 1rem;
    color: var(--text-light);
}

.calendar-month {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.calendar-day {
    font-size: 0.75rem;
    padding: 0.25rem;
    border-radius: 9999px;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background-color 0.2s ease;
    color: #475569;
    cursor: default;
}

.calendar-day:hover:not(.calendar-day-active) {
    background-color: var(--light-bg);
}

.calendar-day-active {
    background-color: var(--blue);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

/* Categories */
.categories-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-main);
    text-align: left;
}

.category-button.active {
    background-color: var(--blue);
    color: #ffffff;
    font-weight: 600;
}

.category-button:not(.active) {
    color: var(--text);
}

.category-button:not(.active):hover {
    background-color: var(--light-bg);
}

.category-count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.category-button.active .category-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.category-button:not(.active) .category-count {
    background-color: #f1f5f9;
    color: var(--text-light);
}

/* Upcoming Dates */
.sidebar-dark {
    background-color: var(--dark);
    color: #ffffff;
}

.sidebar-dark .sidebar-title {
    color: rgba(255, 255, 255, 0.8);
}

.upcoming-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.upcoming-date {
    background-color: var(--blue);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
    min-width: 3.125rem;
    text-align: center;
    line-height: 1.2;
}

.upcoming-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Contact Box */
.contact-box {
    background-color: rgba(26, 110, 194, 0.05);
    border: 1px solid rgba(26, 110, 194, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
}

.contact-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.contact-description {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.contact-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--blue);
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.contact-button:hover {
    background-color: var(--blue-dark);
}

.contact-phone {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}