/* projetos-grid.css — Estilos modernos e dinâmicos da página de projetos */

:root {
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-primary: #ffffff;
    --accent: #1e90ff;
    --accent-light: #60a5fa;
    --border: #e2e8f0;
    --success: #10b981;
}

html.dark-mode {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e0;
    --bg-primary: #0f172a;
    --border: #1e293b;
}

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.projects-section {
    padding: 100px 24px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(30, 144, 255, 0.02) 100%);
    width: 100%;
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(30, 144, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.projects-section>* {
    position: relative;
    z-index: 1;
}

.projects-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInDown 0.8s ease-out;
}

.projects-header h2 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--accent) 0%, #1873e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.5px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 50px;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.project-card {
    background: var(--bg-primary);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none;
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-20px) scale(1.01);
    box-shadow: 0 40px 80px rgba(30, 144, 255, 0.2);
}

.project-link {
    display: block;
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f0f4f8;
}

.project-link::before {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent) 0%, #1873e8 100%);
    border-radius: 100% 0 0 0;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-link::after {
    content: '→';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    z-index: 6;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translate(20px, 20px);
}

.project-card:hover .project-link::before {
    opacity: 1;
}

.project-card:hover .project-link::after {
    opacity: 1;
    transform: translate(0, 0);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
    position: relative;
    z-index: 2;
}

.project-card:hover .project-image {
    transform: scale(1.15) rotate(2deg);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.project-info {
    padding: 36px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.project-category {
    display: inline-block;
    background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: fit-content;
    transition: all 0.4s ease;
}

.project-card:hover .project-category {
    background: var(--accent);
    color: white;
    transform: translateX(4px);
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

.project-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.project-location::before {
    content: '📍';
    font-size: 1rem;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Modo escuro */
html.dark-mode .project-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html.dark-mode .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

html.dark-mode .project-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #64748b;
}

/* Responsividade */
@media (max-width: 1024px) {
    .projects-section {
        padding: 70px 20px;
    }

    .projects-header h2 {
        font-size: 2.5rem;
    }

    .projects-header {
        margin-bottom: 60px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 36px;
    }

    .project-link {
        height: 190px;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding: 60px 16px;
    }

    .projects-header {
        margin-bottom: 50px;
    }

    .projects-header h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 28px;
    }

    .project-link {
        height: 170px;
    }

    .project-info {
        padding: 18px;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-info p {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .projects-section {
        padding: 35px 12px;
    }

    .projects-header {
        margin-bottom: 30px;
    }

    .projects-header h2 {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-link {
        height: 150px;
    }

    .project-info {
        padding: 16px;
    }

    .project-info h3 {
        font-size: 1rem;
    }


    .project-info p {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
}

/* ===== PROJECT MODAL ===== */
.project-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
}

.project-modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 24px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    transition: all 0.3s ease;
}

.project-modal-close:hover {
    background: #1873e8;
    transform: rotate(90deg) scale(1.1);
}