/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   HEADER
   ============================================ */
.header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    gap: 2rem;
}

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

.logo {
    height: 50px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b4d87;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #3b4d87;
}

.nav-link.active {
    background-color: #3b4d87;
    color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    min-height: calc(100vh - 100px);
}

section {
    padding: 3rem 0;
}

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

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background-color: #3b4d87;
    color: white;
}

.btn-primary:hover {
    background-color: #2d3a66;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 77, 135, 0.3);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #3b4d87;
    color: #3b4d87;
}

.btn-outline:hover {
    background-color: #3b4d87;
    color: white;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    background: white;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: #3b4d87;
    color: #3b4d87;
    background-color: #f8f9fb;
}

.filter-btn svg {
    transition: transform 0.2s ease;
}

.filter-btn:hover svg {
    transform: rotate(180deg);
}

/* ============================================
   EVENTOS EM DESTAQUE
   ============================================ */
.featured-section {
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    padding: 3rem 0 4rem;
}

.featured-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b4d87, #5a6fa8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.featured-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
}

.featured-content {
    padding: 1.5rem;
}

.featured-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, #3b4d87, #5a6fa8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.featured-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.featured-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.featured-info-item svg {
    width: 16px;
    height: 16px;
    color: #3b4d87;
    flex-shrink: 0;
}

/* ============================================
   PRÓXIMOS EVENTOS
   ============================================ */
.upcoming-section {
    background: white;
}

.upcoming-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upcoming-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.upcoming-card:hover {
    border-color: #3b4d87;
    background-color: #fafbfc;
    transform: translateX(4px);
}

.upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3b4d87, #5a6fa8);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.upcoming-day {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.upcoming-month {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upcoming-content {
    flex: 1;
}

.upcoming-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.upcoming-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.upcoming-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.upcoming-meta-item svg {
    width: 14px;
    height: 14px;
    color: #3b4d87;
}

/* ============================================
   CALENDÁRIO
   ============================================ */
.calendar-section {
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
}

#calendar {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.fc {
    font-family: 'Inter', sans-serif;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a;
}

.fc-button {
    background-color: #f0f0f0 !important;
    border: none !important;
    color: #333 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover {
    background-color: #e5e5e5 !important;
}

.fc-button-active {
    background-color: #3b4d87 !important;
    color: white !important;
}

.fc-event {
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px;
    font-weight: 500;
    border: none !important;
    background-color: #3b4d87 !important;
}

.fc-event:hover {
    background-color: #2d3a66 !important;
}

.fc-daygrid-event {
    white-space: nowrap;
    overflow: hidden;
}

.fc-daygrid-event-harness {
    margin-bottom: 2px !important;
}

.fc-event.highlight {
    animation: highlight-pulse 1s ease-in-out 3;
    box-shadow: 0 0 0 4px rgba(59, 77, 135, 0.3);
}

@keyframes highlight-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 77, 135, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(59, 77, 135, 0.1);
    }
}

/* ============================================
   CONTATOS DAS IGREJAS
   ============================================ */
.contacts-section {
    background: white;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: #3b4d87;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-church {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.contact-pastor {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-pastor strong {
    color: #3b4d87;
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
}

.contact-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.contact-btn.whatsapp {
    border-color: #25D366;
    color: #25D366;
}

.contact-btn.whatsapp:hover {
    background-color: #25D366;
    color: white;
}

.contact-btn.email {
    border-color: #EA4335;
    color: #EA4335;
}

.contact-btn.email:hover {
    background-color: #EA4335;
    color: white;
}

.contact-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   MODAIS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.close {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close:hover {
    color: #333;
    background-color: #f0f0f0;
}

/* Modal de Filtro */
.filter-modal {
    max-width: 500px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    padding: 1rem 1.25rem;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
    text-align: left;
}

.filter-option:hover {
    border-color: #3b4d87;
    background-color: #f8f9fb;
}

.filter-option.active {
    border-color: #3b4d87;
    background-color: #3b4d87;
    color: white;
}

.filter-icon {
    font-size: 1.5rem;
}

.filter-text {
    flex: 1;
}

/* Modal de Evento */
.event-modal {
    max-width: 700px;
}

.event-detail {
    margin-bottom: 1.5rem;
}

.event-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.event-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.event-info-item {
    background: #f8f9fb;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #3b4d87;
}

.event-info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.375rem;
}

.event-info-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* Modal de Confirmação do Calendário */
.calendar-confirm-modal {
    max-width: 450px;
    text-align: center;
}

.confirm-content {
    padding: 1rem 0;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.confirm-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.confirm-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 120px;
}

/* ============================================
   LOADING
   ============================================ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #3b4d87;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 992px) {
    .section-title {
        font-size: 1.5rem;
    }

    .featured-events {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }

    .contacts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
    }

    .logo {
        height: 45px;
    }

    .site-title {
        font-size: 1.35rem;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-title {
        font-size: 1.35rem;
        text-align: center;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

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

    .featured-image {
        height: 180px;
    }

    .featured-content {
        padding: 1.25rem;
    }

    .upcoming-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .upcoming-date {
        min-width: 60px;
        height: 60px;
    }

    .upcoming-day {
        font-size: 1.5rem;
    }

    .upcoming-month {
        font-size: 0.8rem;
    }

    .upcoming-meta {
        justify-content: center;
    }

    #calendar {
        padding: 1rem;
    }

    .fc-toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .fc-toolbar-title {
        font-size: 1.25rem !important;
    }

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

    .contact-actions {
        flex-direction: column;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .event-title {
        font-size: 1.5rem;
    }

    .event-image {
        max-height: 250px;
    }

    .event-info-grid {
        grid-template-columns: 1fr;
    }

    .confirm-actions {
        flex-direction: column;
    }

    .confirm-actions .btn {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 1.5rem 0;
    }

    .logo {
        height: 40px;
    }

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

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

    .featured-content {
        padding: 1rem;
    }

    .featured-title {
        font-size: 1.125rem;
    }

    .upcoming-card {
        padding: 1rem;
    }

    .upcoming-title {
        font-size: 1rem;
    }

    .contact-card {
        padding: 1.25rem;
    }

    .modal-content {
        padding: 1.25rem;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
    }
}

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

/* Foco visível para navegação por teclado */
*:focus-visible {
    outline: 3px solid #3b4d87;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #3b4d87;
    outline-offset: 2px;
}
