/* Portfolio Page Styles - Modern Design */

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #334155;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f3a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 180px; /* Extra space for fixed footer to prevent button overlap */
}

/* Portfolio Navbar */
.portfolio-navbar {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

/* Header Container (legacy - keeping for compatibility) */
.header-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

/* Title */
#portafolioTitle {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    display: inline-block;
    flex: 0 0 auto;
}

/* Text gradient effect */
#portafolioTitle span {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

#portafolioTitle:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Language Switcher Container */
.language-switcher-container {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex: 0 0 auto;
    margin-left: auto; /* Push to the right */
}

#language-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Portfolio Grid */
.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 3rem; /* Extra padding at bottom for buttons */
    flex-grow: 1;
}

/* Card Styles */
.card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    padding-bottom: 2.5rem; /* Extra padding at bottom for button */
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow: visible; /* Changed from hidden to visible so buttons aren't clipped */
    margin-bottom: 1rem; /* Extra margin to ensure buttons are visible */
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
    background: rgba(30, 41, 59, 0.6);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover img {
    border-color: var(--accent-primary);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

/* Demo Button */
.demo-button,
.apps-link {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    text-align: center;
    margin-top: auto;
}

.demo-button:hover,
.apps-link:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.demo-button:active,
.apps-link:active {
    transform: translateY(0);
}

/* Footer Styles for Portfolio Page */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
}

.footer-main {
    width: 100%;
    max-width: 1400px;
    text-align: center;
}

.footer-main p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

/* Language Buttons */
.language-switcher-container .lang-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
    font-family: inherit;
}

.language-switcher-container .lang-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.language-switcher-container .lang-btn.active {
    background: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Responsive Design */
@media screen and (max-width: 968px) {
    .portfolio {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .navbar-content {
        padding: 1.25rem 1.5rem;
    }

    #portafolioTitle {
        font-size: 1.75rem;
        padding: 0.625rem 1rem;
    }
}

@media screen and (max-width: 768px) {
    .portfolio {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card img {
        height: 180px;
    }

    .card h2 {
        font-size: 1.25rem;
    }

    .card p {
        font-size: 0.9375rem;
    }

    .navbar-content {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
    }

    .language-switcher-container {
        margin-left: 0;
        align-self: flex-end;
    }

    #portafolioTitle {
        font-size: 1.5rem;
        width: auto;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .portfolio {
        padding: 0.75rem;
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card img {
        height: 160px;
    }

    .card h2 {
        font-size: 1.125rem;
    }

    .card p {
        font-size: 0.875rem;
    }

    .demo-button,
    .apps-link {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}
