/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Melhorar performance de animações */
.category-card,
.product-card,
.cta-button,
.product-button {
    will-change: transform;
}

/* Otimizações de renderização */
.header,
.nav-container {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.95) 0%, rgba(42, 82, 152, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
    z-index: 1001;
}

.logo:hover {
    color: #ffd700;
}

/* Menu Hambúrguer */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navegação */
.nav-container {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav a:hover,
.nav a.active {
    color: #ffd700;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffd700;
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

/* Main Content */
.main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    color: #1e3c72;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Categories Section */
.categories {
    padding: 4rem 2rem;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.category-card h3 {
    font-size: 1.3rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Featured Products Section */
.featured {
    padding: 4rem 2rem;
    background: #f8f9fa;
    position: relative;
}

.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(30, 60, 114, 0.02) 50%, transparent 51%);
    background-size: 20px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.05) 0%, rgba(42, 82, 152, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.product-card:hover .product-image::before {
    transform: translateX(100%);
}

.product-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.product-title {
    font-size: 1.3rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-button {
    display: inline-block;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.product-button:hover::before {
    left: 100%;
}

.product-button:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

/* About Section */
.about {
    padding: 4rem 2rem;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about p strong {
    color: #1e3c72;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #1e3c72;
    color: white;
    padding: 3rem 2rem 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffd700;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.footer-bottom {
    border-top: 1px solid #2a5298;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom strong {
    color: #ffd700;
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Mostrar menu hambúrguer */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Esconder navegação desktop */
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(30, 60, 114, 0.98) 0%, rgba(42, 82, 152, 0.98) 100%);
        backdrop-filter: blur(10px);
        transition: right 0.3s ease;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-container.active {
        right: 0;
    }

    .nav {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        width: 100%;
        padding: 2rem;
    }

    .nav a {
        font-size: 1.5rem;
        padding: 1rem 0;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .categories, .featured, .about {
        padding: 3rem 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

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

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .categories, .featured, .about {
        padding: 2rem 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card, .product-card {
        padding: 1.5rem;
    }

    .category-card h3 {
        font-size: 1.2rem;
    }

    .product-title {
        font-size: 1.2rem;
    }

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

    .footer-section h3 {
        font-size: 1.1rem;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Telas grandes */
@media (min-width: 1200px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .header, .footer {
        display: none;
    }
    
    .main {
        margin-top: 0;
    }
    
    .hero, .categories, .featured, .about {
        padding: 1rem;
    }
    
    .cta-button, .product-button {
        background: #1e3c72 !important;
        color: white !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero {
        background: white;
    }
    
    .category-card, .product-card {
        border: 2px solid #1e3c72;
    }
    
    .cta-button, .product-button {
        background: #1e3c72;
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Acessibilidade - Navegação por teclado */
.keyboard-navigation *:focus {
    outline: 2px solid #ffd700 !important;
    outline-offset: 2px !important;
}

/* Melhorar contraste para links */
.nav a:focus,
.logo:focus,
.cta-button:focus,
.product-button:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Estados de foco melhorados */
.mobile-menu-toggle:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Melhorar legibilidade em telas pequenas */
@media (max-width: 480px) {
    body {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    input, textarea, select {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Otimizações para touch devices */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover,
    .product-card:hover {
        transform: none;
    }
    
    .category-card:active,
    .product-card:active {
        transform: scale(0.98);
    }
    
    .cta-button:hover,
    .product-button:hover {
        transform: none;
    }
    
    .cta-button:active,
    .product-button:active {
        transform: scale(0.98);
    }
}

/* Melhorar performance em dispositivos com pouca memória */
@media (max-width: 768px) {
    .hero::before,
    .featured::before {
        display: none;
    }
}
