/* ==========================================================================
   RdA Events Manager - Full Stylesheet
   ========================================================================== */

/* Regla Global: Mai text subratllat i lletres de botons SEMPRE en negreta */
.rda-events-home-container a,
.rda-swiper-outer-wrapper a,
.rda-single-event-page a,
.rda-home-btn,
.rda-card-btn,
.rda-btn-primary {
    text-decoration: none !important;
    font-weight: 500;
}

/* 1. Shortcode Home [rda_esdeveniments_home] */
.rda-events-home-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 15px;
    text-align: center;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rda-home-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.rda-home-compact-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto 1.8rem auto !important;
    max-width: 680px;
}

.rda-home-list-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    padding: 4px 0;
    line-height: 1.4;
    color: #ffffff;
    text-align: left;
}

.rda-icon-calendar {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    color: #ffffff;
    flex-shrink: 0;
}

.rda-icon-calendar svg {
    stroke: #ffffff;
}

.rda-event-date {
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.rda-event-divider {
    margin: 0 12px;
    opacity: 0.6;
    font-weight: 300;
}

.rda-event-title {
    font-weight: 300;
    flex-grow: 1;
}

.rda-event-title a {
    color: #ffffff !important;
    transition: opacity 0.2s ease;
}

.rda-event-title a:hover {
    opacity: 0.8;
}

.rda-home-button-wrapper {
    margin-top: 1.2rem;
}

.rda-home-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #3b504f;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.rda-home-btn:hover {
    background-color: #2b3b3a;
    border-color: #ffffff;
    font-weight: 500;
}

/* 2. Shortcode Agenda Carrussel [rda_esdeveniments_targetes] */
.rda-swiper-outer-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 45px;
}

.rda-swiper-container {
    width: 100%;
    padding-bottom: 20px !important;
}

.rda-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rda-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Imatge més alta i centrada verticalment/horitzontalment */
/* Contenidor principal de la imatge */
.rda-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #f7fafc;
}

.rda-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.rda-card-image img {
    width: 100% !important;
    height: 100% !important; /* AQUESTA ÉS LA CLAU: Evita el height: auto del tema */
    object-fit: cover !important;
    object-position: center center !important; /* Centrat absolut */
    display: block;
    transition: transform 0.4s ease;
}

.rda-card-item:hover .rda-card-image img {
    transform: scale(1.03);
}

.rda-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rda-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin: 0 0 14px 0;
    color: #1a202c;
    line-height: 1.3;
}

.rda-card-title a {
    color: #1a202c !important;
}

.rda-card-meta-list {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rda-meta-row {
    line-height: 1.4;
}

.rda-meta-label {
    color: #718096;
}

.rda-meta-val {
    color: #2d3748;
    font-weight: 600;
}

.rda-card-excerpt {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 22px;
    flex-grow: 1;
}

.rda-card-action {
    margin-top: auto;
}

.rda-card-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #3b504f;
    color: #ffffff !important;
    padding: 12px 18px;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.25s ease;
    font-weight: 500 !important;
}

.rda-card-btn:hover {
    background-color: #2b3b3a;
    font-weight: 500;
}

/* Botons de navegació sobreposats amb z-index alt */
.rda-nav-btn {
    color: #3b504f !important;
    background: #ffffff;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    z-index: 100 !important;
}

.rda-nav-btn:after {
    font-size: 18px !important;
    font-weight: bold;
}

.rda-nav-btn:hover {
    background-color: #3b504f;
    color: #ffffff !important;
    border-color: #3b504f;
}

.swiper-button-prev.rda-nav-prev {
    left: 0px;
}

.swiper-button-next.rda-nav-next {
    right: 0px;
}

/* 3. Single Event Page (Disseny Elegant Dos Columnes) */
.rda-single-event-page {
    padding: 60px 20px;
    background-color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rda-single-container {
    max-width: 1050px; /* Amplada màxima continguda per no expandir-se per tota la pantalla */
    margin: 0 auto;
}

.rda-single-header {
    margin-bottom: 25px;
}

.rda-back-link {
    display: inline-block;
    color: #3b504f !important;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.rda-back-link:hover {
    opacity: 0.7;
}

/* Estructura Grid: Imatge a l'esquerra, Contingut a la dreta */
.rda-single-layout {
    display: grid;
    grid-template-columns: 380px 1fr; /* La imatge ocupa màxim 380px */
    gap: 60px;
    align-items: start;
}

/* Control estricte de la Imatge (Petita i Quadrada) */
.rda-single-media {
    margin: 0;
    width: 100%;
    aspect-ratio: 1 / 1; /* Força la proporció quadrada sempre */
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Ombra elegant */
    position: sticky;
    top: 100px; /* Fa que la imatge acompanyi si hi ha molt de text a la dreta */
}

.rda-single-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto es xafi */
    display: block;
}

/* Contingut dret */
.rda-single-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    color: #1a202c;
    margin: 0 0 30px 0;
    line-height: 1.15;
}

.rda-single-meta-box {
    background: #f8fafc;
    padding: 25px 30px;
    border-radius: 4px;
    border-left: 4px solid #3b504f; /* Detall visual corporatiu */
    margin-bottom: 35px;
}

.rda-info-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rda-info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
}

.rda-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rda-body-text {
    line-height: 1.8;
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.rda-body-text p {
    margin-bottom: 1.5rem;
}

/* Botó de reserva */
.rda-single-action {
    margin-top: 20px;
}

.rda-btn-primary {
    display: inline-block;
    background-color: #3b504f;
    color: #ffffff !important;
    padding: 15px 35px;
    border-radius: 4px;
    font-size: 1.1rem;
    transition: background 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.rda-btn-primary:hover {
    background-color: #2b3b3a;
}

/* Responsive: Comportament per a tauletes i mòbils */
@media (max-width: 850px) {
    .rda-single-layout {
        grid-template-columns: 1fr; /* Passa a 1 columna */
        gap: 40px;
    }
    
    .rda-single-media {
        max-width: 400px;
        margin: 0 auto;
        position: static;
    }
    
    .rda-single-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .rda-single-meta-box {
        padding: 20px;
    }
    
    .rda-info-list li {
        flex-direction: column;
        justify-content: flex-start;
        gap: 5px;
    }
}