/* ========================================
   VARIÁVEIS E RESET
   ======================================== */
:root {
    --primary-color: #333333;
    --primary-dark: #222222;
    --primary-light: #555555;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #212529;
    --bg-darker: #1a1d20;

    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-light: #ffffff;

    --border-color: #dee2e6;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.2);

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: "Inter", "Segoe UI", system-ui, sans-serif;
}

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

/* ========================================
   TIPOGRAFIA E CORPO
   ======================================== */
html {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-family-base);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

/* ========================================
   HEADER
   ======================================== */
header.bg-primary {
    background: linear-gradient(150deg, var(--primary-color), var(--primary-light)) !important;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

header.bg-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerGlow 15s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, -10%) scale(1.1); }
}

header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    color: var(--text-light);
}

header p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

@font-face{
    font-family: 'Vintage';
    font-display: swap;
    src: url('../CSS/Fontes/Vintage.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
  }

#logotext{
    font-family: 'Vintage', sans-serif;
    /* Tipografia fluida com clamp em vez de vh */
    font-size: clamp(1rem, .7rem + .9vw, 1.4rem);
    color: var(--text-light);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    transition: all var(--transition);
  }

/* ========================================
   NAVEGAÇÃO
   ======================================== */
nav {
    background: var(--bg-primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav li {
    margin: 0;
}

nav a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    transition: left var(--transition-base);
}

nav a:hover::before {
    left: 100%;
}

nav a:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

nav a:active {
    transform: translateY(0);
}

.nav-link {
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
}

.nav-link:hover {
    background: var(--primary-color);
    color: var(--text-light) !important;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
main.container {
    padding: 2rem 1rem;
    padding-bottom: 4rem;
    animation: fadeInUp 0.6s ease;
    flex: 1 0 auto;
}

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

main > h1 {
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

main > section > h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

main > section > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-base);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

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

.card-text.small {
    font-size: 0.85rem;
}

/* ========================================
   TAGS
   ======================================== */
.tag {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 50px;
    padding: 0.35rem 0.85rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    display: inline-block;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

/* ========================================
   BOTÕES
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-base), height var(--transition-base);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a4da3 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   MODAL
   ======================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-light);
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #4facfe);
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ========================================
   PROJECT DETAILS
   ======================================== */
.project-details h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.project-details .lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-details .tag {
    font-size: 0.9rem;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    margin-right: 0.5rem;
    display: inline-block;
    color: var(--text-secondary);
}

.project-details .text-success {
    font-weight: 600;
    color: var(--success-color);
}

.project-details .bg-light {
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    nav a {
        width: 100%;
        text-align: center;
    }

    .card-img-top {
        height: 180px;
    }

    main.container {
        padding: 1.5rem 1rem;
        padding-bottom: 3rem;
    }

    .project-details h1 {
        font-size: 1.8rem;
    }

    footer {
        padding: 1.5rem 0;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

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

    .card-text {
        font-size: 0.9rem;
    }

    main.container {
        padding-bottom: 2rem;
    }

    footer {
        padding: 1.25rem 0;
    }
}

/* ========================================
   ANIMAÇÕES E UTILIDADES
   ======================================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--primary-light);
    color: var(--text-light);
}

::-moz-selection {
    background: var(--primary-light);
    color: var(--text-light);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
