/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.search-container {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 0.5rem;
    min-width: 300px;
}

.search-input {
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    flex: 1;
    border-radius: 20px;
    font-size: 0.9rem;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.category-group {
    margin-bottom: 2rem;
}

.category-group h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.category-group ul {
    list-style: none;
}

.category-group li {
    margin-bottom: 0.5rem;
}

.category-group a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-group a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

.count {
    background: #e9ecef;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-group a:hover .count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Content Area */
.content-area {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat .number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.stat .label {
    font-size: 0.9rem;
    color: #666;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border: 2px dashed #adb5bd;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e9ff 100%);
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.image-placeholder p {
    text-align: center;
    font-weight: 500;
}

.image-placeholder small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.book-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.book-cover .image-placeholder {
    height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.btn-preview {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.book-info {
    padding: 1.5rem;
}

.book-info h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.author {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.pages {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.rating i {
    color: #ffd700;
}

.rating span {
    color: #666;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.download-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-download {
    flex: 1;
    min-width: 80px;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.btn-download.pdf {
    background: #dc3545;
    color: white;
}

.btn-download.epub {
    background: #28a745;
    color: white;
}

.btn-download.mobi {
    background: #17a2b8;
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Addresses Section */
.addresses-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-top: 3rem;
}

.addresses-section .section-header h3,
.addresses-section .section-header p {
    color: white;
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.address-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.address-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-5px);
}

.address-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.address-icon i {
    font-size: 3rem;
    color: #ffd700;
}

.address-content h4 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.address-input-group {
    margin-bottom: 1.5rem;
}

.address-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.address-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
}

.address-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.address-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255,255,255,0.2);
}

.address-details {
    margin-top: 1.5rem;
}

.address-details p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.address-details i {
    color: #ffd700;
    width: 20px;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 0.2rem;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.contact-image {
    margin-top: 1rem;
}

.contact-image .image-placeholder {
    height: 200px;
}

/* Contact Form */
.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    color: #ffd700;
}

.footer-section p {
    line-height: 1.8;
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-3px);
}

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

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

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

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

.newsletter {
    display: flex;
    margin-top: 1rem;
}

.newsletter input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #34495e;
    border-radius: 25px 0 0 25px;
    background: #34495e;
    color: white;
}

.newsletter input::placeholder {
    color: #bdc3c7;
}

.newsletter button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter button:hover {
    background: #5a6fd8;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .search-container {
        order: 2;
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .addresses-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 1rem;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .btn-download {
        min-width: auto;
    }
}

/* Animações e Efeitos */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: fadeInUp 0.6s ease forwards;
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }
.book-card:nth-child(5) { animation-delay: 0.5s; }
.book-card:nth-child(6) { animation-delay: 0.6s; }

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Estados de loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Estilos para páginas legais */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    line-height: 1.8;
}

.legal-content h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
}

.last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 3rem;
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

.legal-content h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.legal-content p {
    color: #555;
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.legal-content li {
    color: #555;
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.legal-content a:hover {
    text-decoration: underline;
}

.back-to-site {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive para páginas legais */
@media (max-width: 768px) {
    .legal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
    
    .legal-content ul {
        padding-left: 1.5rem;
    }
}

