/*
Theme Name: FDM-A
Description: Tema minimalista per Filla del Mar
Version: 1.3 12/05/2023
*/

/* ============================
   GLOBAL
============================ */

body {
    margin: 0;
    padding: 0;
    font-family: inherit;
}

/* ============================
   TÍTOLS DE PÀGINA
============================ */

.fdm-page-header-block {
    width: 85%;
    text-align: center;
    margin: 20px auto 20px;
}

.fdm-page-title {
    margin: 0 auto;
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
}

.fdm-container .fdm-page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
}

/* ============================
   IMATGE DESTACADA (PROJECTE)
============================ */

.page .fdm-featured-image {
    max-width: 85%;
    margin: 30px auto 0;
    padding: 0 0px;
}

.fdm-featured-image img {
    width: 85%;
    height: auto;
    border-radius: 60px;
    object-fit: cover;
}

/* ============================
   IMATGE PORTADA (INICI)
============================ */

/* Contenidor de la imatge */
.wp-block-image.imatge-portada {
    max-width: 85%;
    margin: 30px auto; /* arreglat */
    display: flex;
    justify-content: center;
}

/* Imatge */
.wp-block-image.imatge-portada img {
    width: 85%;
    height: auto;
    border-radius: 50% / 20%;
    object-fit: cover;
    object-position: center center;
}

/* ============================
   SINGLE CANÇÓ
============================ */

/* Layout general */
.canco-single-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    margin: 0;
    align-items: stretch;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 24px 0;
}

@media (max-width: 1024px) {
    .canco-single-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .canco-single-layout {
        gap: 24px;
    }
}

/* Imatge */
.canco-single-image {
    grid-column: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.canco-single-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

@media (max-width: 1024px) {
    .canco-single-image {
        display: block;
        padding: 0;
        text-align: center;
    }

    .canco-single-image img {
        max-width: 100%;
    }
}

/* Camps ACF */
.canco-single-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.canco-field {
    margin-bottom: 1rem;
    line-height: 1.3;
}

.canco-label {
    display: inline-block;
    font-size: 0.9rem;
    color: #777;
    font-weight: 400;
    margin-bottom: 0;
    letter-spacing: 0.3px;
}

.canco-value {
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    word-break: break-word;
}

/* Descripció */
.canco-descripcio {
    grid-column: 1 / -1;
    margin: 24px 0;
    padding: 24px 0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.35;
    color: #333;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.canco-descripcio p:first-child {
    padding-top: 24px;
}

@media (max-width: 768px) {
    .canco-descripcio {
        margin-top: 20px;
        padding-top: 10px;
    }

    .canco-descripcio p {
        margin: 0;
        padding: 16px 0;
        line-height: 1.4;
    }
}

/* Lletra */
.canco-lletra {
    margin-top: 3rem;
}

.canco-lletra .lletra-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.lletra-toggle {
    background: none;
    border: none;
    color: #444;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lletra-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

/* ============================
   NAV GLOBAL
============================ */

.fdm-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.fdm-burger span {
    width: 22px;
    height: 2px;
    background: #333;
    display: block;
    transition: 0.3s;
}

.fdm-mobile-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.fdm-mobile-nav a {
    text-decoration: none;
    color: #222;
    font-size: 1em;
}

/* ============================
   COMPONENT: NAVIGADOR CPT GLOBAL
============================ */

.fdm-cpt-nav {
    width: 100%;
    max-width: 800px;
    margin: 24px auto 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fdm-cpt-nav .nav-left,
.fdm-cpt-nav .nav-center,
.fdm-cpt-nav .nav-right {
    flex: 1;
}

.fdm-cpt-nav .nav-left { text-align: left; }
.fdm-cpt-nav .nav-center { text-align: center; }
.fdm-cpt-nav .nav-right { text-align: right; }

@media (max-width: 768px) {
    .fdm-cpt-nav {
        margin: 24px auto;
    }
}

/* ============================
   LAYOUT GLOBAL
============================ */

.fdm-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 12px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .fdm-container {
        padding: 10px;
    }
}

@media (min-width: 769px) {
    .fdm-container {
        padding-left: 50px;
        padding-right: 50px;
    }
}