:root {
    --primary-color: #d62b29;
    --primary-dark: #9f201e;
    --primary-light: #df5957;
    --secondary-color: #2c2c2c;
    --dark-color: #464645;
    --light-color: #ecf0f1;
    --gray-color: #a4a695;
    --dark-bg: #2f1a1a;
    --light-bg: #f8f9fa;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Previne barras de rolagem horizontais */
}

/* Garante que elementos de bloco ocupem toda a largura */
.container, footer, header {
    width: 100%;
    max-width: 100%;
}

.main-content {
    flex: 1;
    margin-top: 100px;
    padding: 2rem 5%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-main ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-main a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-main a:hover {
    color: var(--primary-color);
}

.nav-main a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-main a:hover::after {
    width: 100%;
}

.login-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.login-btn::after {
    display: none;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-light) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--dark-color);
}

.hero h1 span {
    color: var(--primary-color);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(46, 204, 113, 0.3);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(46, 204, 113, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(46, 204, 113, 0.4);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-color);
    animation: bounce 2s infinite;
}

.hero-scroll i {
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Projects Section */
.projects-section {
    padding: 5rem 5%;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    margin: 20px 20px;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.project-info p {
    color: var(--gray-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: rgba(46, 204, 113, 0.1);
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.modal-content {
    max-width: 900px;
    background: white;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--gray-color);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-header {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 20px;
}

.modal-description {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-tech {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.screenshots h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.screenshots h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.screenshot-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    /* cursor: pointer; */
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col p {
    color: var(--gray-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.footer-col a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    padding-left: 0;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-main {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-main.active {
        left: 0;
    }

    .nav-main ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        height: 250px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Estilo quando o input está focado no mobile */
@media (max-width: 768px) {
    input:focus, textarea:focus, select:focus {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(214, 43, 41, 0.2);
        border-color: #d62b29 !important;
        background-color: #fff !important;
    }
    
    /* Garantir que o container do formulário seja scrollável */
    .col-md-4 {
        position: relative;
        z-index: 10;
    }
    
    /* Ajustar altura dos cards em mobile */
    .card {
        margin-bottom: 10px;
    }
    
    .card-body {
        padding: 15px 10px;
    }
}

/* Prevenir zoom desnecessário no iOS */
@media (max-width: 768px) {
    input[type="color"],
    input[type="date"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="email"],
    input[type="month"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="text"],
    input[type="time"],
    input[type="url"],
    input[type="week"],
    select:focus,
    textarea {
        font-size: 16px !important;
    }
}