/* ==========================================================================
   Landing Page - Novo Layout com Cards Paralelos
   ========================================================================== */

/* Seções com fundo alternado */
.landing-section {
    padding: 4rem 0;
}
.landing-section-alt {
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-alt) 100%);
}
.landing-section-white {
    background: var(--container-bg);
}

/* Container máximo */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Grid de Cards Paralelos */
.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Event Cards Scroll (Carrossel) */
.evt-cards-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.evt-cards-scroll::-webkit-scrollbar {
    height: 8px;
}
.evt-cards-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.evt-cards-scroll::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 4px;
}
.evt-card-link {
    text-decoration: none;
    display: block;
    flex: 0 0 320px;
}
.evt-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.evt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.evt-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}
.evt-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.evt-card:hover .evt-card-img-wrapper img {
    transform: scale(1.1);
}
.evt-card-body {
    padding: 15px;
    color: var(--text-color);
}
.evt-card-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.evt-card-date {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Grid de Eventos - Cards lado a lado */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

/* Event Full Card com Carrossel de Fotos */
.event-full-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    background: var(--container-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--container-shadow);
    margin-bottom: 0;
    border: 1px solid var(--container-border);
    min-height: 320px;
}

.event-full-card:hover .event-foto-item img {
    /* Remove zoom effect */
    transform: none;
}

@media (max-width: 1100px) {
    .event-full-card {
        grid-template-columns: 1fr 280px;
    }
    .event-fotos-carrossel {
        min-height: 280px;
        max-height: 280px;
    }
    .event-fotos-carrossel img {
        height: 280px;
    }
}

@media (max-width: 900px) {
    .event-full-card {
        grid-template-columns: 1fr 200px;
        min-height: auto;
    }
    .event-info {
        max-height: none;
        height: auto;
    }
    .event-fotos-carrossel {
        min-height: 200px;
        max-height: 200px;
        order: 2;
    }
    .event-info {
        order: 1;
    }
    .event-fotos-carrossel img {
        height: 200px;
    }
}

.event-info {
    order: 1;
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    max-height: none;
    height: auto;
    justify-content: flex-start;
    overflow: visible;
    min-height: auto;
}

.event-fotos-carrossel {
    order: 2;
    position: relative;
    height: auto;
    min-height: 320px;
    max-height: 320px;
    background: var(--bg-alt);
}

.event-fotos-carrossel img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.event-fotos-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    height: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.event-fotos-scroll::-webkit-scrollbar {
    height: 6px;
}

.event-fotos-scroll::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 3px;
}

.event-foto-item {
    flex: 0 0 100%;
    height: 100%;
    width: 100%;
}

.event-foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

@media (max-width: 900px) {
    .event-foto-item img {
        transform: scale(1.02);
    }
}

.evt-foto-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.evt-foto-btn:hover {
    background: var(--brand-teal);
}

.evt-foto-prev { left: 10px; }
.evt-foto-next { right: 10px; }

.event-info .button {
    align-self: flex-start;
    margin-top: auto;
}

.event-titulo {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.event-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--muted-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.event-descricao {
    color: var(--text-color);
    line-height: 1.8;
    flex-grow: 1;
    font-size: 0.95rem;
    text-align: justify;
    hyphens: auto;
    word-wrap: break-word;
    padding-right: 8px;
    overflow-y: visible;
    min-height: auto;
    margin: 0;
    max-height: none;
}

.event-descricao::-webkit-scrollbar {
    width: 6px;
}

.event-descricao::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 3px;
}

.event-comentarios {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
}

.event-comentarios-titulo {
    font-weight: 600;
    color: var(--brand-teal);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.event-comment {
    background: var(--container-bg);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--brand-coral);
}

.event-comment:last-child {
    margin-bottom: 0;
}

.event-comment-autor {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
}

.event-comment-texto {
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-top: 0.25rem;
}

.landing-card {
    background: var(--container-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--container-shadow);
    border: 1px solid var(--container-border);
    transition: all 0.3s ease;
}

.landing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.landing-card:hover .landing-card-body img {
    transform: scale(1.1);
}

/* Carrossel de Adoção - Apenas Fotos */
.adocao-carrossel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.adocao-carrossel::-webkit-scrollbar {
    height: 8px;
}

.adocao-carrossel::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-radius: 4px;
}

.adocao-carrossel::-webkit-scrollbar-thumb {
    background: var(--brand-coral);
    border-radius: 4px;
}

.adocao-card-simple {
    flex: 0 0 220px;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}

.adocao-card-simple:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.adocao-card-simple img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.landing-card-header {
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
    padding: 1.25rem 1.5rem;
    color: white;
}

.landing-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.landing-card-body {
    padding: 1.5rem;
}

.landing-card-body img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.landing-card-body a {
    text-decoration: none;
}

.landing-card-body a:hover img {
    transform: scale(1.05);
}

/* Card de Evento com Descrição ao Lado */
.event-card-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: var(--container-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--container-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--container-border);
}

@media (max-width: 768px) {
    .event-card-wrapper {
        grid-template-columns: 1fr;
    }
}

.event-card-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

.event-card-wrapper:hover .event-card-image img {
    transform: scale(1.1);
}

.event-card-image {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.event-card-image .evt-mini-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.event-card-image .evt-mini-btn:hover {
    background: var(--brand-teal);
}

.event-card-image .mini-prev { left: 10px; }
.event-card-image .mini-next { right: 10px; }

.event-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.event-card-title {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.event-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--muted-color);
    font-size: 0.9rem;
}

.event-card-description {
    color: var(--text-color);
    line-height: 1.8;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-align: justify;
}

.event-card-description::first-letter {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--brand-teal);
}

.event-card-content .event-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-teal);
    font-weight: 500;
    text-decoration: none;
    margin-top: auto;
    padding: 0.5rem 1rem;
    border: 1px solid var(--brand-teal);
    border-radius: 8px;
    transition: all 0.3s;
}

.event-card-content .event-link:hover {
    background: var(--brand-teal);
    color: white;
}

.event-card-content {
    position: relative;
}

/* Campo de Comentários */
.event-comments-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.event-comments-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

/* Lista de Comentários */
.event-comments-list {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
}

.comments-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-teal);
    margin-bottom: 0.75rem;
}

.comment-item {
    padding: 0.75rem;
    background: var(--container-bg);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--brand-coral);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.85rem;
}

.comment-text {
    color: var(--muted-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--muted-color);
    margin-top: 0.25rem;
    opacity: 0.7;
}

.event-comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.event-comment-form textarea:focus {
    outline: none;
    border-color: var(--brand-teal);
}

.event-comment-form button {
    margin-top: 0.5rem;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.event-comment-form button:hover {
    background: var(--button-hover-bg);
    transform: translateY(-2px);
}

/* Tabela de Agendamentos de Castração */
.table-responsive {
    background: var(--container-bg);
    border-radius: 12px;
}

.table thead th {
    background: var(--brand-teal) !important;
    color: white !important;
    border: none !important;
    padding: 1rem !important;
    font-weight: 600;
}

.table tbody tr:hover {
    background: var(--bg-color) !important;
}

.table td {
    padding: 0.75rem 1rem !important;
    vertical-align: middle !important;
    border-color: var(--border-color) !important;
}

/* Voluntários Carrossel */
.voluntarios-carrossel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
}

.voluntarios-carrossel::-webkit-scrollbar {
    height: 8px;
}

.voluntarios-carrossel::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-radius: 4px;
}

.voluntarios-carrossel::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 4px;
}

.voluntario-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    background: var(--container-bg);
    border-radius: 16px;
    overflow: visible;
    box-shadow: var(--container-shadow);
    transition: all 0.3s ease;
    height: auto;
    align-self: flex-start;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.voluntario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-blue), #10b981);
    border-radius: 16px 16px 0 0;
}

.voluntario-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--brand-teal);
}

.voluntario-card-avatar {
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.voluntario-card-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}

.voluntario-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.voluntario-card:hover .voluntario-card-avatar img {
    transform: scale(1.05);
}

.voluntario-card-avatar .avatar-initials {
    font-size: 3.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    z-index: 1;
}

.voluntario-card-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow-x: visible;
    width: auto;
    max-width: none;
    text-align: center;
}

.voluntario-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.voluntario-card-funcao {
    font-size: 0.8rem;
    color: var(--brand-teal);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(26, 184, 169, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

.voluntario-card-location {
    font-size: 0.75rem;
    color: var(--muted-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.voluntario-card-message {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.75rem;
    line-height: 1.5;
    white-space: normal;
    overflow-x: visible;
    text-overflow: clip;
    word-break: break-word;
    max-width: none;
    width: auto;
    display: block;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--brand-teal);
    max-height: 150px;
    overflow-y: auto;
}

/* Hero Section Moderna */
.hero-landing {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(14, 165, 233, 0.85)), 
                url('/static/css/imagem/ong_hero_background.jpg') center/cover;
    padding: 6rem 0;
    color: white;
    text-align: center;
}

.hero-landing h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-landing p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-landing .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.hero-landing .btn-primary {
    background: white;
    color: var(--brand-teal);
    border: none;
}

.hero-landing .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-landing .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    margin-left: 1rem;
}

.hero-landing .btn-outline:hover {
    background: white;
    color: var(--brand-teal);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 3rem 0;
}

.stat-card {
    background: var(--alternate-bg);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--container-shadow);
    border-color: var(--brand-teal);
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-card-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1;
}

.stat-card-label {
    color: var(--muted-color);
    margin-top: 0.5rem;
}

/* Responsivo - Ocultar atendimentos concluídos */
.status-atendido { display: none; }

#toggleAtendidos:checked ~ .landing-container ~ .castracao-table .status-atendido,
body:has(#toggleAtendidos:checked) .status-atendido { display: table-row; }

/* Responsive */
@media (max-width: 768px) {
    .hero-landing h1 { font-size: 2rem; }
    .hero-landing p { font-size: 1rem; }
    .landing-grid { grid-template-columns: 1fr; }
    .castracao-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .agendamentos-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

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

.landing-card, .event-card-wrapper, .castracao-card {
    animation: fadeInUp 0.5s ease forwards;
}

.landing-card:nth-child(1), .castracao-card:nth-child(1) { animation-delay: 0.1s; }
.landing-card:nth-child(2), .castracao-card:nth-child(2) { animation-delay: 0.2s; }
.landing-card:nth-child(3), .castracao-card:nth-child(3) { animation-delay: 0.3s; }
.landing-card:nth-child(4), .castracao-card:nth-child(4) { animation-delay: 0.4s; }

.table-responsive { overflow-x: auto; }

/* Botão "+ Novo Agendamento" destacado */
.button-highlight {
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark)) !important;
    color: white !important;
    padding: 12px 30px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    text-decoration: none !important;
}

.button-highlight:hover {
    background: linear-gradient(135deg, var(--brand-teal-dark), #0f5950) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5) !important;
}
