/* 
   Confraria dos Bibliofilos - Main Stylesheet
   A responsive design optimized for SEO and user experience
   Created: July 2025
*/

/* ---- Base Styles and Reset ---- */
:root {
    --primary-color: #4B0082; /* Deep Purple - Royal */
    --secondary-color: #8A2BE2; /* Lighter Purple */
    --accent-color: #DAA520; /* Gold */
    --text-color: #333333;
    --text-light: #666666;
    --background-light: #F9F7FF;
    --background-dark: #2D1B46;
    --white: #FFFFFF;
    --black: #000000;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --container-max-width: 1200px;
    --header-height: 80px;
    --section-padding: 80px 0;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

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

section {
    padding: var(--section-padding);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn.primary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn.secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Header and Navigation ---- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

.logo img {
    margin-right: 15px;
}

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

nav .menu {
    display: flex;
    list-style: none;
}

nav .menu li {
    margin-left: 30px;
}

nav .menu li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

nav .menu li a:hover {
    color: var(--primary-color);
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* ---- Hero Section ---- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(43, 8, 69, 0.9), rgba(75, 0, 130, 0.8)), 
                linear-gradient(135deg, #4B0082 0%, #8A2BE2 50%, #9370DB 100%);
    background-size: cover;
    background-position: center;
    color: var(--white);
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: var(--header-height);
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

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

/* ---- About Section ---- */
.about {
    background-color: var(--background-light);
}

.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
}

.text-content {
    flex: 1;
}

.text-content p {
    margin-bottom: 20px;
}

.image-content {
    flex: 1;
}

.image-content img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.book-image-placeholder {
    height: 350px;
    width: 500px;
    max-width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

.book-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.book-image-placeholder span {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .book-image-placeholder {
        width: 100%;
        height: 250px;
    }
}

/* ---- Collection Section ---- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.collection-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.collection-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.collection-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ---- Events Section ---- */
.events {
    background-color: var(--background-light);
}

.events-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.event-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    width: calc(33.333% - 20px);
    min-width: 300px;
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.event-date {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}

.event-details {
    padding: 20px;
    flex: 1;
}

.event-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.event-details .location {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 10px;
}

/* ---- Games Section ---- */
.games {
    background-color: var(--white);
}

.games-content {
    max-width: 800px;
    margin: 0 auto;
}

.games-list {
    margin-top: 30px;
    list-style: none;
}

.games-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.games-list li:last-child {
    border-bottom: none;
}

.games-list a {
    color: var(--secondary-color);
    font-weight: 700;
}

.games-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ---- Membership Section ---- */
.membership {
    background-color: var(--background-light);
}

.membership-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.membership-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    width: 300px;
    transition: var(--transition);
}

.membership-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.membership-card.featured {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.membership-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.membership-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.membership-card.featured h3 {
    color: var(--white);
}

.membership-card .price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.membership-card.featured .price {
    color: var(--accent-color);
}

.membership-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.membership-card.featured .price span {
    color: rgba(255, 255, 255, 0.8);
}

.membership-card ul {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.membership-card ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.membership-card ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

.membership-card .btn {
    width: 100%;
}

/* ---- Contact Section ---- */
.contact {
    background-color: var(--white);
}

.contact-wrapper {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-form {
    flex: 1;
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ---- Footer ---- */
footer {
    background-color: var(--background-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    margin: 20px 0 10px;
    color: var(--white);
}

.footer-nav {
    flex: 2;
    display: flex;
    justify-content: space-around;
}

.footer-nav-column {
    padding: 0 15px;
}

.footer-nav-column h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.footer-nav-column ul {
    list-style: none;
}

.footer-nav-column ul li {
    margin-bottom: 10px;
}

.footer-nav-column ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-nav-column ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--white);
}

/* ---- Responsive Design ---- */
@media (max-width: 1024px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .event-card {
        width: calc(50% - 15px);
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero .cta-buttons {
        flex-direction: column;
        width: 80%;
        margin: 0 auto;
    }
    
    nav .menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
    }
    
    nav .menu.active {
        transform: translateX(0);
    }
    
    nav .menu li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }
    
    .event-card {
        width: 100%;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
    
    .membership-options {
        flex-direction: column;
        align-items: center;
    }
    
    .membership-card {
        width: 100%;
        max-width: 300px;
    }
    
    .membership-card.featured {
        transform: scale(1);
        order: -1;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}
