/**
 * Portfolio Page Styles
 * Professional portfolio design with 2025 trends
 * Author: FrandoWeb
 */



/* ============================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ============================================ */
:root {
    --primary: #2d467f;
    --secondary: #1d4ed8;
    --success: #10b981;
    --dark: #1e293b;
    --light: #f8f9fa;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --primary-dark: #23365a;
    --shadow-lg: 0 8px 32px rgba(37, 99, 235, 0.15);
    --shadow-xl: 0 20px 64px rgba(37, 99, 235, 0.2);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PORTFOLIO HERO SECTION
   ============================================ */
.portfolio-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    overflow: hidden;
}

.portfolio-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darken and add subtle color accents for a professional overlay */
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.45)),
                radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.14) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.09) 0%, transparent 50%);
    pointer-events: none;
}

/* Hero decorative shapes */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-shape.shape-1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(59, 130, 246, 0.2));
    animation-delay: 0s;
}

.hero-shape.shape-2 {
    bottom: 15%;
    right: 10%;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
    animation-delay: 2s;
}

.hero-shape.shape-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* Hero content */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeInDown 0.8s ease-out;
}

.badge-icon {
    font-size: 1.2rem;
}

.portfolio-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: white;
    margin: 1.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Portfolio stats */
.portfolio-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-percent {
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
}

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

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

/* ============================================
   PORTFOLIO CONTROLS
   ============================================ */
.portfolio-controls {
    background: white;
    position: relative;
    z-index: 10;
}

/* Search box */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-input {
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Filter buttons */
.filter-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center; /* centered horizontally */
    align-items: center;
}

/* Sticky filters wrapper */
.filters-sticky {
    position: sticky;
    top: calc(var(--navbar-height, 72px));
    z-index: 1020;
    padding: 6px 0;
    background: transparent; /* removed heavy white container for subtler look */
    backdrop-filter: blur(4px);
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    border-radius: 8px;
    box-shadow: none; /* subtle/no shadow for a cleaner mobile-friendly appearance */
    box-sizing: border-box;
}

/* When JS forces fixed positioning - make it sit flush under navbar */
.filters-sticky.stuck {
    position: fixed !important;
    top: calc(var(--navbar-height, 72px) - 1px); /* sit 1px closer to hide any hairline */
    z-index: 1020;
    /* DO NOT force left/right/width here - JS sets exact dimensions */
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    border-radius: 0 0 6px 6px; /* remove top rounding to sit flush */
}

/* Tighter button sizing when sticky to save vertical space */
.filters-sticky.stuck .filter-btn {
    padding: 7px 12px;
    font-size: 0.95rem;
}
.filters-sticky.stuck .filter-container {
    gap: 8px;
}

/* Placeholder to preserve vertical flow when sticky is fixed */
.filters-sticky-placeholder {
    display: none;
    height: 0;
}

/* When placeholder is inserted it should take space */
.filters-sticky-placeholder.active {
    display: block;
}

/* Ensure mobile dropdown is still visible and centered */
@media (max-width: 480px) {
    .filters-sticky { padding: 6px 8px; }
    .filter-dropdown-wrapper { margin-bottom: 8px; }
    /* When stuck on mobile, make dropdown full width */
    .filters-sticky.stuck .filter-dropdown-wrapper { width: 100%; }
    .filters-sticky.stuck .filter-dropdown-wrapper .filter-select { max-width: none; width: calc(100% - 24px); }
}

/* Reduce visual motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .filters-sticky { transition: none; }
}

/* Hidden state for sticky filters when scrolled beyond the projects (e.g. footer) */
.filters-sticky.filters-sticky-hidden,
.filters-sticky.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
} 
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    /* Ensure consistent sizing and avoid overflow on small screens */
    flex: 0 1 auto;
    white-space: nowrap;
}

/* Responsive: stack buttons on narrow viewports */
@media (max-width: 480px) {
    .filter-container {
        gap: 8px;
        display: none; /* hide button list on small screens in favor of dropdown */
    }
    .filter-container .filter-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .filter-dropdown-wrapper { display: block; text-align:center; margin-bottom: 12px; position: relative; background: rgba(255,255,255,0.94); padding: 6px; border-radius: 10px; box-shadow: 0 1px 6px rgba(15,23,42,0.04); }
    .filter-dropdown-wrapper::before {
        /* intentionally hidden for clean mobile look */
        display: none;
    }

    .filter-select {
        display: inline-block;
        width: 100%;
        max-width: 420px;
        padding: 10px 18px 10px 14px; /* maintain space for arrow */
        padding-right: 56px; /* space for larger arrow */
        border-radius: 8px; /* subtle rounding */
        border: none; /* no visible frame */
        background: rgba(255,255,255,0.96); /* subtle white to increase contrast */
        font-weight: 500;
        color: var(--text-primary);
        -webkit-appearance: none;
        appearance: none;
        box-shadow: none; /* no shadow inside */
        transition: box-shadow 0.12s ease, color 0.12s ease, transform 0.12s ease;
        font-size: 1rem;
    }
    .filter-select:hover { box-shadow: none; }
    .filter-select:focus {
        border-color: transparent;
        box-shadow: 0 0 0 4px rgba(37,99,235,0.04); /* subtle focus ring */
        outline: none;
        transform: none;
    }
    /* When stuck on mobile, ensure the select stretches across the viewport to avoid the native options overflowing */
    .filters-sticky.stuck .filter-dropdown-wrapper .filter-select { max-width: none; width: calc(100vw - 24px) !important; }
    .filters-sticky.stuck { left: 0; right: 0; }
    .filters-sticky.stuck .filter-dropdown-wrapper::before { display: none; }
    .filter-select::-ms-expand { display: none; }

    /* Larger arrow for better tap affordance */
    .filter-dropdown-wrapper::after {
        content: '';
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='currentColor' d='M6 8l4 4 4-4z'/></svg>");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 22px;
        color: var(--primary);
        filter: none;
        pointer-events: none;
        opacity: 0.98;
    }

    /* When stuck, make the accent stronger and adapt colors */
    .filters-sticky.stuck .filter-dropdown-wrapper::before {
        background: rgba(0,0,0,0.05);
        transform: translateY(-50%) scale(1.02);
    }
    .filters-sticky.stuck .filter-dropdown-wrapper::after {
        color: #0b63d6; /* slightly darker */
        filter: none;
    }
}

/* Desktop: hide select */
@media (min-width: 481px) {
    .filter-dropdown-wrapper { display: none; }
    .filter-select { display: none; }
}

.filter-btn:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.filter-label {
    font-size: 0.95rem;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Results info */
.results-info {
    text-align: center;
}

.results-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.results-text span {
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   PORTFOLIO GRID
   ============================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Portfolio card - 3D Tilt Effect */
.portfolio-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
}

/* Inner content with 3D transform */
.portfolio-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Shine effect overlay that follows cursor */
.portfolio-card {
    --shine-x: 50%;
    --shine-y: 50%;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--shine-x) var(--shine-y),
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0) 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: overlay;
}

/* Gradient border effect */
.portfolio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0) 0%,
        rgba(37, 99, 235, 0.3) 50%,
        rgba(59, 130, 246, 0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-card:hover::before {
    opacity: 1;
}

.portfolio-card:hover::after {
    opacity: 1;
}

/* Enhanced shadow for 3D effect */
.portfolio-card {
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 10px 20px rgba(0, 0, 0, 0.05);
}

.portfolio-card:hover {
    box-shadow:
        0 20px 40px rgba(37, 99, 235, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card image container */
.portfolio-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Entrance animation (staggered via --enter-delay) */
.portfolio-card.pre-enter {
    opacity: 0;
    transform: translateY(30px);
}
.portfolio-card.enter {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--enter-delay, 0s);
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

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

/* Logos: center and contain with padding. Use auto width/height so aspect ratio is preserved */
.portfolio-card-image.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-card-image.logo img {
    object-fit: contain;
    max-width: calc(100% - 36px);
    max-height: calc(100% - 36px);
    padding: 18px;
    background: #ffffff;
    display: block;
    margin: 0 auto;
}

.portfolio-card:hover .portfolio-card-image.logo img {
    transform: none !important;
}

/* Video hover */
.portfolio-card-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card-video {
    opacity: 1;
}

/* Image overlay */
.portfolio-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card-image::after {
    opacity: 1;
}

/* Card body */
.portfolio-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Modal media: keep a consistent, polished layout for project previews */
#projectModal .modal-body {
    display: flex;
    gap: 24px;
    align-items: flex-start; /* align media to top so it sits left of content */
    flex-wrap: wrap;
}

#projectModal .modal-media {
    max-height: 240px; /* caps media height for a small left thumbnail */
    border-radius: 12px;
    flex: 0 0 240px; /* narrow media column on desktop */
    min-width: 200px;
    background: #f8fafc;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    margin-right: 18px;
}

#projectModal .modal-media img.modal-media-img,
#projectModal .modal-media video {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain; /* prevent logo cropping */
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    #projectModal .modal-media { flex: 0 0 100%; padding: 10px; }
    #projectModal .modal-media img.modal-media-img { max-height: 220px; }
}

#projectModal .modal-meta {
    flex: 1 1 55%;
}

#projectModal .modal-meta h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    font-weight: 600;
}

#projectModal .modal-meta p {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--muted, #6b7280);
}

#projectModal .modal-media { min-height: 220px; }

@media (max-width: 992px) {
    #projectModal .modal-media { max-height: 220px; flex: 0 0 100%; }
    #projectModal .modal-body { gap: 16px; }
}

@media (max-width: 576px) {
    #projectModal .modal-media { max-height: 180px; }
}

/* Hide numeric counts where not needed */
.no-number {
    display: none !important;
}

.filter-count {
    display: none !important;
}

/* Remove results number visibility - #resultsCount removed from DOM, keep selector safe */
#resultsCount { display: none !important; }

.portfolio-card-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.portfolio-card-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px;
    width: fit-content;
    box-shadow: none;
}

.portfolio-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.portfolio-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Card footer */
.portfolio-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.portfolio-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.portfolio-card-link:hover {
    gap: 12px;
    color: var(--secondary);
}

.portfolio-card-link i {
    transition: transform 0.3s ease;
}

.portfolio-card-link:hover i {
    transform: translateX(4px);
}

/* External badge */
.external-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton-card {
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-image {
    width: 100%;
    height: 240px;
}

.skeleton-body {
    padding: 24px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-badge {
    height: 28px;
    width: 100px;
    margin-top: 12px;
    border-radius: 50px;
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary);
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.no-results p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process-section {
    background: var(--light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.process-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.process-card:hover::before {
    transform: scaleX(1);
}

.process-number {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(37, 99, 235, 0.1);
    line-height: 1;
}

.process-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 16px;
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 24px;
    transition: var(--transition);
}

.process-card:hover .process-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.process-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.process-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   CTA SECTION
   ============================================ */
.portfolio-cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.portfolio-cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 60px 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.portfolio-cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-cta-primary {
    background: white;
    color: var(--primary);
    border: 2px solid white;
}

.btn-cta-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================
   UTILITY BUTTONS
   ============================================ */
#scrollToTop,
#whatsappBtn {
    position: fixed;
    bottom: 25px;
    border-radius: 50%;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollToTop {
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    display: none;
}

#scrollToTop:hover {
    background-color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#whatsappBtn {
    left: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--wa);
    font-size: 30px;
    text-decoration: none;
}

#whatsappBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .portfolio-hero {
        min-height: 50vh;
        padding: 80px 0 60px;
    }

    .portfolio-hero-title {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .portfolio-stats {
        gap: 1.5rem;
    }

    .filter-container {
        justify-content: center;
    }

    .portfolio-cta-box {
        padding: 40px 30px;
        text-align: center;
    }

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

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-hero-title {
        font-size: 2rem;
    }

    .portfolio-hero-subtitle {
        font-size: 1rem;
    }

    .portfolio-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
        justify-content: space-between;
    }

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

    .process-card {
        padding: 24px;
    }

    #whatsappBtn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        left: 16px;
        bottom: 16px;
    }

    #scrollToTop {
        width: 44px;
        height: 44px;
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 576px) {
    .portfolio-hero {
        padding: 60px 0 40px;
    }

    .hero-badge {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .portfolio-card-body {
        padding: 20px;
    }

    .portfolio-card-title {
        font-size: 1.15rem;
    }

    .portfolio-cta-box {
        padding: 30px 20px;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
        margin: 8px 0 !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .portfolio-controls,
    .portfolio-cta-section,
    #scrollToTop,
    #whatsappBtn,
    footer {
        display: none !important;
    }

    .portfolio-card {
        page-break-inside: avoid;
    }
}
