/* ============================================
   CEPO - Página Contáctanos
   Diseño fiel al Figma node 221-500
   ============================================ */

/* ---- Contenedor principal de la sección ---- */
.cepo-contacto {
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-white);
    padding: 64px 0 96px;
    margin-bottom: 100px;
}

/* ---- Vectores decorativos ---- */
.cepo-contacto__deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.cepo-contacto__deco--topright {
    top: -20px;
    right: -30px;
}

.cepo-contacto__deco--topright img {
    width: 260px;
    height: auto;
    opacity: 0.55;
}

.cepo-contacto__deco--bottomleft {
    bottom: -20px;
    left: -20px;
}

.cepo-contacto__deco--bottomleft img {
    width: 220px;
    height: auto;
    opacity: 0.5;
}

/* ---- Inner: dos columnas ---- */
.cepo-contacto__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 64px;
    align-items: start;
}

/* ============================================
   COLUMNA IZQUIERDA — imagen
   ============================================ */
.cepo-contacto__col-img {
    position: relative;
    padding-top: 32px;
}

/* Imagen principal circular */
.cepo-contacto__img-wrap {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid var(--color-green-primary);
    background-color: var(--color-bg-light);
    flex-shrink: 0;
}

.cepo-contacto__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cepo-contacto__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f5ee;
}

/* Imagen circular secundaria (pequeña, decorativa) */
.cepo-contacto__img-sm {
    position: absolute;
    bottom: -24px;
    right: -32px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--color-green-primary);
    background-color: var(--color-bg-light);
    box-shadow: var(--shadow-lg);
}

.cepo-contacto__img-sm-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   COLUMNA DERECHA — breadcrumb + título + form
   ============================================ */
.cepo-contacto__col-form {
    padding-top: 8px;
}

/* Breadcrumbs (hereda estilos globales) */
.cepo-contacto__col-form .cepo-breadcrumbs {
    margin-bottom: 12px;
}

/* Título H1 */
.cepo-contacto__title {
    font-family: var(--font-primary);
    font-size: 44px;
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
}

/* ============================================
   BARRA DE INFORMACIÓN (verde)
   ============================================ */
.cepo-contacto__infobar {
    display: flex;
    align-items: center;
    gap: 0;
    background-color: var(--color-green-primary);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    overflow: hidden;
}

.cepo-contacto__infobar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    flex: 1;
    transition: background-color 0.2s ease;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.cepo-contacto__infobar-item:last-child {
    border-right: none;
}

.cepo-contacto__infobar-item:hover {
    background-color: var(--color-green-medium);
    color: var(--color-white);
}

.cepo-contacto__infobar-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.cepo-contacto__infobar-item span {
    font-size: 13px;
    white-space: nowrap;
}

/* ============================================
   FORMULARIO
   ============================================ */
.cepo-contacto__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Fila con dos campos lado a lado */
.cepo-contacto__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Campo individual */
.cepo-contacto__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label */
.cepo-contacto__label {
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-dark);
}

.cepo-contacto__req {
    color: #c0392b;
    margin-left: 2px;
}

/* Input y Textarea */
.cepo-contacto__input,
.cepo-contacto__textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-white);
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    color: var(--color-text-dark);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.cepo-contacto__input::placeholder,
.cepo-contacto__textarea::placeholder {
    color: var(--color-text-muted);
}

.cepo-contacto__input:focus,
.cepo-contacto__textarea:focus {
    border-color: var(--color-green-primary);
    background-color: var(--color-bg-input);
}

.cepo-contacto__textarea {
    resize: vertical;
    min-height: 130px;
}

/* Feedback de envío */
.cepo-contacto__feedback {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

.cepo-contacto__feedback--success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cepo-contacto__feedback--error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Botón Enviar (amarillo, ancho completo) */
.cepo-contacto__submit {
    width: 100%;
    padding: 16px 24px;
    background-color: var(--color-yellow);
    color: var(--color-text-dark);
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cepo-contacto__submit:hover {
    background-color: var(--color-yellow-alt);
}

.cepo-contacto__submit:active {
    transform: scale(0.99);
}

.cepo-contacto__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE — Tablet (≤ 1100px)
   ============================================ */
@media (max-width: 1100px) {
    .cepo-contacto__inner {
        grid-template-columns: 420px 1fr;
        gap: 48px;
    }

    .cepo-contacto__img-wrap {
        width: 420px;
        height: 420px;
    }
}

/* ============================================
   RESPONSIVE — Tablet pequeño (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
    .cepo-contacto {
        padding: 48px 0 72px;
    }

    .cepo-contacto__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cepo-contacto__col-img {
        display: flex;
        justify-content: center;
        padding-top: 0;
    }

    .cepo-contacto__img-wrap {
        width: 320px;
        height: 320px;
    }

    .cepo-contacto__img-sm {
        right: calc(50% - 320px / 2 - 60px);
        bottom: -20px;
        width: 120px;
        height: 120px;
    }

    .cepo-contacto__title {
        font-size: 36px;
    }

    .cepo-contacto__infobar {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .cepo-contacto__infobar-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        flex: none;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .cepo-contacto__infobar-item:last-child {
        border-bottom: none;
    }

    .cepo-contacto__infobar-item span {
        white-space: normal;
    }
}

/* ============================================
   RESPONSIVE — Mobile (≤ 600px)
   ============================================ */
@media (max-width: 600px) {
    .cepo-contacto {
        padding: 32px 0 56px;
    }

    .cepo-contacto__img-wrap {
        width: 260px;
        height: 260px;
        border-width: 6px;
    }

    .cepo-contacto__img-sm {
        width: 90px;
        height: 90px;
        right: calc(50% - 260px / 2 - 30px);
        bottom: -16px;
        border-width: 4px;
    }

    .cepo-contacto__title {
        font-size: 28px;
    }

    .cepo-contacto__form-row {
        grid-template-columns: 1fr;
    }

    .cepo-contacto__infobar-item {
        padding: 12px 16px;
    }

    .cepo-contacto__submit {
        padding: 14px 20px;
        font-size: var(--fs-sm);
    }

    .cepo-contacto__deco--topright img {
        width: 140px;
    }

    .cepo-contacto__deco--bottomleft img {
        width: 120px;
    }
}
