/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5B7CFF;
    --secondary-color: #FFA94D;
    --dark-blue: #2E3A59;
    --light-bg: #F8F9FD;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --success: #28a745;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.resources-hero {
    position: relative;
    padding: 150px 0 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    color: var(--white);
    text-align: center;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../fotos/foto_2.jpg') center/cover;
    opacity: 0.1;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.page-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

/* ===== FILTER BAR ===== */
.resources-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.search-input,
.category-filter {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.search-input:focus,
.category-filter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.1);
}

.search-input {
    background: var(--white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236C757D"><path d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat;
    background-position: right 20px center;
    background-size: 20px;
    padding-right: 50px;
}

.category-filter {
    cursor: pointer;
}

/* ===== RESOURCES GRID ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.resource-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.resource-card:nth-child(1) { animation-delay: 0.1s; }
.resource-card:nth-child(2) { animation-delay: 0.2s; }
.resource-card:nth-child(3) { animation-delay: 0.3s; }
.resource-card:nth-child(4) { animation-delay: 0.4s; }
.resource-card:nth-child(5) { animation-delay: 0.5s; }

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.resource-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.resource-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.resource-title {
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin-bottom: 15px;
    line-height: 1.3;
}

.resource-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.resource-features {
    list-style: none;
    margin-bottom: 25px;
    flex-grow: 1;
}

.resource-features li {
    padding: 8px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.resource-features i {
    color: var(--success);
    margin-right: 10px;
}

.resource-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 2px solid var(--light-bg);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.resource-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.download-btn:hover {
    background: var(--dark-blue);
    transform: scale(1.02);
}

.download-btn i {
    font-size: 1.1rem;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 1.3rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.cta-btn:hover {
    background: #FF8C2E;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 169, 77, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    width: 60px;
    margin-bottom: 15px;
    border-radius: 50%;
}

.footer-logo p {
    color: #bbb;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .resources-hero {
        padding: 120px 0 80px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .filter-bar {
        flex-direction: column;
    }

    .search-input,
    .category-filter {
        min-width: 100%;
    }

    .resources-section {
        padding: 60px 0;
    }

    .resource-card {
        padding: 25px;
    }

    .resource-title {
        font-size: 1.3rem;
    }

    .resource-meta {
        font-size: 0.85rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo span {
        font-size: 20px;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .resources-hero {
        padding: 100px 0 60px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .resource-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .resource-badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .resource-title {
        font-size: 1.2rem;
    }

    .resource-features li {
        font-size: 0.9rem;
    }

    .download-btn {
        padding: 12px;
        font-size: 0.95rem;
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: 1.6rem;
    }

    .cta-section p {
        font-size: 0.95rem;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 350px) {
    .resource-meta {
        flex-direction: column;
        gap: 8px;
    }
}