/* Main CSS Otimizado - Pitadas & Descobertas */
/* Mobile First Approach */

/* ========== CSS VARIABLES ========== */
:root {
    --primary-purple: #8b5cf6;
    --dark-purple: #6d28d9;
    --light-purple: #a78bfa;
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --black: #000000;
    --dark-gray: #1f2937;
    --medium-gray: #374151;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --container-padding: 15px;
    --section-padding: 60px 0;
}

/* ========== BASE STYLES ========== */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========== HEADER ========== */
.header {
    background: var(--purple-gradient);
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Menu mobile por padrão */
.nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--purple-gradient);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 999;
}

.nav-menu.active {
    right: 0;
    display: flex;
}

.nav-menu a {
    color: var(--white);
    font-weight: 500;
    font-size: 1.3rem;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--light-purple);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 2px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ========== HERO SECTION ========== */
.hero {
    padding: 100px 0 60px;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-purple) 100%);
    color: var(--white);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 500px;
}

.search-container {
    display: flex;
    background: var(--white);
    border-radius: 50px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.search-container input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.search-container input::placeholder {
    color: var(--medium-gray);
}

.search-container button {
    background: var(--purple-gradient);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    min-width: 50px;
}

.search-container button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* ========== PHONE MOCKUP ========== */
.phone-mockup {
    width: 220px;
    height: 440px;
    background: var(--black);
    border-radius: 25px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    margin: 1rem auto 0;
    position: relative;
    overflow: hidden;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--medium-gray);
    border-radius: 2px;
}

.screen {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    padding: 15px;
    height: 100%;
    background: linear-gradient(180deg, var(--light-purple) 0%, var(--white) 30%);
}

.app-preview h3 {
    color: var(--dark-purple);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.recipe-card {
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.recipe-image {
    width: 100%;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-purple), var(--light-purple));
    border-radius: 6px;
    margin-bottom: 8px;
}

.recipe-info h4 {
    color: var(--dark-gray);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.recipe-info p {
    color: var(--medium-gray);
    font-size: 0.7rem;
}

/* ========== CATEGORIES SECTION ========== */
.categories {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.categories h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 3px solid transparent;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-card:hover,
.category-card:active {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.category-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.category-card p {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* ========== RECIPES SECTION ========== */
.recipes {
    padding: var(--section-padding);
    background: var(--white);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.filter-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--light-gray);
    color: var(--dark-gray);
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--purple-gradient);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.recipe-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid transparent;
    cursor: pointer;
}

.recipe-item:hover,
.recipe-item:active {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.recipe-item.hidden {
    display: none;
}

.recipe-image-container {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, var(--primary-purple), var(--light-purple));
    position: relative;
    overflow: hidden;
}

.recipe-image-container::before {
    content: '🍳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    opacity: 0.3;
}

.recipe-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-icon {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.recipe-content {
    padding: 1.2rem;
}

.recipe-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
    line-height: 1.3;
}

.recipe-content p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.recipe-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-purple);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.recipe-area {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.recipe-video {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* ========== ABOUT SECTION ========== */
.about {
    padding: var(--section-padding);
    background: var(--dark-gray);
    color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    align-items: center;
}

.about-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    background: var(--purple-gradient);
    padding: 8px;
    border-radius: 8px;
}

.feature h4 {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.feature p {
    opacity: 0.8;
    font-size: 0.85rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.cooking-illustration {
    width: 180px;
    height: 180px;
    background: var(--purple-gradient);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cooking-illustration::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 40%, rgba(255,255,255,0.1) 100%);
}

.cooking-emoji {
    font-size: 4rem;
    position: relative;
    z-index: 2;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: var(--purple-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.5;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--light-purple);
    font-size: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-links a {
    opacity: 0.8;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--light-purple);
}

.footer-contact p {
    opacity: 0.8;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid var(--medium-gray);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.6;
    font-size: 0.85rem;
}

/* ========== MODAL STYLES ========== */
.recipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 10px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.3;
    padding-right: 1rem;
}

.modal-close {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--medium-gray);
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.modal-body {
    padding: 1rem;
}

.recipe-image-large {
    position: relative;
    margin-bottom: 1.5rem;
}

.recipe-image-large img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.recipe-meta {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.recipe-area-large,
.recipe-category-large {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ingredients-section,
.instructions-section,
.video-section {
    margin-bottom: 1.5rem;
}

.ingredients-section h3,
.instructions-section h3,
.video-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-purple);
    padding-bottom: 0.3rem;
}

.ingredients-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    list-style: none;
}

.ingredients-list li {
    padding: 6px 10px;
    background: var(--light-gray);
    border-radius: 6px;
    font-size: 0.85rem;
}

.ingredient-measure {
    font-weight: 600;
    color: var(--primary-purple);
}

.instructions-text {
    line-height: 1.6;
    color: var(--medium-gray);
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--purple-gradient);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
}

.video-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ========== UTILITY CLASSES ========== */
.reset-btn,
.retry-btn {
    background: var(--purple-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    font-size: 0.85rem;
    min-width: 120px;
}

.reset-btn:hover,
.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.loading,
.error-message,
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    color: var(--medium-gray);
}

.loading-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid var(--light-gray);
    border-left-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.error-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.error-message h3,
.no-results h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== MEDIA QUERIES ========== */
@media (min-width: 768px) {
    :root {
        --container-padding: 20px;
        --section-padding: 80px 0;
    }
    
    .logo h1 { font-size: 1.5rem; }
    .hamburger { display: none; }
    
    .nav-menu {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        background: none;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 2rem;
        right: 0;
    }
    
    .nav-menu a { font-size: 1rem; }
    
    .hero-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: 3rem;
    }
    
    .hero-content h2 { font-size: 2.8rem; }
    .hero-content p { font-size: 1.1rem; }
    
    .phone-mockup {
        width: 280px;
        height: 560px;
        padding: 20px;
    }
    
    .phone-mockup::before {
        width: 60px;
        height: 6px;
        top: 10px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 3rem;
    }
    
    .section-header h2 { font-size: 2.5rem; }
    
    .filter-buttons {
        justify-content: flex-end;
        width: auto;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: 4rem;
    }
    
    .about-text h2 { font-size: 2.5rem; }
    .about-text p { font-size: 1.1rem; }
    
    .features {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .feature {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }
    
    .cooking-illustration {
        width: 300px;
        height: 300px;
    }
    
    .cooking-emoji { font-size: 8rem; }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
    
    .modal-content {
        max-width: 800px;
        margin: auto;
        border-radius: var(--border-radius);
    }
    
    .modal-header {
        padding: 1.5rem;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .modal-header h2 { font-size: 1.8rem; }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .modal-body { padding: 1.5rem; }
    .recipe-image-large img { height: 300px; }
    
    .recipe-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
    
    .ingredients-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (min-width: 1200px) {
    .hero-content h2 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.2rem; }
    
    .categories h2,
    .section-header h2,
    .about-text h2 { font-size: 2.8rem; }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* ========== ACCESSIBILITY ========== */
*:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch targets para mobile */
@media (max-width: 768px) {
    button,
    .category-card,
    .recipe-item,
    .filter-btn {
        min-height: 44px;
    }
}

/* Hover states apenas em dispositivos com hover */
@media (hover: hover) and (pointer: fine) {
    .recipe-item:hover .recipe-overlay {
        opacity: 1;
    }
}

/* Touch devices - feedback visual */
@media (hover: none) and (pointer: coarse) {
    .recipe-overlay {
        opacity: 0.2;
    }
    
    .recipe-item:active .recipe-overlay {
        opacity: 0.6;
    }
}