@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-blue: #ebf2ff;
    --text-blue: #3b82f6;
    --primary-green: #ecfdf5;
    --text-green: #10b981;
    --primary-purple: #f5f3ff;
    --text-purple: #8b5cf6;
    --bg-light: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
}

.mdq-portfolio-wrapper {
    background: var(--bg-light);
    padding: 60px 20px;
    margin: 40px auto;
    border-radius: 30px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Filters */
.mdq-portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.mdq-filter-btn {
    padding: 10px 24px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-muted);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mdq-filter-btn.active {
    background: var(--text-blue);
    color: #fff;
    border-color: var(--text-blue);
}

/* Card Grid */
.mdq-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.mdq-portfolio-card {
    background: #ffffff !important;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mdq-portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.mdq-portfolio-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: #fff;
    overflow: hidden;
    position: relative;
    display: block;
}

.mdq-portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mdq-portfolio-content {
    padding: 15px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mdq-portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.mdq-card-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.mdq-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.mdq-card-title a:hover {
    color: var(--text-blue);
}

.mdq-portfolio-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.mdq-portfolio-card:hover .mdq-portfolio-image img {
    transform: scale(1.05);
}

/* Category Badges */
.mdq-category-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Default dynamic colors based on slugs or generic */
.cat-badge-app-web, .cat-badge-web { background: var(--primary-blue); color: var(--text-blue); }
.cat-badge-portal, .cat-badge-web-design { background: var(--primary-green); color: var(--text-green); }
.cat-badge-sistema, .cat-badge-software { background: var(--primary-purple); color: var(--text-purple); }

.mdq-portfolio-excerpt {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

/* Language Pills */
.mdq-portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.mdq-tag-pill {
    background: #f1f5f9;
    color: #64748b;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdq-tag-pill i {
    font-size: 1rem;
    opacity: 0.7;
}

/* Button */
.mdq-portfolio-footer {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    padding-top: 0px;
}

.mdq-case-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fff;
}

.mdq-case-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.mdq-case-button i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.mdq-case-button:hover i {
    transform: translateX(4px);
}

/* Project Single: Download Section */
.mdq-single-download-section {
    margin-top: 50px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

.mdq-single-download-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.mdq-download-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.mdq-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Specific Button Colors */
.mdq-dl-web {
    background: var(--text-blue);
    color: #fff;
}

.mdq-dl-github {
    background: #1e293b;
    color: #fff;
}

.mdq-dl-demo {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.mdq-dl-demo:hover {
    background: #059669;
}

.mdq-dl-store {
    background: #fff;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.mdq-dl-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mdq-dl-btn i {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .mdq-download-buttons-grid {
        flex-direction: column;
    }
    .mdq-dl-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Project Gallery Section */
.mdq-project-gallery-section {
    margin-top: 50px;
    padding: 30px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

.mdq-project-gallery-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.mdq-gallery-grid-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.mdq-gallery-link {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.mdq-gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mdq-gallery-link:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
    border-color: var(--text-blue);
}

.mdq-gallery-link:hover img {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .mdq-gallery-grid-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* 7. PROFESSIONAL PROJECT LAYOUT (SIDEBAR GRID)
/* -------------------------------------------------------------------------- */

.mdq-project-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 40px 0;
    align-items: start;
}

@media (min-width: 992px) {
    .mdq-project-main-grid {
        grid-template-columns: 1fr 340px;
    }
}

.mdq-project-main-content {
    min-width: 0; /* Prevent overflow */
}

/* Sidebar Widget Styling */
.mdq-project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mdq-sidebar-widget {
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.mdq-sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Special CTA Widget (Downloads) */
.mdq-sidebar-widget.mdq-special-cta {
    background: #ffffff !important;
    border-left: 4px solid #6366f1;
}

.mdq-sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mdq-info-row {
    font-size: 0.95rem;
    color: #444;
}

.mdq-info-row strong {
    color: #000;
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 3px;
    opacity: 0.6;
}

/* Stacked Buttons for Sidebar */
.mdq-stack-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.mdq-stack-vertical .mdq-dl-btn {
    width: 100%;
    justify-content: center;
    margin: 0;
    box-sizing: border-box;
}

/* Gallery inside main content */
.mdq-project-main-content .mdq-project-gallery-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px dashed #ddd;
}

.mdq-project-main-content .mdq-project-gallery-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

/* Video Placeholder in Gallery */
.mdq-video-link {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff !important;
    position: relative;
    border: none !important;
    z-index: 1;
}

.mdq-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
}

.mdq-video-link:hover .mdq-video-placeholder {
    transform: scale(1.1);
}

.mdq-video-placeholder i {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.mdq-video-placeholder span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mdq-video-link:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: mdq-pulse-video 2s infinite;
    z-index: -1;
}

@keyframes mdq-pulse-video {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Related Projects Section */
.mdq-related-projects-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.mdq-related-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mdq-related-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

/* Social Share Buttons */
.mdq-social-share-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.mdq-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: white !important;
    transition: all 0.3s ease;
    border: none !important;
}

.mdq-share-btn i { font-size: 1.1rem; }

.mdq-share-wa { background-color: #25D366; }
.mdq-share-li { background-color: #0077b5; }
.mdq-share-tw { background-color: #000000; }

.mdq-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

.mdq-single-social-section {
    margin: 40px 0;
    text-align: center;
    padding: 30px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
}

.mdq-single-social-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.mdq-single-social-section .mdq-social-share-buttons {
    justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* 8. DONATION SECTION (PAYPAL)
/* -------------------------------------------------------------------------- */

/* Project Header/Cover */
.mdq-project-cover {
    margin-bottom: 0; /* Remove bottom margin as it will be next to the card */
    border-radius: 20px 20px 0 0; /* Only top rounding if description follows */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.mdq-project-featured {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Description Card */
.mdq-project-description-card {
    background: #ffffff !important;
    padding: 40px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    line-height: 1.8;
    color: #4b5563;
    font-size: 1.05rem;
}

.mdq-project-description-card p:last-child {
    margin-bottom: 0;
}

/* Taxonomy Pills in Sidebar */
.mdq-taxonomy-row .mdq-tax-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.mdq-taxonomy-row a {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.mdq-taxonomy-row a:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Internal Title (Inside description card) */
.mdq-internal-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    margin-top: 0;
    color: #111827;
    line-height: 1.2;
}

/* Full Wrapper Margin */
.mdq-project-professional-wrapper {
    margin: 40px 0 60px; /* Space at top and bottom */
}

/* Base adjustment for featured image in card mode */
.mdq-project-cover {
    border-bottom: none;
    border-radius: 20px 20px 0 0;
}

.mdq-project-cover:hover .mdq-project-featured {
    transform: scale(1.02);
}

/* Sidebar Widget */
.mdq-donation-widget {
    background: #ffffff !important;
    border-left: 4px solid #0070ba;
}

.mdq-donation-msg {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.mdq-donation-msg p { margin-bottom: 15px; }
.mdq-donation-msg strong { color: var(--text-main); }
.mdq-donation-msg ul { padding-left: 20px; margin-bottom: 15px; }
.mdq-donation-msg li { margin-bottom: 8px; }

/* Classic Section */
.mdq-single-donation-section {
    margin: 60px 0;
    padding: 40px;
    background: #fff;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.mdq-single-donation-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: var(--text-main);
    font-weight: 700;
    text-align: center;
}

.mdq-donation-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #ffffff !important;
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(0, 112, 186, 0.05);
}

.mdq-donation-content {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.mdq-donation-content p { margin-bottom: 15px; }
.mdq-donation-content strong { color: var(--text-main); }

.mdq-donation-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 10px;
}

/* PayPal Button (Llamativo) */
.mdq-don-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 40px;
    border-radius: 16px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.mdq-don-paypal {
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(0, 112, 186, 0.35);
}

.mdq-don-paypal:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 112, 186, 0.5);
    filter: brightness(1.1);
}

.mdq-don-paypal i {
    font-size: 1.5rem;
}

/* Sidebar Specific */
.mdq-donation-widget .mdq-donation-footer {
    padding-top: 0;
}

.mdq-donation-widget .mdq-don-btn {
    width: 100%;
    font-size: 1rem;
    padding: 14px 20px;
}

/* Project Navigation */
.mdq-project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    gap: 20px;
}

.mdq-nav-prev, .mdq-nav-next {
    flex: 1;
}

.mdq-nav-prev a, .mdq-nav-next a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid transparent;
}

.mdq-nav-next {
    text-align: right;
}

.mdq-nav-prev a:hover, .mdq-nav-next a:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.mdq-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdq-nav-next .mdq-nav-label {
    justify-content: flex-end;
}

.mdq-nav-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.mdq-nav-prev a:hover .mdq-nav-title, 
.mdq-nav-next a:hover .mdq-nav-title {
    color: #6366f1;
}

@media (max-width: 640px) {
    .mdq-project-navigation {
        flex-direction: column;
        align-items: stretch;
    }
    .mdq-nav-next {
        text-align: left;
    }
    .mdq-nav-next .mdq-nav-label {
        justify-content: flex-start;
    }
}
